Class DefaultDocumentsClient<T extends org.gcube.application.geoportal.common.model.document.Project>

  • 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>
    • 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
      • managedClass

        @NonNull
        protected final @NonNull Class<T extends org.gcube.application.geoportal.common.model.document.Project> managedClass
    • Constructor Detail

      • DefaultDocumentsClient

        public DefaultDocumentsClient()
    • Method Detail

      • getManagedClass

        public Class<T> getManagedClass()
        Specified by:
        getManagedClass in interface org.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:
        createNew in interface org.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:
        deleteById in interface org.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:
        deleteById in interface org.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:
        getById in interface org.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:
        getConfiguration in interface org.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:
        query in interface org.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:
        queryForClass in interface org.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:
        queryForJSON in interface org.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:
        performStep in interface org.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:
        registerFileSet in interface org.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>
        Throws:
        RemoteException
        org.gcube.application.geoportal.common.faults.InvalidRequestException
      • deleteFileSet

        public T deleteFileSet​(String id,
                               String path,
                               Boolean force)
                        throws RemoteException
        Specified by:
        deleteFileSet in interface org.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:
        forceUnlock in interface org.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:
        setAccessPolicy in interface org.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:
        updateDocument in interface org.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:
        setRelation in interface org.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:
        deleteRelation in interface org.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:
        getRelationshipChain in interface org.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:
        getRelationshipChain in interface org.gcube.application.geoportal.common.rest.Projects<T extends org.gcube.application.geoportal.common.model.document.Project>
        Throws:
        RemoteException