added method getPublicLinkForFile(String fileItemId, String version)
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/storagehub-client-wrapper@176369 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
73e1003326
commit
62a595d7d1
|
@ -841,6 +841,27 @@ public final class WorkspaceStorageHubClientService implements Workspace{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the public link for file.
|
||||
*
|
||||
* @param fileItemId the file item id
|
||||
* @param version the version
|
||||
* @return the public link for file
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public URL getPublicLinkForFile(String fileItemId, String version) throws Exception{
|
||||
|
||||
try{
|
||||
return storageHubClientService.getPublicLinkForFileVersion(fileItemId, version);
|
||||
}catch(Exception e){
|
||||
logger.error("Error on getting public link for file: "+fileItemId +" with version: "+version, e);
|
||||
String error = e.getMessage()!=null?e.getMessage():"Operation not allowed";
|
||||
throw new Exception("Error on getting public link for file: "+fileItemId +" with version: "+version+". Error: "+error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the list versions for file.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue