Class WorkspaceManager
- java.lang.Object
-
- org.gcube.application.cms.implementations.WorkspaceManager
-
public class WorkspaceManager extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWorkspaceManager.FileOptionsstatic classWorkspaceManager.FolderOptions
-
Constructor Summary
Constructors Constructor Description WorkspaceManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.gcube.common.storagehub.client.dsl.FolderContainercreateFolder(WorkspaceManager.FolderOptions opts)voiddeleteItem(String itemId)static org.gcube.common.storagehub.client.dsl.FolderContainergetApplicationBaseFolder(org.gcube.common.storagehub.client.dsl.StorageHubClient sgClient)org.gcube.application.geoportal.common.model.configuration.ArchivegetConfiguration()org.gcube.common.storagehub.client.dsl.FileContainergetFileById(String id)org.gcube.common.storagehub.client.dsl.FolderContainergetFolderById(String id)org.gcube.common.storagehub.client.dsl.FolderContainergetSubFolder(org.gcube.common.storagehub.client.dsl.FolderContainer parentFolder, String path)org.gcube.common.storagehub.client.dsl.FolderContainergetSubFolder(org.gcube.common.storagehub.client.dsl.FolderContainer parentFolder, String path, String description)Returns sub folder.org.gcube.application.geoportal.common.model.document.filesets.RegisteredFileregisterFile(WorkspaceManager.FileOptions opts)voidremoveFolderById(String id)
-
-
-
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.ConfigurationExceptionorg.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.StorageHubExceptionReturns 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
-
-