Added method getPublicLinkForFile(String fileItemId)
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/storagehub-client-wrapper@173265 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e63afe0688
commit
0b6e876cc3
|
@ -570,7 +570,7 @@ public class StorageHubClientService {
|
||||||
* @return the file public link
|
* @return the file public link
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
public URL getFilePublicLink(String fileItemId) throws Exception{
|
public URL getPublicLinkForFile(String fileItemId) throws Exception{
|
||||||
|
|
||||||
Validate.notNull(fileItemId, "Bad invoking get public link, the itemId is null");
|
Validate.notNull(fileItemId, "Bad invoking get public link, the itemId is null");
|
||||||
|
|
||||||
|
|
|
@ -808,16 +808,16 @@ public final class WorkspaceStorageHubClientService implements Workspace{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the file public link.
|
* Gets the public link for file.
|
||||||
*
|
*
|
||||||
* @param fileItemId the file item id
|
* @param fileItemId the file item id
|
||||||
* @return the file public link
|
* @return the public link for file
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
public URL getFilePublicLink(String fileItemId) throws Exception{
|
public URL getPublicLinkForFile(String fileItemId) throws Exception{
|
||||||
|
|
||||||
try{
|
try{
|
||||||
return storageHubClientService.getFilePublicLink(fileItemId);
|
return storageHubClientService.getPublicLinkForFile(fileItemId);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("Error on getting public link: "+fileItemId, e);
|
logger.error("Error on getting public link: "+fileItemId, e);
|
||||||
String error = e.getMessage()!=null?e.getMessage():"Operation not allowed";
|
String error = e.getMessage()!=null?e.getMessage():"Operation not allowed";
|
||||||
|
|
|
@ -5,6 +5,7 @@ package org.gcube.common.storagehubwrapper.server.tohl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.net.URL;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -272,6 +273,20 @@ public interface Workspace{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the public link for file.
|
||||||
|
*
|
||||||
|
* @param fileItemId the file item id
|
||||||
|
* @return the public link for file
|
||||||
|
* @throws Exception the exception
|
||||||
|
*/
|
||||||
|
public URL getPublicLinkForFile(String fileItemId) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue