Class StorageHubClient
- java.lang.Object
-
- org.gcube.common.storagehub.client.dsl.StorageHubClient
-
public class StorageHubClient extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected GroupManagerClientgroupClientprotected ItemManagerClientitemclientprotected UserManagerClientuserClientprotected WorkspaceManagerClientwsClient
-
Constructor Summary
Constructors Constructor Description StorageHubClient()StorageHubClient(URI uri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateUserAccount(String userId)voiddeleteUserAccount(String userId)voidemptyTrash()longgetTotalItemCount()longgetTotalVolume()VREFolderManagergetVreFolderManager()VREFolderManagergetVreFolderManager(String vreTitle)ListResolvergetVREFolders()FolderContainergetWSRoot()voidimpersonate(String user)OpenResolveropen(String id)FolderContaineropenTrash()FolderContaineropenVREFolder()GenericItemContainerrestoreThrashItem(String trashItemId)GenericItemContainerrestoreThrashItem(String trashItemId, String destinationFolderId)StringuploadFileOnVolatile(File file)StringuploadFileOnVolatile(InputStream stream, String fileName)StringuploadFileOnVolatile(InputStream stream, String fileName, long size)booleanuserExists(String user)
-
-
-
Field Detail
-
wsClient
protected WorkspaceManagerClient wsClient
-
itemclient
protected ItemManagerClient itemclient
-
groupClient
protected GroupManagerClient groupClient
-
userClient
protected UserManagerClient userClient
-
-
Constructor Detail
-
StorageHubClient
public StorageHubClient()
-
StorageHubClient
public StorageHubClient(URI uri)
-
-
Method Detail
-
impersonate
public void impersonate(String user)
-
getWSRoot
public FolderContainer getWSRoot()
-
open
public OpenResolver open(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
openVREFolder
public FolderContainer openVREFolder()
-
getVREFolders
public ListResolver getVREFolders()
-
getVreFolderManager
public VREFolderManager getVreFolderManager(String vreTitle)
-
getVreFolderManager
public VREFolderManager getVreFolderManager()
-
openTrash
public FolderContainer openTrash()
-
emptyTrash
public void emptyTrash() throws org.gcube.common.storagehub.model.exceptions.StorageHubException- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getTotalVolume
public long getTotalVolume()
-
getTotalItemCount
public long getTotalItemCount()
-
restoreThrashItem
public GenericItemContainer restoreThrashItem(String trashItemId) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
restoreThrashItem
public GenericItemContainer restoreThrashItem(String trashItemId, String destinationFolderId) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
createUserAccount
public void createUserAccount(String userId) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
deleteUserAccount
public void deleteUserAccount(String userId) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
userExists
public boolean userExists(String user) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
uploadFileOnVolatile
public String uploadFileOnVolatile(File file) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
uploadFileOnVolatile
public String uploadFileOnVolatile(InputStream stream, String fileName) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
uploadFileOnVolatile
public String uploadFileOnVolatile(InputStream stream, String fileName, long size) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
-