Class DefaultItemManager

java.lang.Object
org.gcube.common.storagehub.client.proxies.DefaultManagerClient
org.gcube.common.storagehub.client.proxies.DefaultItemManager
All Implemented Interfaces:
ItemManagerClient, ManagerClient

public class DefaultItemManager extends DefaultManagerClient implements ItemManagerClient
  • Constructor Details

    • DefaultItemManager

      public DefaultItemManager(org.gcube.common.clients.delegates.ProxyDelegate<org.gcube.common.gxrest.request.GXWebTargetAdapterRequest> delegate)
  • Method Details

    • resolvePublicLink

      public StreamDescriptor resolvePublicLink(String identifier) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      resolvePublicLink in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getChildren

      @Deprecated public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Deprecated.
      Specified by:
      getChildren in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getChildren

      public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, boolean showHidden, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getChildren in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getChildren

      public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, int start, int limit, boolean showHidden, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getChildren in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getChildren

      public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, int start, int limit, boolean showHidden, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getChildren in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getChildren

      @Deprecated public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Deprecated.
      Specified by:
      getChildren in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getChildren

      public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, boolean showHidden, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getChildren in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • search

      public List<? extends org.gcube.common.storagehub.model.items.Item> search(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, boolean showHidden, boolean excludeTrashed, String nameToMatch, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      search in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • childrenCount

      @Deprecated public Integer childrenCount(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Deprecated.
      Specified by:
      childrenCount in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • childrenCount

      public Integer childrenCount(String id, boolean showHidden, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      childrenCount in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • childrenCount

      @Deprecated public Integer childrenCount(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Deprecated.
      Specified by:
      childrenCount in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • childrenCount

      public Integer childrenCount(String id, boolean showHidden) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      childrenCount in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • download

      public StreamDescriptor download(String id, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      download in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • downloadSpecificVersion

      public StreamDescriptor downloadSpecificVersion(String id, String version) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      downloadSpecificVersion in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getFileVersions

      public List<org.gcube.common.storagehub.model.service.Version> getFileVersions(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getFileVersions in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • deleteFileVersion

      public void deleteFileVersion(String id, String versionName) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      deleteFileVersion in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • get

      public org.gcube.common.storagehub.model.items.Item get(String id, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      get in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getFolderInfo

      public org.gcube.common.storagehub.model.types.FolderInfoType getFolderInfo(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getFolderInfo in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getByRelativePath

      public org.gcube.common.storagehub.model.items.Item getByRelativePath(String id, String path, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getByRelativePath in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getRootSharedFolder

      public org.gcube.common.storagehub.model.items.Item getRootSharedFolder(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getRootSharedFolder in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getPublickLink

      public URL getPublickLink(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getPublickLink in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getPublickLink

      public URL getPublickLink(String id, String version) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getPublickLink in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • findChildrenByNamePattern

      public List<? extends org.gcube.common.storagehub.model.items.Item> findChildrenByNamePattern(String id, String name, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      findChildrenByNamePattern in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • uploadFile

      @Deprecated public String uploadFile(InputStream stream, String parentId, String fileName, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Deprecated.
      Specified by:
      uploadFile in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • uploadFile

      public String uploadFile(InputStream stream, String parentId, String fileName, String description, long contentLength) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      uploadFile in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • uploadFile

      public String uploadFile(File file, String parentId, String fileName, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      uploadFile in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • uploadFile

      public String uploadFile(URI uri, String parentId, String fileName, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      uploadFile in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • uploadArchive

      public String uploadArchive(InputStream stream, String parentId, String extractionFolderName, long contentLength) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      uploadArchive in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • uploadArchive

      public String uploadArchive(InputStream stream, String parentId, String extractionFolderName) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      uploadArchive in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • createFolder

      @Deprecated public String createFolder(String parentId, String name, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Deprecated.
      Specified by:
      createFolder in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • createFolder

      public String createFolder(String parentId, String name, String description, boolean hidden, String pluginName, org.gcube.common.storagehub.model.plugins.PluginParameters parameters) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      createFolder in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • createFolder

      public String createFolder(String parentId, String name, String description, boolean hidden) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      createFolder in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • createURL

      public String createURL(String parentId, String name, String description, URL url) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      createURL in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • createGcubeItem

      public String createGcubeItem(String parentId, org.gcube.common.storagehub.model.items.GCubeItem item) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      createGcubeItem in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • shareFolder

      public String shareFolder(String id, Set<String> users, org.gcube.common.storagehub.model.acls.AccessType accessType) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      shareFolder in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • unshareFolder

      public String unshareFolder(String id, Set<String> users) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      unshareFolder in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • delete

      @Deprecated public void delete(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Deprecated.
      Specified by:
      delete in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • delete

      public void delete(String id, boolean force) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      delete in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getAnchestors

      public List<? extends org.gcube.common.storagehub.model.items.Item> getAnchestors(String id, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getAnchestors in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • getACL

      public List<org.gcube.common.storagehub.model.acls.ACL> getACL(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      getACL in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • canWriteInto

      public boolean canWriteInto(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      canWriteInto in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • changeACL

      public String changeACL(String id, String user, org.gcube.common.storagehub.model.acls.AccessType accessType) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      changeACL in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • removeAdmin

      public String removeAdmin(String id, String user) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      removeAdmin in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • copy

      public String copy(String id, String destinationFolderId, String newFilename) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      copy in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • setPublic

      public String setPublic(String id, boolean publish) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      setPublic in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • move

      public String move(String id, String destinationFolderId) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      move in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • rename

      public String rename(String id, String newName) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      rename in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • setHidden

      public String setHidden(String id, Boolean value) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      setHidden in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • setDescription

      public String setDescription(String id, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      setDescription in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException
    • setMetadata

      public String setMetadata(String id, org.gcube.common.storagehub.model.Metadata metadata) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
      Specified by:
      setMetadata in interface ItemManagerClient
      Throws:
      org.gcube.common.storagehub.model.exceptions.StorageHubException