| 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.
|
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.
|
URLItem |
createURL(String fileName,
String fileDescription,
String url,
String destinationFolderId)
Creates the URL.
|
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.
|
List<? extends WorkspaceItem> |
getChildren(String id,
boolean includeHidden)
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.
|
WorkspaceItem |
getItemByPath(String folderId,
String relativePath) |
WorkspaceItem |
getItemForExplorer(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.
|
String |
getOwner()
Gets the owner.
|
List<? extends WorkspaceItem> |
getParentsById(String id)
Gets the parents by id.
|
List<? extends WorkspaceItem> |
getParentsForExplorerById(String id)
Gets the parents for explorer by id.
|
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,
String destinationFolderId)
Restore thrash item.
|
List<WorkspaceItem> |
search(String text,
String folderId)
Search.
|
void |
setFolderAsHidden(String folderId,
boolean hide)
Sets the Folder As Hidden or visible .
|
boolean |
setFolderAsPublic(String folderId,
boolean setPublic)
Sets the folder as public.
|
WorkspaceSharedFolder |
shareFolder(String folderId,
Set<String> users,
ACLType type) |
WorkspaceSharedFolder |
unshareFolder(String folderId,
Set<String> users) |
String |
updateDescriptionForItem(String itemId,
String newDescription)
Update description for item.
|
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> getChildren(String id, boolean includeHidden) 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 List<? extends WorkspaceItem> getParentsForExplorerById(String id) throws InternalErrorException, Exception
getParentsById(String)
except to getRoot called inside (to check if a parent is root or not). WorkspaceItem.isRoot() returns always false.getParentsForExplorerById 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 WorkspaceItem getItemByPath(String folderId, String relativePath) throws ItemNotFoundException, InternalErrorException, Exception
getItemByPath in interface WorkspaceItemNotFoundException - if the item has not been found.InternalErrorException - the internal error exceptionException - the exceptionpublic WorkspaceItem getItemForExplorer(String itemId, boolean withAccounting, boolean withFileDetails, boolean withMapProperties) throws ItemNotFoundException, InternalErrorException, Exception
getItem(String, boolean, boolean, boolean)
except to getRoot called inside (to check if an item is root or not). WorkspaceItem.isRoot() returns always false.getItemForExplorer 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, String destinationFolderId) throws Exception
restoreThrashItem in interface WorkspaceitemId - the item iddestinationFolderId - the destination folder 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 String updateDescriptionForItem(String itemId, String newDescription) throws Exception
WorkspaceupdateDescriptionForItem in interface WorkspaceitemId - the item idnewDescription - the new descriptionException - the exceptionpublic void setFolderAsHidden(String folderId, boolean hide) throws Exception
WorkspacesetFolderAsHidden in interface WorkspacefolderId - the folder id to set as hiddenhide - true to set hide, false to set visibleException - the exceptionpublic WorkspaceSharedFolder shareFolder(String folderId, Set<String> users, ACLType type) throws Exception
shareFolder in interface WorkspacefolderId - the folder id to shareusers - the Set of users to sharetype - the permissionExceptionpublic WorkspaceSharedFolder unshareFolder(String folderId, Set<String> users) throws Exception
unshareFolder in interface WorkspacefolderId - the folder id to shareusers - the Set of users to shareExceptionCopyright © 2022. All rights reserved.