git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/storagehub-client-wrapper@169543 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c99c7956d9
commit
2d61766e16
|
@ -135,6 +135,26 @@ public class StorageHubClientService {
|
||||||
|
|
||||||
//TODO MAP OF SHARED ROOT ID
|
//TODO MAP OF SHARED ROOT ID
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the parents.
|
||||||
|
*
|
||||||
|
* @param itemId the item id
|
||||||
|
* @return the parents
|
||||||
|
*/
|
||||||
|
public String getIdSharedFolder(String itemId) {
|
||||||
|
setContextProviders(scope, authorizationToken);
|
||||||
|
FolderContainer rootSharedFolder = shcClient.open(itemId).asItem().getRootSharedFolder();
|
||||||
|
try{
|
||||||
|
Validate.notNull(rootSharedFolder, "The root shared folder with id "+itemId+" does not exist");
|
||||||
|
return rootSharedFolder.get().getId();
|
||||||
|
}catch(Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the folder.
|
* Creates the folder.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue