Class WorkspaceManager


  • public class WorkspaceManager
    extends Object
    • Constructor Detail

      • WorkspaceManager

        public WorkspaceManager()
                         throws org.gcube.application.geoportal.common.model.rest.ConfigurationException,
                                org.gcube.common.storagehub.model.exceptions.StorageHubException
        Throws:
        org.gcube.application.geoportal.common.model.rest.ConfigurationException
        org.gcube.common.storagehub.model.exceptions.StorageHubException
    • Method Detail

      • getConfiguration

        public org.gcube.application.geoportal.common.model.configuration.Archive getConfiguration()
      • createFolder

        public org.gcube.common.storagehub.client.dsl.FolderContainer createFolder​(WorkspaceManager.FolderOptions opts)
                                                                            throws org.gcube.common.storagehub.model.exceptions.StorageHubException
        Throws:
        org.gcube.common.storagehub.model.exceptions.StorageHubException
      • getFileById

        public org.gcube.common.storagehub.client.dsl.FileContainer getFileById​(String id)
                                                                         throws org.gcube.common.storagehub.model.exceptions.StorageHubException
        Throws:
        org.gcube.common.storagehub.model.exceptions.StorageHubException
      • getFolderById

        public org.gcube.common.storagehub.client.dsl.FolderContainer getFolderById​(String id)
                                                                             throws org.gcube.common.storagehub.model.exceptions.StorageHubException
        Throws:
        org.gcube.common.storagehub.model.exceptions.StorageHubException
      • removeFolderById

        public void removeFolderById​(String id)
                              throws org.gcube.common.storagehub.model.exceptions.StorageHubException
        Throws:
        org.gcube.common.storagehub.model.exceptions.StorageHubException
      • getSubFolder

        public org.gcube.common.storagehub.client.dsl.FolderContainer getSubFolder​(org.gcube.common.storagehub.client.dsl.FolderContainer parentFolder,
                                                                                   String path)
                                                                            throws org.gcube.common.storagehub.model.exceptions.StorageHubException
        Throws:
        org.gcube.common.storagehub.model.exceptions.StorageHubException
      • getSubFolder

        public org.gcube.common.storagehub.client.dsl.FolderContainer getSubFolder​(org.gcube.common.storagehub.client.dsl.FolderContainer parentFolder,
                                                                                   String path,
                                                                                   String description)
                                                                            throws org.gcube.common.storagehub.model.exceptions.StorageHubException
        Returns sub folder. Creates it if missing
        Parameters:
        parentFolder -
        path -
        Returns:
        Throws:
        org.gcube.common.storagehub.model.exceptions.StorageHubException
      • registerFile

        public org.gcube.application.geoportal.common.model.document.filesets.RegisteredFile registerFile​(WorkspaceManager.FileOptions opts)
                                                                                                   throws org.gcube.common.storagehub.model.exceptions.StorageHubException
        Throws:
        org.gcube.common.storagehub.model.exceptions.StorageHubException
      • deleteItem

        public void deleteItem​(String itemId)
                        throws org.gcube.common.storagehub.model.exceptions.StorageHubException
        Throws:
        org.gcube.common.storagehub.model.exceptions.StorageHubException
      • getApplicationBaseFolder

        public static org.gcube.common.storagehub.client.dsl.FolderContainer getApplicationBaseFolder​(org.gcube.common.storagehub.client.dsl.StorageHubClient sgClient)
                                                                                               throws org.gcube.common.storagehub.model.exceptions.StorageHubException
        Throws:
        org.gcube.common.storagehub.model.exceptions.StorageHubException