just updated comments
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@176241 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
627f3b0efd
commit
38d746e83f
|
@ -57,7 +57,6 @@ public class StorageHubResolver {
|
|||
logger.info(this.getClass().getSimpleName()+" HEAD getMetadata called");
|
||||
|
||||
try{
|
||||
|
||||
//TODO Do we need to check the token?
|
||||
|
||||
//Checking mandatory parameter id
|
||||
|
@ -103,13 +102,11 @@ public class StorageHubResolver {
|
|||
@GET
|
||||
@Path("")
|
||||
public Response download(@Context HttpServletRequest req) {
|
||||
logger.info(this.getClass().getSimpleName()+" GET starts...");
|
||||
logger.info(this.getClass().getSimpleName()+" GET download called");
|
||||
|
||||
try{
|
||||
InnerMethodName.instance.set("resolveStorageHubPublicLink");
|
||||
|
||||
|
||||
|
||||
//Checking mandatory parameter id
|
||||
if(id==null || id.isEmpty()){
|
||||
logger.error("Path Parameter "+STORAGE_HUB_ID+" not found");
|
||||
|
@ -117,6 +114,7 @@ public class StorageHubResolver {
|
|||
}
|
||||
|
||||
try{
|
||||
|
||||
ItemManagerClient client = AbstractPlugin.item().build();
|
||||
StreamDescriptor descriptor = client.resolvePublicLink(id);
|
||||
ResponseBuilder response = Response.ok(descriptor.getStream());
|
||||
|
@ -171,6 +169,7 @@ public class StorageHubResolver {
|
|||
throw ExceptionManager.badRequestException(req, "Missing mandatory parameter 'version'", StorageHubResolver.class, help);
|
||||
}
|
||||
try{
|
||||
|
||||
String identifier = String.format("%s%s%s",id, versionPrefix, version);
|
||||
StreamDescriptor descriptor = client.resolvePublicLink(identifier);
|
||||
ResponseBuilder response = Response.ok(descriptor.getStream());
|
||||
|
|
Loading…
Reference in New Issue