Class ProfiledDocuments
- java.lang.Object
-
- org.gcube.application.geoportal.service.rest.ProfiledDocuments
-
@Path("projects/{usecase_id}") public class ProfiledDocuments extends ObjectThe Class ProfiledDocuments.- Author:
- created by Fabio Sinibaldi, new manager/developer and mantainer - Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Apr 18, 2023
-
-
Constructor Summary
Constructors Constructor Description ProfiledDocuments(String profileID)Instantiates a new profiled documents.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.gcube.application.geoportal.common.model.document.ProjectcreateNew(org.bson.Document d)Creates the new.Booleandelete(String id, Boolean force)Delete.org.gcube.application.geoportal.common.model.document.ProjectdeleteFileSet(String id, Boolean force, Boolean ignore_errors, String path)Delete file set.org.gcube.application.geoportal.common.model.document.ProjectdeleteRelation(String id, String relationshipId, String targetId, String targetUCD)Delete relation.org.gcube.application.geoportal.common.model.document.ProjectforceUnlock(String id)Force unlock.org.gcube.application.geoportal.common.model.document.ProjectgetById(String id)Gets the by id.org.gcube.application.geoportal.common.model.configuration.ConfigurationgetConfiguration(String profileID)Gets the configuration.StringgetRelationshipChain(String id, String relationshipId, Boolean deep)Gets the relationship chain.Iterable<?>list()List.org.gcube.application.geoportal.common.model.document.Projectpatch(String documentId, org.bson.Document d)Patch.org.gcube.application.geoportal.common.model.document.ProjectperformStep(String id, org.gcube.application.geoportal.common.model.rest.StepExecutionRequest request)Perform step.Iterable<?>query(String queryString)Query.org.gcube.application.geoportal.common.model.document.ProjectregisterFileSet(String id, org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest request)Register file set.Stringsearch(String filter)Search.org.gcube.application.geoportal.common.model.document.ProjectsetAccessPolicy(String id, org.gcube.application.geoportal.common.model.document.access.Access toSet)Sets the access policy.org.gcube.application.geoportal.common.model.document.ProjectsetRelation(String id, String relationshipId, String targetId, String targetUCD)Sets the relation.org.gcube.application.geoportal.common.model.document.Projectupdate(String documentId, org.bson.Document d)Update.
-
-
-
Constructor Detail
-
ProfiledDocuments
public ProfiledDocuments(@PathParam("usecase_id") String profileID) throws org.gcube.application.geoportal.common.model.rest.ConfigurationExceptionInstantiates a new profiled documents.- Parameters:
profileID- the profile ID- Throws:
org.gcube.application.geoportal.common.model.rest.ConfigurationException- the configuration exception
-
-
Method Detail
-
getConfiguration
@GET @Path("configuration") @Produces("application/json") public org.gcube.application.geoportal.common.model.configuration.Configuration getConfiguration(@PathParam("usecase_id") String profileID)Gets the configuration.- Parameters:
profileID- the profile ID- Returns:
- the configuration
-
createNew
@POST @Consumes("application/json") @Produces("application/json") public org.gcube.application.geoportal.common.model.document.Project createNew(org.bson.Document d)Creates the new.- Parameters:
d- the d- Returns:
- the project
-
update
@PUT @Path("{project_id}") @Consumes("application/json") @Produces("application/json") public org.gcube.application.geoportal.common.model.document.Project update(@PathParam("project_id") String documentId, org.bson.Document d)Update.- Parameters:
documentId- the document idd- the d- Returns:
- the project
-
patch
@Path("{project_id}") @Consumes("application/json") @Produces("application/json") public org.gcube.application.geoportal.common.model.document.Project patch(@PathParam("project_id") String documentId, org.bson.Document d)Patch.- Parameters:
documentId- the document idd- the d- Returns:
- the project
-
delete
@DELETE @Produces("application/json") @Path("{project_id}") public Boolean delete(@PathParam("project_id") String id, @DefaultValue("false") @QueryParam("force") Boolean force)Delete.- Parameters:
id- the idforce- the force- Returns:
- the boolean
-
registerFileSet
@POST @Consumes("application/json") @Produces("application/json") @Path("/registerFiles/{project_id}") public org.gcube.application.geoportal.common.model.document.Project registerFileSet(@PathParam("project_id") String id, org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest request)Register file set.- Parameters:
id- the idrequest- the request- Returns:
- the project
-
deleteFileSet
@POST @Consumes("application/json") @Produces("application/json") @Path("/deleteFiles/{project_id}") public org.gcube.application.geoportal.common.model.document.Project deleteFileSet(@PathParam("project_id") String id, @DefaultValue("false") @QueryParam("force") Boolean force, @DefaultValue("false") @QueryParam("ignore_errors") Boolean ignore_errors, String path)Delete file set. the Authorization must be a VRE token- Parameters:
id- the idforce- the forcepath- the path must be passed as text in the body- Returns:
- the project
-
performStep
@POST @Consumes("application/json") @Produces("application/json") @Path("/step/{project_id}") public org.gcube.application.geoportal.common.model.document.Project performStep(@PathParam("project_id") String id, org.gcube.application.geoportal.common.model.rest.StepExecutionRequest request)Perform step.- Parameters:
id- the idrequest- the request- Returns:
- the project
-
forceUnlock
@PUT @Consumes("application/json") @Produces("application/json") @Path("/forceUnlock/{project_id}") public org.gcube.application.geoportal.common.model.document.Project forceUnlock(@PathParam("project_id") String id)Force unlock.- Parameters:
id- the id- Returns:
- the project
-
setAccessPolicy
@PUT @Consumes("application/json") @Produces("application/json") @Path("/setAccess/{project_id}") public org.gcube.application.geoportal.common.model.document.Project setAccessPolicy(@PathParam("project_id") String id, org.gcube.application.geoportal.common.model.document.access.Access toSet)Sets the access policy.- Parameters:
id- the idtoSet- the to set- Returns:
- the project
-
list
@GET @Produces("application/json") public Iterable<?> list()List.- Returns:
- the iterable
-
getById
@GET @Produces("application/json") @Path("{project_id}") public org.gcube.application.geoportal.common.model.document.Project getById(@PathParam("project_id") String id)Gets the by id.- Parameters:
id- the id- Returns:
- the by id
-
search
@POST @Consumes("application/json") @Produces("application/json") @Path("/search") public String search(String filter)Search.- Parameters:
filter- the filter- Returns:
- the string
-
query
@POST @Consumes("application/json") @Produces("application/json") @Path("/query") public Iterable<?> query(String queryString)Query.- Parameters:
queryString- the query string- Returns:
- the iterable
-
getRelationshipChain
@GET @Produces("application/json") @Path("{relationship}/{project_id}/{relationship_id}") public String getRelationshipChain(@PathParam("project_id") String id, @PathParam("relationship_id") String relationshipId, @DefaultValue("false") @QueryParam("deep") Boolean deep)Gets the relationship chain.- Parameters:
id- the idrelationshipId- the relationship iddeep- the deep- Returns:
- the relationship chain
-
setRelation
@PUT @Produces("application/json") @Path("{relationship}/{project_id}/{relationship_id}") public org.gcube.application.geoportal.common.model.document.Project setRelation(@PathParam("project_id") String id, @PathParam("relationship_id") String relationshipId, @QueryParam("target_id") String targetId, @QueryParam("target_ucd") String targetUCD)Sets the relation.- Parameters:
id- the idrelationshipId- the relationship idtargetId- the target idtargetUCD- the target UCD- Returns:
- the project
-
deleteRelation
@DELETE @Produces("application/json") @Path("{relationship}/{project_id}/{relationship_id}") public org.gcube.application.geoportal.common.model.document.Project deleteRelation(@PathParam("project_id") String id, @PathParam("relationship_id") String relationshipId, @QueryParam("target_id") String targetId, @QueryParam("target_ucd") String targetUCD)Delete relation.- Parameters:
id- the idrelationshipId- the relationship idtargetId- the target idtargetUCD- the target UCD- Returns:
- the project
-
-