Refactored classes

This commit is contained in:
Luca Frosini 2022-12-05 14:31:10 +01:00
parent 8638559d43
commit 814b88c1d1
2 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ import java.util.Map;
import org.gcube.common.authorization.utils.manager.SecretManagerProvider;
import org.gcube.gcat.configuration.isproxies.GCoreISConfigurationProxy;
import org.gcube.gcat.configuration.isproxies.RestISConfigurationProxy;
import org.gcube.gcat.configuration.isproxies.FacetBasedISConfigurationProxy;
import org.gcube.gcat.configuration.service.ServiceCatalogueConfiguration;
import org.gcube.gcat.persistence.ckan.CKANUserCache;
@ -21,7 +21,7 @@ public class CatalogueConfigurationFactory {
}
private static ServiceCatalogueConfiguration load(String context) {
RestISConfigurationProxy restISConfigurationProxy = new RestISConfigurationProxy(context);
FacetBasedISConfigurationProxy restISConfigurationProxy = new FacetBasedISConfigurationProxy(context);
ServiceCatalogueConfiguration serviceCatalogueConfiguration = restISConfigurationProxy.getCatalogueConfiguration();
if(serviceCatalogueConfiguration == null) {
GCoreISConfigurationProxy gCoreISConfigurationProxy = new GCoreISConfigurationProxy(context);
@ -31,14 +31,14 @@ public class CatalogueConfigurationFactory {
}
private static void purgeFromIS(String context) {
RestISConfigurationProxy restISConfigurationProxy = new RestISConfigurationProxy(context);
FacetBasedISConfigurationProxy restISConfigurationProxy = new FacetBasedISConfigurationProxy(context);
restISConfigurationProxy.delete();
GCoreISConfigurationProxy gCoreISConfigurationProxy = new GCoreISConfigurationProxy(context);
gCoreISConfigurationProxy.delete();
}
private static void createOrUpdateOnIS(String context, ServiceCatalogueConfiguration catalogueConfiguration) throws Exception {
RestISConfigurationProxy restISConfigurationProxy = new RestISConfigurationProxy(context,catalogueConfiguration);
FacetBasedISConfigurationProxy restISConfigurationProxy = new FacetBasedISConfigurationProxy(context,catalogueConfiguration);
restISConfigurationProxy.createOrUpdateOnIS();
GCoreISConfigurationProxy gCoreISConfigurationProxy = new GCoreISConfigurationProxy(context, catalogueConfiguration);
gCoreISConfigurationProxy.createOrUpdateOnIS();

View File

@ -37,9 +37,9 @@ import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class RestISConfigurationProxy extends ISConfigurationProxy<Configuration> {
public class FacetBasedISConfigurationProxy extends ISConfigurationProxy<Configuration> {
private static Logger logger = LoggerFactory.getLogger(RestISConfigurationProxy.class);
private static Logger logger = LoggerFactory.getLogger(FacetBasedISConfigurationProxy.class);
protected VirtualService virtualService;
protected Configuration configuration;
@ -49,11 +49,11 @@ public class RestISConfigurationProxy extends ISConfigurationProxy<Configuration
protected EService solrService;
protected EService ckanDB;
public RestISConfigurationProxy(String context) {
public FacetBasedISConfigurationProxy(String context) {
super(context);
}
public RestISConfigurationProxy(String context, ServiceCatalogueConfiguration catalogueConfiguration) {
public FacetBasedISConfigurationProxy(String context, ServiceCatalogueConfiguration catalogueConfiguration) {
super(context, catalogueConfiguration);
}