Package org.gcube.storagehub
Class StorageHubManagement
- java.lang.Object
-
- org.gcube.storagehub.StorageHubManagement
-
public class StorageHubManagement extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected MetadataMatchermetadataMatcherprotected StringmimeTypeprotected org.gcube.common.storagehub.client.dsl.FileContainerpersitedFileprotected org.gcube.common.storagehub.client.dsl.StorageHubClientstorageHubClient
-
Constructor Summary
Constructors Constructor Description StorageHubManagement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckMetadata(org.gcube.common.storagehub.client.dsl.FileContainer fileContainer)org.gcube.common.storagehub.client.dsl.FolderContainergetApplicationFolder()protected org.gcube.common.storagehub.client.dsl.FolderContainergetContextFolder()org.gcube.common.storagehub.client.dsl.FolderContainergetDestinationFolder(String mimeType)StringgetMimeType()protected org.gcube.common.storagehub.client.dsl.FolderContainergetOrCreateFolder(org.gcube.common.storagehub.client.dsl.FolderContainer parent, String name, String description, boolean hidden)org.gcube.common.storagehub.client.dsl.FileContainergetPersistedFile()org.gcube.common.storagehub.client.dsl.FileContainergetPersistedFile(String filename, String mimeType)protected org.gcube.common.storagehub.client.dsl.FolderContainergetWorkspaceRoot()protected voidlogItem(org.gcube.common.storagehub.client.dsl.ItemContainer<? extends org.gcube.common.storagehub.model.items.Item> itemContainer)protected voidlogItem(org.gcube.common.storagehub.client.dsl.ItemContainer<? extends org.gcube.common.storagehub.model.items.Item> itemContainer, int level)URLpersistFile(InputStream inputStream, String fileName, String mimeType)protected voidrecursiveList(org.gcube.common.storagehub.client.dsl.FolderContainer folder, int level)voidremovePersistedFile(String filename, String mimeType)voidsetMetadataMatcher(MetadataMatcher checkMetadata)protected voidtree(org.gcube.common.storagehub.client.dsl.FolderContainer folderContainer)
-
-
-
Field Detail
-
metadataMatcher
protected MetadataMatcher metadataMatcher
-
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
-
-
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
-
persistFile
public URL persistFile(InputStream inputStream, String fileName, String mimeType) throws Exception
- Throws:
Exception
-
getPersistedFile
public org.gcube.common.storagehub.client.dsl.FileContainer getPersistedFile(String filename, String mimeType) throws Exception
- Throws:
Exception
-
-