| Modifier and Type | Class and Description |
|---|---|
static class |
WorkspaceStorageHubClientService.WorkspaceStorageHubClientServiceBuilder
The Class WorkspaceStorageHubClientServiceBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeDescription(String itemId,
String newDescription)
Change an item description.
|
WorkspaceItem |
copy(String itemId,
String destinationFolderId)
Copy an item from a folder to another folder.
|
WorkspaceItem |
copy(String itemId,
String newName,
String destinationFolderId)
Copy an item from a folder to another folder.
|
URLFileItem |
createExternalUrl(String name,
String description,
InputStream url,
String destinationfolderId)
Create a new External URL into a folder.
|
URLFileItem |
createExternalUrl(String name,
String description,
String url,
String destinationFolderId)
Create a new External URL into a folder.
|
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.
|
WorkspaceSharedFolder |
createSharedFolder(String name,
String description,
String groupId,
String destinationFolderId,
String displayName,
boolean isVREFolder)
Create a shared folder associated with a groupId.
|
WorkspaceVREFolder |
createVREFolder(String scope,
String description,
String displayName,
ACLType privilege)
Create a VRE folder.
|
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<? extends WorkspaceItem> |
getChildren(String id)
Gets the children.
|
long |
getDiskUsage()
Get the disk usage of a worskpace.
|
List<WorkspaceItem> |
getFolderItems(org.gcube.common.storagehub.model.types.GenericItemType type)
Get items by type.
|
String |
getGroup(String groupId)
Get group name by group id.
|
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.
|
WorkspaceItem |
getItemByPath(String path)
Return the item with the specified path.
|
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.
|
WorkspaceFolder |
getRoot()
Returns the workspace root.
|
List<String> |
getSharedFolderMembers(String folderId)
Gets the shared folder members.
|
StorageHubClientService |
getStorageHubClientService()
Gets the storage hub client service.
|
int |
getTotalItems()
Get the total number of items in a workspace.
|
WorkspaceTrashItem |
getTrash()
Get Trash Folder.
|
WorkspaceSharedFolder |
getVREFolderByScope(String scope)
Get VRE Folder By Scope.
|
boolean |
isGroup(String groupId)
Check if a user is a group.
|
boolean |
isWithAccounting() |
boolean |
isWithFileDetails() |
boolean |
isWithMapProperties() |
WorkspaceItem |
moveItem(String itemId,
String destinationFolderId)
Move a workspaceItem to a specified destination.
|
void |
remove(String itemName,
String folderId)
Remove an item from a folder.
|
void |
removeItem(String itemId)
Remove an item.
|
Map<String,String> |
removeItems(String... id)
Remove a list of items identified by ids.
|
void |
renameItem(String itemId,
String newName)
Rename an item.
|
List<WorkspaceItem> |
searchByMimeType(String mimeType)
Search By MimeType.
|
List<WorkspaceItem> |
searchByName(String name,
String folderId)
Search by Name.
|
List<WorkspaceItem> |
searchByProperties(List<String> properties)
Search By Properties.
|
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.
|
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
WorkspacegetOwner in interface WorkspaceInternalErrorException - the internal error exceptionpublic WorkspaceFolder getRoot() throws InternalErrorException
WorkspacegetRoot in interface WorkspaceInternalErrorException - the internal error exceptionpublic List<? extends WorkspaceItem> getChildren(String id)
WorkspacegetChildren in interface Workspaceid - the idpublic List<? extends WorkspaceItem> getParentsById(String id) throws InternalErrorException
WorkspacegetParentsById in interface Workspaceid - the idInternalErrorException - the internal error 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
WorkspacegetItem in interface WorkspaceitemId - the item id.ItemNotFoundException - if the item has not been found.InternalErrorException - the internal error exceptionpublic WorkspaceItem getItem(String itemId, boolean withAccounting, boolean withFileDetails, boolean withMapProperties) throws ItemNotFoundException, InternalErrorException
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 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 InsufficientPrivilegesException, WorkspaceFolderNotFoundException, InternalErrorException, ItemAlreadyExistException, WrongDestinationException
WorkspaceuploadFile in interface WorkspacefolderId - the folder idis - the input streamfileName - the file namefileDescription - the file descriptionInsufficientPrivilegesException - the insufficient privileges exceptionWorkspaceFolderNotFoundException - the workspace folder not found exceptionInternalErrorException - the internal error exceptionItemAlreadyExistException - the item already exist exceptionWrongDestinationException - the wrong destination 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 URLFileItem createExternalUrl(String name, String description, String url, String destinationFolderId) throws InsufficientPrivilegesException, WorkspaceFolderNotFoundException, InternalErrorException, ItemAlreadyExistException, WrongDestinationException, IOException
WorkspacecreateExternalUrl in interface Workspacename - the external URL name.description - the external URL description.url - the external URL value.destinationFolderId - the destination folder.InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.WorkspaceFolderNotFoundException - if the destination folder has not been found.InternalErrorException - if an internal error occurs.ItemAlreadyExistException - if a folder item with same name already exist.WrongDestinationException - if the destination type is not a folder.IOException - Signals that an I/O exception has occurred.public URLFileItem createExternalUrl(String name, String description, InputStream url, String destinationfolderId) throws InsufficientPrivilegesException, InternalErrorException, ItemAlreadyExistException, WrongDestinationException, WorkspaceFolderNotFoundException, IOException
WorkspacecreateExternalUrl in interface Workspacename - the external URL name.description - the external URL description.url - the external URL.destinationfolderId - the destination folder.InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.InternalErrorException - if an internal error occurs.ItemAlreadyExistException - if a folder item with same name already exist.WrongDestinationException - if the destination type is not a folder.WorkspaceFolderNotFoundException - if the destination folder has not been found.IOExceptionpublic void removeItem(String itemId) throws ItemNotFoundException, InternalErrorException, InsufficientPrivilegesException
WorkspaceremoveItem in interface WorkspaceitemId - the item to remove.ItemNotFoundException - if the item has not been found.InternalErrorException - if an internal error occurs.InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.public WorkspaceItem moveItem(String itemId, String destinationFolderId) throws ItemNotFoundException, WrongDestinationException, InsufficientPrivilegesException, InternalErrorException, ItemAlreadyExistException, WorkspaceFolderNotFoundException
WorkspacemoveItem in interface WorkspaceitemId - the item to move.destinationFolderId - the destination folder.ItemNotFoundException - if the specified item has not been found.WrongDestinationException - if the specified destination has not been found.InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.InternalErrorException - if an internal error occurs.ItemAlreadyExistException - if the destination folder have a children with same name.WorkspaceFolderNotFoundException - if the destination folder is not found.public void renameItem(String itemId, String newName) throws ItemNotFoundException, InternalErrorException, ItemAlreadyExistException, InsufficientPrivilegesException
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 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 WorkspaceItem getItemByPath(String path) throws ItemNotFoundException
WorkspacegetItemByPath in interface Workspacepath - the item path.ItemNotFoundException - if the item has not been found.public void remove(String itemName, String folderId) throws ItemNotFoundException, InternalErrorException, InsufficientPrivilegesException, WrongItemTypeException
Workspaceremove in interface WorkspaceitemName - the item name.folderId - the folder id.ItemNotFoundException - if the folder has not been found.InternalErrorException - if an internal error occurs.InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.WrongItemTypeException - if the specified folder is neither a workspace nor a folder.public WorkspaceItem copy(String itemId, String newName, String destinationFolderId) throws ItemNotFoundException, WrongDestinationException, InternalErrorException, ItemAlreadyExistException, InsufficientPrivilegesException, WorkspaceFolderNotFoundException
Workspacecopy in interface WorkspaceitemId - the item to copy.newName - the item new name.destinationFolderId - the destination folder id.ItemNotFoundException - if the item has not been found.WrongDestinationException - if the destination have a wrong type.InternalErrorException - if an internal error occurs.ItemAlreadyExistException - if an item with same name already exist in the destination folder.InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.WorkspaceFolderNotFoundException - if the destination folder has not been found.public WorkspaceItem copy(String itemId, String destinationFolderId) throws ItemNotFoundException, WrongDestinationException, InternalErrorException, ItemAlreadyExistException, InsufficientPrivilegesException, WorkspaceFolderNotFoundException
Workspacecopy in interface WorkspaceitemId - the item to copy.destinationFolderId - the destination folder id, can't be the same of the item (can't have the same name).ItemNotFoundException - if the item has not been found.WrongDestinationException - if the destination have a wrong type.InternalErrorException - if an internal error occurs.ItemAlreadyExistException - if an item with same name already exist in the destination folder.InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.WorkspaceFolderNotFoundException - if the destination folder has not been found.public List<WorkspaceItem> searchByName(String name, String folderId) throws InternalErrorException
WorkspacesearchByName in interface Workspacename - the namefolderId - the folder idInternalErrorException - the internal error exceptionpublic List<WorkspaceItem> searchByMimeType(String mimeType) throws InternalErrorException
WorkspacesearchByMimeType in interface WorkspacemimeType - the mime typeInternalErrorException - the internal error exceptionpublic List<WorkspaceItem> getFolderItems(org.gcube.common.storagehub.model.types.GenericItemType type) throws InternalErrorException
WorkspacegetFolderItems in interface Workspacetype - the 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 createSharedFolder(String name, String description, String groupId, String destinationFolderId, String displayName, boolean isVREFolder) throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException
WorkspacecreateSharedFolder in interface Workspacename - the name of the folderdescription - the descriptiongroupId - an existing groupId to associate with the folderdestinationFolderId - the destination folder iddisplayName - a friendly name for the folderisVREFolder - a flag to indicate the folder is a VRE FolderInternalErrorException - 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 WorkspaceTrashItem getTrash() throws InternalErrorException, ItemNotFoundException
WorkspacegetTrash in interface WorkspaceInternalErrorException - 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 WorkspaceSharedFolder getVREFolderByScope(String scope) throws ItemNotFoundException, InternalErrorException
WorkspacegetVREFolderByScope in interface Workspacescope - the scopeItemNotFoundException - the item not found exceptionInternalErrorException - the internal error exceptionpublic long getDiskUsage()
throws InternalErrorException
WorkspacegetDiskUsage in interface WorkspaceInternalErrorException - the internal error exceptionpublic int getTotalItems()
throws InternalErrorException
WorkspacegetTotalItems in interface WorkspaceInternalErrorException - the internal error 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 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 String getGroup(String groupId) throws InternalErrorException
WorkspacegetGroup in interface WorkspacegroupId - the group idInternalErrorException - the internal error exceptionpublic boolean isGroup(String groupId) throws InternalErrorException
WorkspaceisGroup in interface WorkspacegroupId - the group idInternalErrorException - the internal error exceptionpublic List<WorkspaceItem> getPublicFolders() throws InternalErrorException
WorkspacegetPublicFolders in interface WorkspaceInternalErrorException - the internal error exceptionCopyright © 2018. All Rights Reserved.