Class StorageHubManagement


  • public class StorageHubManagement
    extends Object
    • Field Detail

      • storageHubClient

        protected final org.gcube.common.storagehub.client.dsl.StorageHubClient storageHubClient
      • persitedFile

        protected org.gcube.common.storagehub.client.dsl.FileContainer persitedFile
      • mimeType

        protected String mimeType
    • Constructor Detail

      • StorageHubManagement

        public StorageHubManagement()
    • Method Detail

      • setMetadataMatcher

        public void setMetadataMatcher​(MetadataMatcher checkMetadata)
      • getMimeType

        public String getMimeType()
      • getPersistedFile

        public org.gcube.common.storagehub.client.dsl.FileContainer getPersistedFile()
      • recursiveList

        protected void recursiveList​(org.gcube.common.storagehub.client.dsl.FolderContainer folder,
                                     int level)
                              throws org.gcube.common.storagehub.model.exceptions.StorageHubException
        Throws:
        org.gcube.common.storagehub.model.exceptions.StorageHubException
      • getWorkspaceRoot

        protected org.gcube.common.storagehub.client.dsl.FolderContainer getWorkspaceRoot()
      • getOrCreateFolder

        protected org.gcube.common.storagehub.client.dsl.FolderContainer getOrCreateFolder​(org.gcube.common.storagehub.client.dsl.FolderContainer parent,
                                                                                           String name,
                                                                                           String description,
                                                                                           boolean hidden)
                                                                                    throws Exception
        Throws:
        Exception
      • getContextFolder

        protected org.gcube.common.storagehub.client.dsl.FolderContainer getContextFolder()
                                                                                   throws Exception
        Throws:
        Exception
      • getApplicationFolder

        public org.gcube.common.storagehub.client.dsl.FolderContainer getApplicationFolder()
                                                                                    throws Exception
        Throws:
        Exception
      • getDestinationFolder

        public org.gcube.common.storagehub.client.dsl.FolderContainer getDestinationFolder​(String mimeType)
                                                                                    throws Exception
        Throws:
        Exception
      • checkMetadata

        protected boolean checkMetadata​(org.gcube.common.storagehub.client.dsl.FileContainer fileContainer)
      • logItem

        protected void logItem​(org.gcube.common.storagehub.client.dsl.ItemContainer<? extends org.gcube.common.storagehub.model.items.Item> itemContainer)
      • logItem

        protected void logItem​(org.gcube.common.storagehub.client.dsl.ItemContainer<? extends org.gcube.common.storagehub.model.items.Item> itemContainer,
                               int level)
      • tree

        protected void tree​(org.gcube.common.storagehub.client.dsl.FolderContainer folderContainer)
                     throws Exception
        Throws:
        Exception
      • getPersistedFile

        public org.gcube.common.storagehub.client.dsl.FileContainer getPersistedFile​(String filename,
                                                                                     String mimeType)
                                                                              throws Exception
        Throws:
        Exception