| Modifier and Type | Class and Description |
|---|---|
static class |
WorkspaceStorageHubClientService.WorkspaceStorageHubClientServiceBuilder
The Class WorkspaceStorageHubClientServiceBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canUserWriteIntoFolder(String folderId)
Can user write into folder.
|
void |
changeDescription(String itemId,
String newDescription)
Change description.
|
WorkspaceItem |
copyFile(String itemId,
String folderDestinationId)
Copy file.
|
List<WorkspaceItem> |
copyFileItems(List<String> itemIds,
String folderDestinationId)
Copy file items.
|
WorkspaceFolder |
createFolder(String name,
String description,
String destinationFolderId)
Creates the folder.
|
WorkspaceFolder |
createFolder(String name,
String description,
String destinationFolderId,
Map<String,String> properties)
Creates the folder.
|
WorkspaceItem |
createGcubeItem(String name,
String description,
List<String> scopes,
String creator,
String itemType,
Map<String,String> properties,
String destinationFolderId)
Creates the gcube item.
|
WorkspaceSharedFolder |
createSharedFolder(String name,
String description,
List<String> users,
String destinationFolderId)
Creates the shared folder.
|
URLItem |
createURL(String fileName,
String fileDescription,
String url,
String destinationFolderId)
Creates the URL.
|
WorkspaceVREFolder |
createVREFolder(String scope,
String description,
String displayName,
ACLType privilege)
Creates the VRE folder.
|
void |
deleteItem(String itemId)
Delete item.
|
ItemStreamDescriptor |
downloadFile(String itemId,
String fileName,
String versionName,
String nodeIdsToExclude)
Download file.
|
ItemStreamDescriptor |
downloadFolder(String folderId,
String folderName,
String nodeIdsToExclude)
Download folder.
|
void |
emptyTrash()
Empty trash.
|
boolean |
exists(String name,
String folderId)
Exists.
|
List<WorkspaceItem> |
find(String name,
String folderId)
Find.
|
List<org.gcube.common.storagehub.model.items.nodes.accounting.AccountEntry> |
getAccounting(String itemId)
Gets the accounting.
|
List<? extends WorkspaceItem> |
getChildren(String id)
Gets the children.
|
long |
getDiskUsage()
Gets the disk usage.
|
List<? extends WorkspaceItem> |
getFilteredChildren(String id,
Class<? extends org.gcube.common.storagehub.model.items.Item> aType)
Gets the filtered children.
|
PropertyMap |
getGcubeItemProperties(String gcubeItemId)
Gets the gcube item properties.
|
WorkspaceItem |
getItem(String itemId)
Gets the item.
|
WorkspaceItem |
getItem(String itemId,
boolean withAccounting,
boolean withFileDetails,
boolean withMapProperties)
Gets the item.
|
List<WorkspaceFileVersion> |
getListVersionsForFile(String fileItemId)
Gets the list versions for file.
|
Map<String,Object> |
getMetadata(String itemId)
Gets the metadata.
|
WorkspaceFolder |
getMySpecialFolders()
Gets the my special folders.
|
String |
getOwner()
Gets the owner.
|
List<? extends WorkspaceItem> |
getParentsById(String id)
Gets the parents by id.
|
List<WorkspaceItem> |
getPublicFolders()
Gets the public folders.
|
URL |
getPublicLinkForFile(String fileItemId)
Gets the public link for file.
|
URL |
getPublicLinkForFile(String fileItemId,
String version)
Gets the public link for file.
|
WorkspaceFolder |
getRoot()
Gets the root.
|
WorkspaceItem |
getRootSharedFolder(String itemId)
Gets the root shared folder.
|
List<String> |
getSharedFolderMembers(String folderId)
Gets the shared folder members.
|
StorageHubClientService |
getStorageHubClientService()
Gets the storage hub client service.
|
ItemStreamDescriptor |
getThumbnailData(String itemId)
Gets the thumbnail data.
|
long |
getTotalItems()
Gets the total items.
|
WorkspaceItem |
getTrash()
Gets the trash.
|
String |
getVREFoldersId()
Gets the VRE folders id.
|
boolean |
isItemShared(String itemId)
Checks if is item shared.
|
boolean |
isWithAccounting()
Checks if is with accounting.
|
boolean |
isWithFileDetails()
Checks if is with file details.
|
boolean |
isWithMapProperties()
Checks if is with map properties.
|
WorkspaceItem |
moveItem(String itemId,
String folderDestinationId)
Move item.
|
List<WorkspaceItem> |
moveItems(List<String> itemIds,
String folderDestinationId)
Move items.
|
Map<String,String> |
removeItems(String... id)
Removes the items.
|
WorkspaceItem |
renameItem(String itemId,
String newName)
Rename item.
|
WorkspaceItem |
restoreThrashItem(String itemId)
Restore thrash item.
|
List<WorkspaceItem> |
search(String text,
String folderId)
Search.
|
List<WorkspaceItem> |
searchByMimeType(String mimeType)
Search by mime type.
|
List<WorkspaceItem> |
searchByProperties(List<String> properties)
Search by properties.
|
boolean |
setFolderAsPublic(String folderId,
boolean setPublic)
Sets the folder as public.
|
WorkspaceSharedFolder |
share(List<String> users,
String itemId)
Share.
|
WorkspaceSharedFolder |
shareFolder(List<String> users,
String destinationFolderId)
Share folder.
|
WorkspaceItem |
unshare(String itemId)
Unshare.
|
void |
updateMetadata(String itemId,
Map<String,Object> mapObjs)
Update metadata.
|
WorkspaceItem |
uploadArchive(String folderId,
InputStream is,
String extractionFolderName)
Upload archive.
|
WorkspaceItem |
uploadFile(String folderId,
InputStream is,
String fileName,
String fileDescription)
Upload file.
|
public StorageHubClientService getStorageHubClientService()
public boolean isWithAccounting()
public boolean isWithFileDetails()
public boolean isWithMapProperties()
public String getOwner() throws InternalErrorException, Exception
getOwner in interface WorkspaceInternalErrorException - the internal error exceptionException - the exceptionpublic WorkspaceFolder getRoot() throws InternalErrorException, Exception
getRoot in interface WorkspaceInternalErrorException - the internal error exceptionException - the exceptionpublic List<? extends WorkspaceItem> getChildren(String id) throws Exception
getChildren in interface Workspaceid - the idException - the exceptionpublic List<? extends WorkspaceItem> getFilteredChildren(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> aType) throws Exception
getFilteredChildren in interface Workspaceid - the idaType - the a typeException - the exceptionpublic List<? extends WorkspaceItem> getParentsById(String id) throws InternalErrorException, Exception
getParentsById in interface Workspaceid - the idInternalErrorException - the internal error exceptionException - the exceptionpublic WorkspaceFolder createFolder(String name, String description, String destinationFolderId) throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException
createFolder in interface Workspacename - the namedescription - the descriptiondestinationFolderId - the destination folder idInternalErrorException - the internal error exceptionInsufficientPrivilegesException - the insufficient privileges exceptionItemAlreadyExistException - the item already exist exceptionWrongDestinationException - the wrong destination exceptionItemNotFoundException - the item not found exceptionWorkspaceFolderNotFoundException - the workspace folder not found exceptionpublic WorkspaceItem getItem(String itemId) throws ItemNotFoundException, InternalErrorException, Exception
getItem in interface WorkspaceitemId - the item idItemNotFoundException - the item not found exceptionInternalErrorException - the internal error exceptionException - the exceptionpublic WorkspaceItem getItem(String itemId, boolean withAccounting, boolean withFileDetails, boolean withMapProperties) throws ItemNotFoundException, InternalErrorException, Exception
getItem in interface WorkspaceitemId - the item idwithAccounting - the with accountingwithFileDetails - the with file detailswithMapProperties - the with map propertiesItemNotFoundException - the item not found exceptionInternalErrorException - the internal error exceptionException - the exceptionpublic WorkspaceFolder createFolder(String name, String description, String destinationFolderId, Map<String,String> properties) throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException
createFolder in interface Workspacename - the namedescription - the descriptiondestinationFolderId - the destination folder idproperties - the propertiesInternalErrorException - the internal error exceptionInsufficientPrivilegesException - the insufficient privileges exceptionItemAlreadyExistException - the item already exist exceptionWrongDestinationException - the wrong destination exceptionItemNotFoundException - the item not found exceptionWorkspaceFolderNotFoundException - the workspace folder not found exceptionpublic WorkspaceItem uploadFile(String folderId, InputStream is, String fileName, String fileDescription) throws Exception
uploadFile in interface WorkspacefolderId - the folder idis - the isfileName - the file namefileDescription - the file descriptionException - the exceptionpublic List<String> getSharedFolderMembers(String folderId) throws Exception
getSharedFolderMembers in interface WorkspacefolderId - the folder idException - the exceptionpublic boolean exists(String name, String folderId) throws InternalErrorException, ItemNotFoundException, WrongItemTypeException
exists in interface Workspacename - the namefolderId - the folder idInternalErrorException - the internal error exceptionItemNotFoundException - the item not found exceptionWrongItemTypeException - the wrong item type exceptionpublic List<WorkspaceItem> find(String name, String folderId) throws InternalErrorException, ItemNotFoundException, WrongItemTypeException
find in interface Workspacename - the namefolderId - the folder idInternalErrorException - the internal error exceptionItemNotFoundException - the item not found exceptionWrongItemTypeException - the wrong item type exceptionpublic List<WorkspaceItem> search(String text, String folderId) throws InternalErrorException, ItemNotFoundException, WrongItemTypeException
search in interface Workspacetext - the textfolderId - the folder id where searchingInternalErrorException - the internal error exceptionItemNotFoundException - the item not found exceptionWrongItemTypeException - the wrong item type exceptionpublic WorkspaceItem getRootSharedFolder(String itemId) throws Exception
getRootSharedFolder in interface WorkspaceitemId - the item idException - the exceptionpublic void deleteItem(String itemId) throws Exception
deleteItem in interface WorkspaceitemId - the item idException - the exceptionpublic Map<String,String> removeItems(String... id) throws ItemNotFoundException, InternalErrorException, InsufficientPrivilegesException
removeItems in interface Workspaceid - the idItemNotFoundException - the item not found exceptionInternalErrorException - the internal error exceptionInsufficientPrivilegesException - the insufficient privileges exceptionpublic WorkspaceItem uploadArchive(String folderId, InputStream is, String extractionFolderName) throws Exception
uploadArchive in interface WorkspacefolderId - the folder idis - the isextractionFolderName - the extraction folder nameException - the exceptionpublic boolean isItemShared(String itemId) throws Exception
isItemShared in interface WorkspaceitemId - the item idException - the exceptionpublic String getVREFoldersId() throws Exception
getVREFoldersId in interface WorkspaceException - the exceptionpublic WorkspaceItem getTrash() throws Exception
public void emptyTrash()
throws Exception
emptyTrash in interface WorkspaceException - the exceptionpublic WorkspaceItem restoreThrashItem(String itemId) throws Exception
restoreThrashItem in interface WorkspaceitemId - the item idException - the exceptionpublic ItemStreamDescriptor downloadFile(String itemId, String fileName, String versionName, String nodeIdsToExclude) throws Exception
downloadFile in interface WorkspaceitemId - the item idfileName - the file nameversionName - the version namenodeIdsToExclude - the node ids to excludeException - the exceptionpublic ItemStreamDescriptor downloadFolder(String folderId, String folderName, String nodeIdsToExclude) throws Exception
downloadFolder in interface WorkspacefolderId - the folder idfolderName - the folder namenodeIdsToExclude - the node ids to excludeException - the exceptionpublic List<WorkspaceItem> moveItems(List<String> itemIds, String folderDestinationId) throws ItemNotFoundException, WrongDestinationException, InsufficientPrivilegesException, InternalErrorException, ItemAlreadyExistException, Exception
moveItems in interface WorkspaceitemIds - the item idsfolderDestinationId - the folder destination idItemNotFoundException - the item not found exceptionWrongDestinationException - the wrong destination exceptionInsufficientPrivilegesException - the insufficient privileges exceptionInternalErrorException - the internal error exceptionItemAlreadyExistException - the item already exist exceptionException - the exceptionpublic List<WorkspaceItem> copyFileItems(List<String> itemIds, String folderDestinationId) throws ItemNotFoundException, WrongDestinationException, InternalErrorException, ItemAlreadyExistException, InsufficientPrivilegesException, Exception
copyFileItems in interface WorkspaceitemIds - the item idsfolderDestinationId - the folder destination idItemNotFoundException - the item not found exceptionWrongDestinationException - the wrong destination exceptionInternalErrorException - the internal error exceptionItemAlreadyExistException - the item already exist exceptionInsufficientPrivilegesException - the insufficient privileges exceptionException - the exceptionpublic WorkspaceItem copyFile(String itemId, String folderDestinationId) throws ItemNotFoundException, WrongDestinationException, InternalErrorException, ItemAlreadyExistException, InsufficientPrivilegesException, Exception
copyFile in interface WorkspaceitemId - the item idfolderDestinationId - the folder destination idItemNotFoundException - the item not found exceptionWrongDestinationException - the wrong destination exceptionInternalErrorException - the internal error exceptionItemAlreadyExistException - the item already exist exceptionInsufficientPrivilegesException - the insufficient privileges exceptionException - the exceptionpublic WorkspaceItem moveItem(String itemId, String folderDestinationId) throws ItemNotFoundException, WrongDestinationException, InsufficientPrivilegesException, ItemAlreadyExistException, InternalErrorException, Exception
moveItem in interface WorkspaceitemId - the item idfolderDestinationId - the folder destination idItemNotFoundException - the item not found exceptionWrongDestinationException - the wrong destination exceptionInsufficientPrivilegesException - the insufficient privileges exceptionItemAlreadyExistException - the item already exist exceptionInternalErrorException - the internal error exceptionException - the exceptionpublic WorkspaceItem renameItem(String itemId, String newName) throws ItemNotFoundException, InternalErrorException, ItemAlreadyExistException, InsufficientPrivilegesException, Exception
renameItem in interface WorkspaceitemId - the item idnewName - the new nameItemNotFoundException - the item not found exceptionInternalErrorException - the internal error exceptionItemAlreadyExistException - the item already exist exceptionInsufficientPrivilegesException - the insufficient privileges exceptionException - the exceptionpublic URL getPublicLinkForFile(String fileItemId) throws Exception
getPublicLinkForFile in interface WorkspacefileItemId - the file item idException - the exceptionpublic URL getPublicLinkForFile(String fileItemId, String version) throws Exception
getPublicLinkForFile in interface WorkspacefileItemId - the file item idversion - the versionException - the exceptionpublic List<WorkspaceFileVersion> getListVersionsForFile(String fileItemId) throws Exception
getListVersionsForFile in interface WorkspacefileItemId - the file item idException - the exceptionpublic ItemStreamDescriptor getThumbnailData(String itemId) throws Exception
getThumbnailData in interface WorkspaceitemId - the item idException - the exceptionpublic Map<String,Object> getMetadata(String itemId) throws Exception
getMetadata in interface WorkspaceitemId - the item idException - the exceptionpublic long getTotalItems()
throws Exception
getTotalItems in interface WorkspaceException - the exceptionpublic long getDiskUsage()
throws Exception
getDiskUsage in interface WorkspaceException - the exceptionpublic List<org.gcube.common.storagehub.model.items.nodes.accounting.AccountEntry> getAccounting(String itemId) throws Exception
getAccounting in interface WorkspaceitemId - the item idException - the exceptionpublic PropertyMap getGcubeItemProperties(String gcubeItemId) throws Exception
getGcubeItemProperties in interface WorkspacegcubeItemId - the gcube item idException - the exceptionpublic void updateMetadata(String itemId, Map<String,Object> mapObjs) throws Exception
updateMetadata in interface WorkspaceitemId - the item idmapObjs - the map objsException - the exceptionpublic URLItem createURL(String fileName, String fileDescription, String url, String destinationFolderId) throws Exception
public boolean setFolderAsPublic(String folderId, boolean setPublic) throws Exception
setFolderAsPublic in interface WorkspacefolderId - the folder idsetPublic - the set publicException - the exceptionpublic boolean canUserWriteIntoFolder(String folderId) throws Exception
canUserWriteIntoFolder in interface WorkspacefolderId - the folder idException - the exceptionpublic void changeDescription(String itemId, String newDescription) throws ItemNotFoundException, InternalErrorException
changeDescription in interface WorkspaceitemId - the item idnewDescription - the new descriptionItemNotFoundException - the item not found exceptionInternalErrorException - the internal error exceptionpublic List<WorkspaceItem> searchByMimeType(String mimeType) throws InternalErrorException
searchByMimeType in interface WorkspacemimeType - the mime typeInternalErrorException - the internal error exceptionpublic WorkspaceSharedFolder createSharedFolder(String name, String description, List<String> users, String destinationFolderId) throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException
createSharedFolder in interface Workspacename - the namedescription - the descriptionusers - the usersdestinationFolderId - the destination folder idInternalErrorException - the internal error exceptionInsufficientPrivilegesException - the insufficient privileges exceptionItemAlreadyExistException - the item already exist exceptionWrongDestinationException - the wrong destination exceptionItemNotFoundException - the item not found exceptionWorkspaceFolderNotFoundException - the workspace folder not found exceptionpublic WorkspaceSharedFolder shareFolder(List<String> users, String destinationFolderId) throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException
shareFolder in interface Workspaceusers - the usersdestinationFolderId - the destination folder idInternalErrorException - the internal error exceptionInsufficientPrivilegesException - the insufficient privileges exceptionItemAlreadyExistException - the item already exist exceptionWrongDestinationException - the wrong destination exceptionItemNotFoundException - the item not found exceptionWorkspaceFolderNotFoundException - the workspace folder not found exceptionpublic WorkspaceSharedFolder share(List<String> users, String itemId) throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException
share in interface Workspaceusers - the usersitemId - the item idInternalErrorException - the internal error exceptionInsufficientPrivilegesException - the insufficient privileges exceptionItemAlreadyExistException - the item already exist exceptionWrongDestinationException - the wrong destination exceptionItemNotFoundException - the item not found exceptionWorkspaceFolderNotFoundException - the workspace folder not found exceptionpublic WorkspaceItem createGcubeItem(String name, String description, List<String> scopes, String creator, String itemType, Map<String,String> properties, String destinationFolderId) throws InsufficientPrivilegesException, WorkspaceFolderNotFoundException, InternalErrorException, ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException
createGcubeItem in interface Workspacename - the namedescription - the descriptionscopes - the scopescreator - the creatoritemType - the item typeproperties - the propertiesdestinationFolderId - the destination folder idInsufficientPrivilegesException - the insufficient privileges exceptionWorkspaceFolderNotFoundException - the workspace folder not found exceptionInternalErrorException - the internal error exceptionItemAlreadyExistException - the item already exist exceptionWrongDestinationException - the wrong destination exceptionItemNotFoundException - the item not found exceptionpublic WorkspaceItem unshare(String itemId) throws InternalErrorException, ItemNotFoundException
unshare in interface WorkspaceitemId - the item idInternalErrorException - the internal error exceptionItemNotFoundException - the item not found exceptionpublic WorkspaceFolder getMySpecialFolders() throws InternalErrorException, ItemNotFoundException
getMySpecialFolders in interface WorkspaceInternalErrorException - the internal error exceptionItemNotFoundException - the item not found exceptionpublic List<WorkspaceItem> searchByProperties(List<String> properties) throws InternalErrorException
searchByProperties in interface Workspaceproperties - the propertiesInternalErrorException - the internal error exceptionpublic WorkspaceVREFolder createVREFolder(String scope, String description, String displayName, ACLType privilege) throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException
createVREFolder in interface Workspacescope - the scopedescription - the descriptiondisplayName - the display nameprivilege - the privilegeInternalErrorException - the internal error exceptionInsufficientPrivilegesException - the insufficient privileges exceptionItemAlreadyExistException - the item already exist exceptionWrongDestinationException - the wrong destination exceptionItemNotFoundException - the item not found exceptionWorkspaceFolderNotFoundException - the workspace folder not found exceptionpublic List<WorkspaceItem> getPublicFolders() throws InternalErrorException
getPublicFolders in interface WorkspaceInternalErrorException - the internal error exceptionCopyright © 2020. All Rights Reserved.