| 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 an item 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)
Create a new folder with specified name.
|
WorkspaceFolder |
createFolder(String name,
String description,
String destinationFolderId,
Map<String,String> properties)
Create a new folder with properties.
|
WorkspaceItem |
createGcubeItem(String name,
String description,
List<String> scopes,
String creator,
String itemType,
Map<String,String> properties,
String destinationFolderId)
Create a GCubeItem.
|
WorkspaceSharedFolder |
createSharedFolder(String name,
String description,
List<String> users,
String destinationFolderId)
Create a shared folder with a list of users.
|
URLItem |
createURL(String fileName,
String fileDescription,
String url,
String destinationFolderId)
Creates the URL.
|
WorkspaceVREFolder |
createVREFolder(String scope,
String description,
String displayName,
ACLType privilege)
Create a 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)
Check if an item with the specified name exists in the specified folder.
|
List<WorkspaceItem> |
find(String name,
String folderId)
Get an item with the specified name in the specified folder.
|
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)
Return the item with the specified id.
|
WorkspaceItem |
getItem(String itemId,
boolean withAccounting,
boolean withFileDetails,
boolean withMapProperties)
Return the item with the specified id.
|
List<WorkspaceFileVersion> |
getListVersionsForFile(String fileItemId)
Gets the list versions for file.
|
Map<String,Object> |
getMetadata(String itemId)
Gets the metadata.
|
WorkspaceFolder |
getMySpecialFolders()
Get MySpecialFolders.
|
String |
getOwner()
Gets the owner.
|
List<? extends WorkspaceItem> |
getParentsById(String id)
Gets the parents by id.
|
List<WorkspaceItem> |
getPublicFolders()
Get 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()
Returns the workspace 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()
Get Trash Folder.
|
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 an item.
|
WorkspaceItem |
restoreThrashItem(String itemId)
Restore thrash item.
|
List<WorkspaceItem> |
searchByMimeType(String mimeType)
Search By MimeType.
|
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)
Shared an exist
WorkspaceFolder with a list of users. |
WorkspaceSharedFolder |
shareFolder(List<String> users,
String destinationFolderId)
Shared an exist
WorkspaceFolder with a list of users. |
WorkspaceItem |
unshare(String itemId)
Unshare a shared 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
WorkspacegetOwner in interface WorkspaceInternalErrorException - the internal error exceptionException - the exceptionpublic WorkspaceFolder getRoot() throws InternalErrorException, Exception
WorkspacegetRoot in interface WorkspaceInternalErrorException - the internal error exceptionException - the exceptionpublic List<? extends WorkspaceItem> getChildren(String id) throws Exception
WorkspacegetChildren 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
WorkspacegetFilteredChildren in interface Workspaceid - the idaType - the a typeException - the exceptionpublic List<? extends WorkspaceItem> getParentsById(String id) throws InternalErrorException, Exception
WorkspacegetParentsById 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
WorkspacecreateFolder in interface Workspacename - the folder name.description - the folder description.destinationFolderId - the destination folder.InternalErrorException - if an internal error occurs.InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.ItemAlreadyExistException - if an item with the same exist in the destination folder.WrongDestinationException - if the destination item is not a folder.ItemNotFoundException - if the destination folder has not been found.WorkspaceFolderNotFoundException - if the destination folder has not been found.public WorkspaceItem getItem(String itemId) throws ItemNotFoundException, InternalErrorException, Exception
WorkspacegetItem in interface WorkspaceitemId - the item id.ItemNotFoundException - if the item has not been found.InternalErrorException - the internal error exceptionException - the exceptionpublic WorkspaceItem getItem(String itemId, boolean withAccounting, boolean withFileDetails, boolean withMapProperties) throws ItemNotFoundException, InternalErrorException, Exception
WorkspacegetItem in interface WorkspaceitemId - the item id.withAccounting - the with accountingwithFileDetails - the with file detailswithMapProperties - the with map propertiesItemNotFoundException - if the item has not been found.InternalErrorException - 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
WorkspacecreateFolder 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
WorkspaceuploadFile in interface WorkspacefolderId - the folder idis - the input streamfileName - the file namefileDescription - the file descriptionException - the exceptionpublic List<String> getSharedFolderMembers(String folderId) throws Exception
WorkspacegetSharedFolderMembers in interface WorkspacefolderId - the folderidException - the exceptionpublic boolean exists(String name, String folderId) throws InternalErrorException, ItemNotFoundException, WrongItemTypeException
Workspaceexists in interface Workspacename - the name to check.folderId - the folder where to search the item.true if the item exists, false otherwise.InternalErrorException - if an error occurs.ItemNotFoundException - if the folder has not been found.WrongItemTypeException - if the folderId referrer to an item with type different from Workspace or folder.public List<WorkspaceItem> find(String name, String folderId) throws InternalErrorException, ItemNotFoundException, WrongItemTypeException
Workspacefind in interface Workspacename - the item name to find.folderId - the folder where to search the item.null otherwise.InternalErrorException - if an error occurs.ItemNotFoundException - if the folder has not been found.WrongItemTypeException - if the folderId referrer to an item with type different from Workspace or folder.public WorkspaceItem getRootSharedFolder(String itemId) throws Exception
getRootSharedFolder in interface WorkspaceitemId - the item idException - the exceptionpublic void deleteItem(String itemId) throws Exception
WorkspacedeleteItem in interface WorkspaceitemId - the item idItemNotFoundException - the item not found exceptionInternalErrorException - the internal error exceptionInsufficientPrivilegesException - the insufficient privileges exceptionException - the exceptionpublic Map<String,String> removeItems(String... id) throws ItemNotFoundException, InternalErrorException, InsufficientPrivilegesException
WorkspaceremoveItems 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
WorkspaceuploadArchive 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
WorkspacegetTrash in interface WorkspaceInternalErrorException - the internal error exceptionItemNotFoundException - the item not found exceptionException - the exceptionpublic void emptyTrash()
throws Exception
emptyTrash in interface WorkspaceException - the exceptionpublic WorkspaceItem restoreThrashItem(String itemId) throws Exception
WorkspacerestoreThrashItem 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
WorkspacemoveItems 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
WorkspacecopyFileItems 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
WorkspacecopyFile 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
WorkspacemoveItem in interface WorkspaceitemId - the item idfolderDestinationId - the destination folder idItemNotFoundException - the item not found exceptionWrongDestinationException - the wrong destination exceptionInsufficientPrivilegesException - the insufficient privileges exceptionItemAlreadyExistException - the item already exist exceptionInternalErrorException - the internal error exceptionWorkspaceFolderNotFoundException - the workspace folder not found exceptionException - the exceptionpublic WorkspaceItem renameItem(String itemId, String newName) throws ItemNotFoundException, InternalErrorException, ItemAlreadyExistException, InsufficientPrivilegesException, Exception
WorkspacerenameItem in interface WorkspaceitemId - the item id.newName - the new name.ItemNotFoundException - if the item has not been found.InternalErrorException - if an internal error occurs.ItemAlreadyExistException - if the user don't have sufficient privileges to perform this operation.InsufficientPrivilegesException - 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
WorkspacegetThumbnailData in interface WorkspaceitemId - the item idException - the exceptionpublic Map<String,Object> getMetadata(String itemId) throws Exception
WorkspacegetMetadata 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
WorkspaceupdateMetadata in interface WorkspaceitemId - the item idmapObjs - the map objsException - the exceptionpublic URLItem createURL(String fileName, String fileDescription, String url, String destinationFolderId) throws Exception
Workspacepublic boolean setFolderAsPublic(String folderId, boolean setPublic) throws Exception
WorkspacesetFolderAsPublic in interface WorkspacefolderId - the folder idsetPublic - the boolException - 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
WorkspacechangeDescription in interface WorkspaceitemId - the item to update.newDescription - the new item description.ItemNotFoundException - if the item has not been found.InternalErrorException - if an internal error occurs.public List<WorkspaceItem> searchByMimeType(String mimeType) throws InternalErrorException
WorkspacesearchByMimeType 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
WorkspacecreateSharedFolder in interface Workspacename - the namedescription - the descriptionusers - A list of portal loginsdestinationFolderId - 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
WorkspaceWorkspaceFolder with a list of users.shareFolder in interface Workspaceusers - A list of portal logins.destinationFolderId - 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
WorkspaceWorkspaceFolder with a list of users.share in interface Workspaceusers - A list of portal logins.itemId - 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
WorkspacecreateGcubeItem 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
Workspaceunshare in interface WorkspaceitemId - the item idInternalErrorException - the internal error exceptionItemNotFoundException - the item not found exceptionpublic WorkspaceFolder getMySpecialFolders() throws InternalErrorException, ItemNotFoundException
WorkspacegetMySpecialFolders in interface WorkspaceInternalErrorException - the internal error exceptionItemNotFoundException - the item not found exceptionpublic List<WorkspaceItem> searchByProperties(List<String> properties) throws InternalErrorException
WorkspacesearchByProperties 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
WorkspacecreateVREFolder 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
WorkspacegetPublicFolders in interface WorkspaceInternalErrorException - the internal error exceptionCopyright © 2019. All Rights Reserved.