Fixing old and new configuration management

This commit is contained in:
Luca Frosini 2022-02-22 15:42:53 +01:00
parent e0a018e083
commit ef2cb362f3
1 changed files with 8 additions and 4 deletions

View File

@ -102,9 +102,9 @@ public class GCoreISConfigurationProxy {
this.mapper = new ObjectMapper();
}
public ServiceCatalogueConfiguration getCatalogueConfiguration() {
public ServiceCatalogueConfiguration getCatalogueConfiguration() throws WebApplicationException {
if (catalogueConfiguration == null) {
catalogueConfiguration = getOLDCatalogueConfigurationFromIS();
catalogueConfiguration = getCatalogueConfigurationFromIS();
}
return catalogueConfiguration;
}
@ -183,12 +183,16 @@ public class GCoreISConfigurationProxy {
return serviceEndpoint;
}
protected ServiceCatalogueConfiguration getCatalogueConfigurationFromIS() throws IOException {
protected ServiceCatalogueConfiguration getCatalogueConfigurationFromIS() throws WebApplicationException {
ServiceEndpoint serviceEndpoint = getServiceEndpoint();
if(serviceEndpoint==null) {
return getOLDCatalogueConfigurationFromIS();
}
return getConfiguration(serviceEndpoint);
try {
return getConfiguration(serviceEndpoint);
}catch (Exception e) {
throw new InternalServerErrorException();
}
}
@Deprecated