Class ProjectsCaller
- java.lang.Object
-
- org.gcube.application.geoportalcommon.geoportal.ProjectsCaller
-
public class ProjectsCaller extends Object
The Class ProjectsCaller.- Author:
- Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Mar 17, 2022
-
-
Constructor Summary
Constructors Constructor Description ProjectsCaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.gcube.application.geoportal.common.model.document.ProjectcreateNew(String profileID, String jsonDocument)Creates the new.voidcreateRelationship(String fromProfileID, String fromProjectID, String relationshipId, String toProfileID, String toProjectID)Creates the relationship.org.gcube.application.geoportal.common.model.document.ProjectdeleteFileset(String profileID, String projectID, String jsonPathToFileset, Boolean force, Boolean ignoreErrors)Delete fileset.voiddeleteProject(String profileID, String projectID, boolean force)Delete project.voiddeleteRelationship(String fromProfileID, String fromProjectID, String relationshipId, String toProfileID, String toProjectID)Delete relationship.org.gcube.application.geoportal.common.rest.Projects<org.gcube.application.geoportal.common.model.document.Project>getClient(String profileID)Gets the client.org.gcube.application.geoportal.common.model.configuration.ConfigurationgetConfiguration(String profileID)Gets the configuration.List<String>getIDsPhases(String profileID)Gets the total document.List<org.gcube.application.geoportal.common.model.document.Project>getListForProfileID(String profileID)Gets the list for profile ID.PhaseDV[]getPhasesIntoDocumentStoreCollection(String profileID)Gets the phases into document store collection.org.gcube.application.geoportal.common.model.document.ProjectgetProjectByID(String profileID, String projectID)Gets the project by ID.Iterator<org.gcube.application.geoportal.common.model.document.relationships.RelationshipNavigationObject>getRelationshipChain(String profileID, String projectID, String relationID, Boolean deep)Gets the relationship chain.IntegergetTotalDocument(String profileID)Gets the total document.org.gcube.application.geoportal.common.model.document.ProjectperformStep(String profileID, String projectID, String stepID, org.bson.Document options)Perform step.Iterator<org.gcube.application.geoportal.common.model.document.Project>queryOnMongo(String profileID, Integer totalItems, Integer offset, Integer limit, SearchingFilter filter)Query on mongo.org.gcube.application.geoportal.common.model.document.ProjectregisterFileSet(String profileID, org.gcube.application.geoportal.common.model.document.Project project, File theFile, String parentPath, String fieldName, String fieldDefinition)Register file set.Iterator<org.gcube.application.geoportal.common.model.document.Project>simpleQuery(String profileID, org.bson.Document filter)Simple query.org.gcube.application.geoportal.common.model.document.ProjectupdateProject(String profileID, String projectID, org.bson.Document updatedDocument)Update project.
-
-
-
Method Detail
-
getClient
public org.gcube.application.geoportal.common.rest.Projects<org.gcube.application.geoportal.common.model.document.Project> getClient(String profileID)
Gets the client.- Parameters:
profileID- the profile ID- Returns:
- the client
-
createNew
public org.gcube.application.geoportal.common.model.document.Project createNew(String profileID, String jsonDocument) throws RemoteException
Creates the new.- Parameters:
profileID- the profile IDjsonDocument- the json document- Returns:
- the project
- Throws:
RemoteException- the remote exception
-
registerFileSet
public org.gcube.application.geoportal.common.model.document.Project registerFileSet(String profileID, org.gcube.application.geoportal.common.model.document.Project project, File theFile, String parentPath, String fieldName, String fieldDefinition) throws RemoteException, FileNotFoundException, com.fasterxml.jackson.core.JsonProcessingException, org.gcube.application.geoportal.common.faults.InvalidRequestException
Register file set.- Parameters:
profileID- the profile IDproject- the projecttheFile- the the fileparentPath- the parent pathfieldName- the field namefieldDefinition- the field definition- Returns:
- the project
- Throws:
RemoteException- the remote exceptionFileNotFoundException- the file not found exceptioncom.fasterxml.jackson.core.JsonProcessingException- the json processing exceptionorg.gcube.application.geoportal.common.faults.InvalidRequestException- the invalid request exception
-
getListForProfileID
public List<org.gcube.application.geoportal.common.model.document.Project> getListForProfileID(String profileID) throws Exception
Gets the list for profile ID.- Parameters:
profileID- the profile ID- Returns:
- the list for profile ID
- Throws:
Exception- the exception
-
getProjectByID
public org.gcube.application.geoportal.common.model.document.Project getProjectByID(String profileID, String projectID) throws Exception
Gets the project by ID.- Parameters:
profileID- the profile IDprojectID- the project ID- Returns:
- the project by ID
- Throws:
Exception- the exception
-
getRelationshipChain
public Iterator<org.gcube.application.geoportal.common.model.document.relationships.RelationshipNavigationObject> getRelationshipChain(String profileID, String projectID, String relationID, Boolean deep) throws Exception
Gets the relationship chain.- Parameters:
profileID- the profile IDprojectID- the project IDrelationID- the relation IDdeep- the deep- Returns:
- the relationship chain
- Throws:
Exception- the exception
-
getConfiguration
public org.gcube.application.geoportal.common.model.configuration.Configuration getConfiguration(String profileID) throws Exception
Gets the configuration.- Parameters:
profileID- the profile ID- Returns:
- the configuration
- Throws:
Exception- the exception
-
getTotalDocument
public Integer getTotalDocument(String profileID) throws Exception
Gets the total document.- Parameters:
profileID- the profile ID- Returns:
- the total document
- Throws:
Exception- the exception
-
getIDsPhases
public List<String> getIDsPhases(String profileID) throws Exception
Gets the total document.- Parameters:
profileID- the profile ID- Returns:
- the total document
- Throws:
Exception- the exception
-
getPhasesIntoDocumentStoreCollection
public PhaseDV[] getPhasesIntoDocumentStoreCollection(String profileID) throws Exception
Gets the phases into document store collection.- Parameters:
profileID- the profile ID- Returns:
- the phases into document store collection
- Throws:
Exception- the exception
-
performStep
public org.gcube.application.geoportal.common.model.document.Project performStep(String profileID, String projectID, String stepID, org.bson.Document options) throws Exception
Perform step.- Parameters:
profileID- the profile IDprojectID- the project IDstepID- the step IDoptions- the options- Returns:
- the project
- Throws:
Exception- the exception
-
deleteProject
public void deleteProject(String profileID, String projectID, boolean force) throws RemoteException
Delete project.- Parameters:
profileID- the profile IDprojectID- the project IDforce- the force- Throws:
RemoteException- the remote exception
-
updateProject
public org.gcube.application.geoportal.common.model.document.Project updateProject(String profileID, String projectID, org.bson.Document updatedDocument) throws RemoteException
Update project.- Parameters:
profileID- the profile IDprojectID- the project IDupdatedDocument- the updated document- Returns:
- the project
- Throws:
RemoteException- the remote exception
-
createRelationship
public void createRelationship(String fromProfileID, String fromProjectID, String relationshipId, String toProfileID, String toProjectID) throws RemoteException
Creates the relationship.- Parameters:
fromProfileID- the from profile IDfromProjectID- the from project IDrelationshipId- the relationship idtoProfileID- the to profile IDtoProjectID- the to project ID- Throws:
RemoteException- the remote exception
-
deleteRelationship
public void deleteRelationship(String fromProfileID, String fromProjectID, String relationshipId, String toProfileID, String toProjectID) throws RemoteException
Delete relationship.- Parameters:
fromProfileID- the from profile IDfromProjectID- the from project IDrelationshipId- the relationship idtoProfileID- the to profile IDtoProjectID- the to project ID- Throws:
RemoteException- the remote exception
-
deleteFileset
public org.gcube.application.geoportal.common.model.document.Project deleteFileset(String profileID, String projectID, String jsonPathToFileset, Boolean force, Boolean ignoreErrors) throws RemoteException
Delete fileset.- Parameters:
profileID- the profile IDprojectID- the project IDjsonPathToFileset- the json path to filesetforce- the forceignoreErrors- the ignore errors- Returns:
- the project
- Throws:
RemoteException- the remote exception
-
simpleQuery
public Iterator<org.gcube.application.geoportal.common.model.document.Project> simpleQuery(String profileID, org.bson.Document filter) throws Exception
Simple query.- Parameters:
profileID- the profile IDfilter- the filter- Returns:
- the iterator
- Throws:
Exception- the exception
-
queryOnMongo
public Iterator<org.gcube.application.geoportal.common.model.document.Project> queryOnMongo(String profileID, Integer totalItems, Integer offset, Integer limit, SearchingFilter filter) throws Exception
Query on mongo.- Parameters:
profileID- the profile IDtotalItems- the total itemsoffset- the offsetlimit- the limitfilter- the filter- Returns:
- the iterator
- Throws:
Exception- the exception
-
-