added getPublicLinkForFileVersion

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/storagehub-client-wrapper@176368 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2019-01-08 14:24:42 +00:00
parent 6f6e4ffc55
commit 73e1003326
1 changed files with 18 additions and 0 deletions

View File

@ -678,6 +678,24 @@ public class StorageHubClientService {
}
/**
* Gets the public link for file version.
*
* @param fileItemId the file item id
* @return the public link for file version
* @throws Exception the exception
*/
public URL getPublicLinkForFileVersion(String fileItemId, String version) throws Exception{
Validate.notNull(fileItemId, "Bad request of getPublicLinkForFile, the fileItemId is null");
Validate.notNull(version, "Bad request of getPublicLinkForFileVersion, the version is null");
Validate.notEmpty(version, "Bad request of getPublicLinkForFileVersion, the version is empty");
setContextProviders(scope, authorizationToken);
return shcClient.open(fileItemId).asFile().getPublicLink(version);
}
/**
* Gets the list versions.
*