Added exception InvalidCacheLoadException
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@174935 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e02272d874
commit
d679109b0e
|
@ -20,6 +20,8 @@ import org.gcube.datatransfer.resolver.services.error.ExceptionManager;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.common.cache.CacheLoader.InvalidCacheLoadException;
|
||||
|
||||
|
||||
/**
|
||||
* The Class AnalyticsGetResolver.
|
||||
|
@ -65,7 +67,7 @@ public class AnalyticsGetResolver {
|
|||
//CHECKING IF THE INPUT VRE NAME IS REGISTRED IN THE INFRASTRUCTURE...
|
||||
try{
|
||||
fullScope = LoadingVREsScopeCache.get(vreName);
|
||||
}catch(ExecutionException e){
|
||||
}catch(ExecutionException | InvalidCacheLoadException e){
|
||||
logger.error("Error on getting the fullscope from cache for vreName "+vreName, e);
|
||||
throw ExceptionManager.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);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ import org.gcube.smartgears.utils.InnerMethodName;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.common.cache.CacheLoader.InvalidCacheLoadException;
|
||||
|
||||
import eu.trentorise.opendata.jackan.model.CkanDataset;
|
||||
|
||||
/**
|
||||
|
@ -174,9 +176,9 @@ public class CatalogueResolver {
|
|||
String fullScope = "";
|
||||
try{
|
||||
fullScope = LoadingVREsScopeCache.get(vreName);
|
||||
}catch(ExecutionException e){
|
||||
}catch(ExecutionException | InvalidCacheLoadException e){
|
||||
logger.error("Error on getting the fullscope from cache for vreName "+vreName, e);
|
||||
throw ExceptionManager.wrongParameterException(req, "Error on getting full scope for the VRE name "+vreName+". Is it registered as VRE in the D4Science Infrastructure System?", CatalogueResolver.class, helpURI);
|
||||
throw ExceptionManager.wrongParameterException(req, "Error on getting full scope for the VRE name '"+vreName+"'. Is it registered as VRE in the D4Science Infrastructure System?", CatalogueResolver.class, helpURI);
|
||||
}
|
||||
logger.info("Read fullScope: "+fullScope + " for VRE_NAME: "+vreName +" from cache created by: "+GetAllInfrastructureVREs.class.getSimpleName());
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ import org.gcube.datatransfer.resolver.services.error.ExceptionManager;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.common.cache.CacheLoader.InvalidCacheLoadException;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -120,7 +122,7 @@ public class GisResolver {
|
|||
String gisViewerPortletUrl = null;
|
||||
try{
|
||||
gisViewerPortletUrl = LoadingGisViewerApplicationURLCache.get(scope);
|
||||
}catch(ExecutionException e){
|
||||
}catch(ExecutionException | InvalidCacheLoadException e){
|
||||
logger.error("Error on getting the GisViewer Applicaton URL from cache for scope "+scope, e);
|
||||
throw ExceptionManager.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);
|
||||
}
|
||||
|
@ -196,7 +198,7 @@ public class GisResolver {
|
|||
GeonetworkInstance gi = null;
|
||||
try {
|
||||
gi = LoadingGeonetworkInstanceCache.get(scope);
|
||||
}catch(ExecutionException e){
|
||||
}catch(ExecutionException | InvalidCacheLoadException e){
|
||||
logger.error("Error on getting the Geonetwork Instance from cache for scope "+scope, e);
|
||||
throw ExceptionManager.wrongParameterException(req, "Error on getting the Geonetwork Instance from cache for scope "+scope+". Is it registered for this scope: "+scope+"?", this.getClass(), help);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ import org.gcube.datatransfer.resolver.services.error.ExceptionManager;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.common.cache.CacheLoader.InvalidCacheLoadException;
|
||||
|
||||
|
||||
/**
|
||||
* The Class KnimeGetResolver.
|
||||
|
@ -62,7 +64,7 @@ public class KnimeGetResolver {
|
|||
String fullScope = "";
|
||||
try{
|
||||
fullScope = LoadingVREsScopeCache.get(vreName);
|
||||
}catch(ExecutionException e){
|
||||
}catch(ExecutionException | InvalidCacheLoadException e){
|
||||
logger.error("Error on getting the fullscope from cache for vreName "+vreName, e);
|
||||
throw ExceptionManager.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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue