<description>The URI Resolver is an HTTP URI resolver implemented as an REST service which gives access trough HTTP to different gcube Resolvers and gCube Applications.</description>
<description>The URI Resolver is an HTTP URI resolver implemented as a REST service which gives access trough HTTP to different gcube Resolvers and gCube Applications.</description>
logger.info("By using infra scope: "+infra+" and the Application Token: "+theAppToken.substring(0,theAppToken.length()/2)+"... of "+ANALYTICS_RESOLVER_SERVICE_ENDPOINT_NAME+" to instance the "+StorageHubManagement.class.getSimpleName());
logger.info("By using infra scope: "+infra+" and the Application Token: "
+theAppToken.substring(0,theAppToken.length()/2)+"... of "
+ANALYTICS_RESOLVER_SERVICE_ENDPOINT_NAME+" to instance the "
logger.error("Error when storing your 'dataminer-invocation':",e);
throwExceptionManager.internalErrorException(req,"Error when storing your 'dataminer-invocation' request with "+jsonRequest+". \nPlease contact the support",this.getClass(),helpURI);
throwExceptionManager
.internalErrorException(
req,"Error when storing your 'dataminer-invocation' request with "
+jsonRequest+". \nPlease contact the support",
this.getClass(),helpURI);
}
// FileContainer fileContainer = shc.getWSRoot().uploadFile(new FileInputStream(tempInvocationFile), tempInvocationFile.getName(), "DataMinerInvocation Request created by "+this.getClass().getSimpleName());
//error during storing the file via StorageHubManagent
if(einstanceofInternalServerException){
//error during storing the file via StorageHubManagent
throwe;
}
logger.error("Error on creating 'dataminer-invocation:",e);
throwExceptionManager.badRequestException(req,"Error on creating your 'dataminer-invocation' request with "+jsonRequest+". \nPlease contact the support",this.getClass(),helpURI);
}finally{
//No needed to reset the scope, it is provided by TokenSetter
logger.error("Error on creating the public link to file");
throwExceptionManager.badRequestException(req,"Error on getting link to your 'dataminer-invocation' request. Plese contact the support "+jsonRequest,this.getClass(),helpURI);
throwExceptionManager.badRequestException(req,
"Error on getting link to your 'dataminer-invocation' request. Plese contact the support "
StringerrorMessage="No "+GCUBE_TOKEN+" as Property saved in the "+ANALYTICS_RESOLVER_SERVICE_ENDPOINT_NAME+" SE registered in the scope: "+ScopeProvider.instance.get();
StringerrorMessage="No "+GCUBE_TOKEN+" as Property saved in the "
+ANALYTICS_RESOLVER_SERVICE_ENDPOINT_NAME+" SE registered in the scope: "
StringerrorMessage="Error occurred on reading the "+ANALYTICS_RESOLVER_SERVICE_ENDPOINT_NAME+" SE registered in the scope: "+ScopeProvider.instance.get();
}catch(Exceptione){
StringerrorMessage="Error occurred on reading the "+ANALYTICS_RESOLVER_SERVICE_ENDPOINT_NAME
+" SE registered in the scope: "+ScopeProvider.instance.get();
logger.error("Error on getting the fullscope from cache for vreName "+vreName,e);
throwExceptionManager.wrongParameterException(req,"Error on getting full scope for the VRE name "+vreName+". Is it registered as VRE in the D4Science Infrastructure System?",this.getClass(),helpURI);
logger.error("Error on reading the "+APPLICATION_PROFILE+" with APPID: "+ORG_GCUBE_PORTLETS_USER_DATAMINERMANAGER_SERVER_DATA_MINER_MANAGER_SERVICE_IMPL,e);
throwExceptionManager.internalErrorException(req,"Error on reading the Application Profile for the "+ANALYTICS_EXECUTOR_PORTLET_NAME+". Please contact the support",this.getClass(),helpURI);
logger.info("The dataset "+itemCatalogueURLs.getItemName()+" is a private item (to VRE) so using protected access to CKAN portlet: "+itemCatalogueURL);
//CHECK IF THE vreName has a valid scope, so it is a valid VRE
//CHECK IF THE vreName has a valid scope, so it is a valid VRE
try{
fullScope=LoadingMapOfScopeCache.get(vreName);
}catch(ExecutionExceptione){
logger.error("Error on getting the fullscope from cache for vreName "+vreName,e);
throwExceptionManager.wrongParameterException(req,"Error on getting full scope for the VRE name "+vreName+". Is it registered as VRE in the D4Science Infrastructure System?",this.getClass(),helpURI);
}catch(ExecutionExceptione){
logger.error("Error on getting the fullscope from cache for vreName "+vreName,e);
"Error on getting full scope for the VRE name "+vreName
+". Is it registered as VRE in the D4Science Infrastructure System?",
this.getClass(),helpURI);
}
if(fullScope==null)
throwExceptionManager.notFoundException(req,"The scope '"+scope+"' does not matching any scope in the infrastructure. Is it valid?",this.getClass(),helpURI);
if(fullScope==null)
throwExceptionManager.notFoundException(req,
"The scope '"+scope+"' does not matching any scope in the infrastructure. Is it valid?",
@ -205,106 +231,115 @@ public class CatalogueResolver {
scopeStatus=SCOPE_STATUS.DETACHED;
logger.info("I loaded a valid VRE obj for scope name {}",scopeName);
isScopeDetached=true;
}catch(Exceptione1){
logger.warn("I was not able to load a detached VRE for vreName {}. Going to error for wrong scope",scopeName);
}catch(Exceptione1){
logger.warn("I was not able to load a detached VRE for vreName {}. Going to error for wrong scope",
scopeName);
}
//If is not a cas of scope detached, going to error for wrong scope
if(!isScopeDetached){
logger.error("Error on getting the fullscope from cache for scopeName "+scopeName,e);
throwExceptionManager.wrongParameterException(req,"Error on getting full scope for the scope name '"+scopeName+"'. Is it registered as a valid Scope in the D4Science Infrastructure System?",CatalogueResolver.class,helpURI);
// If is not a cas of scope detached, going to error for wrong scope
if(!isScopeDetached){
logger.error("Error on getting the fullscope from cache for scopeName "+scopeName,e);
logger.error("Error on getting the GisViewer Applicaton URL from cache for scope "+scope,e);
throwExceptionManager.wrongParameterException(req,"Error on getting the GisViewer Applicaton URL from cache for scope "+scope+".\nIs the Application Profile with APPID "+UriResolverSmartGearManagerInit.getGisViewerProfile().getAppId()+" registered for this scope: "+scope+"?",this.getClass(),help);
throwExceptionManager.notFoundException(req,"GisViewer Portlet URL not found in the scope: "+scope+". Please contact the support",this.getClass(),help);
logger.error("Error on getting the GeoExplorer Applicaton URL from cache for scope "+scope,e);
throwExceptionManager.wrongParameterException(req,"Error on getting the GeoExplorer Applicaton URL from cache for scope "+scope+".\nIs the Application Profile with APPID "+UriResolverSmartGearManagerInit.getGeoExplorerProfile().getAppId()+" registered for this scope: "+scope+"?",this.getClass(),help);
}catch(ExecutionExceptione){
logger.error("Error on getting the GeoExplorer Applicaton URL from cache for scope "+scope,e);
throwExceptionManager.notFoundException(req,"GeoExplorer Portlet URL not found in the scope: "+scope+". Please contact the support",this.getClass(),help);
// CHECKING IF THE GeoExplorer Portlet URL is valid
logger.error("Error on getting the Geonetwork Instance from cache for scope "+scope,e);
throwExceptionManager.wrongParameterException(req,"Error on getting the Geonetwork Instance from cache for scope "+scope+". Is it registered for this scope: "+scope+"?",this.getClass(),help);
logger.info("The query returned "+toReturn.size()+" ServiceEndpoint/s");
logger.info("The query returned "+toReturn.size()+" ServiceEndpoint/s");
if(toReturn.size()==0){
StringerrorMessage=String.format("Missing the RR with Name '%s' and Category '%s' in the scope '%s'. Please contact the support.",RUNTIME_WKEO_RESOURCE_NAME,CATEGORY_WEKEO_TYPE,ScopeProvider.instance.get());
if(toReturn.size()==0){
StringerrorMessage=String.format(
"Missing the RR with Name '%s' and Category '%s' in the scope '%s'. Please contact the support.",