Class DefaultDocumentsClient<T extends org.gcube.application.geoportal.common.model.document.Project>
- java.lang.Object
-
- org.gcube.application.geoportal.client.DefaultDocumentsClient<T>
-
- All Implemented Interfaces:
org.gcube.application.geoportal.common.rest.Projects<T>
public class DefaultDocumentsClient<T extends org.gcube.application.geoportal.common.model.document.Project> extends Object implements org.gcube.application.geoportal.common.rest.Projects<T>
-
-
Constructor Summary
Constructors Constructor Description DefaultDocumentsClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TcreateNew(org.bson.Document toCreate)voiddeleteById(String id)voiddeleteById(String id, Boolean force)TdeleteFileSet(String id, String path, Boolean force)org.gcube.application.geoportal.common.model.document.ProjectdeleteRelation(org.gcube.application.geoportal.common.model.rest.DeleteRelationshipRequest request)TforceUnlock(String id)TgetById(String id)org.gcube.application.geoportal.common.model.configuration.ConfigurationgetConfiguration()Class<T>getManagedClass()Iterator<org.gcube.application.geoportal.common.model.document.relationships.RelationshipNavigationObject>getRelationshipChain(String id, String relationId)Iterator<org.gcube.application.geoportal.common.model.document.relationships.RelationshipNavigationObject>getRelationshipChain(String id, String relationId, Boolean deep)TperformStep(String id, org.gcube.application.geoportal.common.model.rest.StepExecutionRequest request)Iterator<T>query(org.gcube.application.geoportal.common.model.rest.QueryRequest request)<C> Iterator<C>queryForClass(org.gcube.application.geoportal.common.model.rest.QueryRequest request, Class<C> clazz)StringqueryForJSON(org.gcube.application.geoportal.common.model.rest.QueryRequest request)TregisterFileSet(String id, org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest req)TsetAccessPolicy(String id, org.gcube.application.geoportal.common.model.document.access.Access toSet)org.gcube.application.geoportal.common.model.document.ProjectsetRelation(org.gcube.application.geoportal.common.model.rest.CreateRelationshipRequest request)TupdateDocument(String id, org.bson.Document updatedDocument)
-
-
-
Field Detail
-
delegate
@NonNull protected final @NonNull org.gcube.common.clients.delegates.ProxyDelegate<javax.ws.rs.client.WebTarget> delegate
-
profileID
@NonNull protected final @NonNull String profileID
-
-
Method Detail
-
getManagedClass
public Class<T> getManagedClass()
- Specified by:
getManagedClassin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>
-
createNew
public T createNew(org.bson.Document toCreate) throws RemoteException
- Specified by:
createNewin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
deleteById
public void deleteById(String id) throws RemoteException
- Specified by:
deleteByIdin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
deleteById
public void deleteById(String id, Boolean force) throws RemoteException
- Specified by:
deleteByIdin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
getById
public T getById(String id) throws RemoteException
- Specified by:
getByIdin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
getConfiguration
public org.gcube.application.geoportal.common.model.configuration.Configuration getConfiguration() throws RemoteException- Specified by:
getConfigurationin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
query
public Iterator<T> query(org.gcube.application.geoportal.common.model.rest.QueryRequest request) throws RemoteException
- Specified by:
queryin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
queryForClass
public <C> Iterator<C> queryForClass(org.gcube.application.geoportal.common.model.rest.QueryRequest request, Class<C> clazz) throws RemoteException
- Specified by:
queryForClassin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
queryForJSON
public String queryForJSON(org.gcube.application.geoportal.common.model.rest.QueryRequest request) throws RemoteException
- Specified by:
queryForJSONin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
performStep
public T performStep(String id, org.gcube.application.geoportal.common.model.rest.StepExecutionRequest request) throws RemoteException
- Specified by:
performStepin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
registerFileSet
public T registerFileSet(String id, org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest req) throws RemoteException, org.gcube.application.geoportal.common.faults.InvalidRequestException
- Specified by:
registerFileSetin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteExceptionorg.gcube.application.geoportal.common.faults.InvalidRequestException
-
deleteFileSet
public T deleteFileSet(String id, String path, Boolean force) throws RemoteException
- Specified by:
deleteFileSetin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
forceUnlock
public T forceUnlock(String id) throws RemoteException
- Specified by:
forceUnlockin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
setAccessPolicy
public T setAccessPolicy(String id, org.gcube.application.geoportal.common.model.document.access.Access toSet) throws RemoteException
- Specified by:
setAccessPolicyin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
updateDocument
public T updateDocument(String id, org.bson.Document updatedDocument) throws RemoteException
- Specified by:
updateDocumentin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
setRelation
public org.gcube.application.geoportal.common.model.document.Project setRelation(org.gcube.application.geoportal.common.model.rest.CreateRelationshipRequest request) throws RemoteException- Specified by:
setRelationin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
deleteRelation
public org.gcube.application.geoportal.common.model.document.Project deleteRelation(org.gcube.application.geoportal.common.model.rest.DeleteRelationshipRequest request) throws RemoteException- Specified by:
deleteRelationin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
getRelationshipChain
public Iterator<org.gcube.application.geoportal.common.model.document.relationships.RelationshipNavigationObject> getRelationshipChain(String id, String relationId) throws RemoteException
- Specified by:
getRelationshipChainin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
getRelationshipChain
public Iterator<org.gcube.application.geoportal.common.model.document.relationships.RelationshipNavigationObject> getRelationshipChain(String id, String relationId, Boolean deep) throws RemoteException
- Specified by:
getRelationshipChainin interfaceorg.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>- Throws:
RemoteException
-
-