Reorganizing code to properly support new and old IS

This commit is contained in:
Luca Frosini 2022-11-29 14:42:20 +01:00
parent fdabed4a87
commit 08530b490f
8 changed files with 21 additions and 10 deletions

View File

@ -4,6 +4,8 @@ import java.util.HashMap;
import java.util.Map;
import org.gcube.common.authorization.utils.manager.SecretManagerProvider;
import org.gcube.gcat.configuration.isproxies.GCoreISConfigurationProxy;
import org.gcube.gcat.configuration.service.ServiceCatalogueConfiguration;
import org.gcube.gcat.persistence.ckan.CKANUserCache;
/**

View File

@ -1,4 +1,4 @@
package org.gcube.gcat.configuration;
package org.gcube.gcat.configuration.isproxies;
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
@ -32,6 +32,9 @@ import org.gcube.common.resources.gcore.common.Platform;
import org.gcube.common.resources.gcore.utils.Group;
import org.gcube.gcat.api.GCatConstants;
import org.gcube.gcat.api.configuration.CatalogueConfiguration;
import org.gcube.gcat.configuration.Version;
import org.gcube.gcat.configuration.service.ServiceCKANDB;
import org.gcube.gcat.configuration.service.ServiceCatalogueConfiguration;
import org.gcube.informationsystem.publisher.RegistryPublisher;
import org.gcube.informationsystem.publisher.RegistryPublisherFactory;
import org.gcube.resources.discovery.client.api.DiscoveryClient;

View File

@ -1,7 +1,9 @@
package org.gcube.gcat.configuration;
package org.gcube.gcat.configuration.isproxies;
import javax.ws.rs.WebApplicationException;
import org.gcube.gcat.configuration.Version;
import org.gcube.gcat.configuration.service.ServiceCatalogueConfiguration;
import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.configuration.application.ApplicationConfiguration;
import org.gcube.smartgears.context.application.ApplicationContext;

View File

@ -1,9 +1,12 @@
package org.gcube.gcat.configuration;
package org.gcube.gcat.configuration.isproxies;
import org.gcube.gcat.configuration.service.ServiceCatalogueConfiguration;
import org.gcube.resourcemanagement.model.reference.entities.resources.Configuration;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class RestISConfigurationProxy extends ISConfigurationProxy {
public class RestISConfigurationProxy extends ISConfigurationProxy<Configuration> {
public RestISConfigurationProxy(String context) {
super(context);
@ -31,13 +34,13 @@ public class RestISConfigurationProxy extends ISConfigurationProxy {
}
@Override
protected Object getISResource() {
protected Configuration getISResource() {
// TODO Auto-generated method stub
return null;
}
@Override
protected ServiceCatalogueConfiguration updateOnIS(Object isResource) throws Exception {
protected ServiceCatalogueConfiguration updateOnIS(Configuration configuration) throws Exception {
// TODO Auto-generated method stub
return null;
}

View File

@ -1,4 +1,4 @@
package org.gcube.gcat.configuration;
package org.gcube.gcat.configuration.service;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;

View File

@ -1,4 +1,4 @@
package org.gcube.gcat.configuration;
package org.gcube.gcat.configuration.service;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;

View File

@ -31,7 +31,7 @@ import org.gcube.gcat.annotation.PURGE;
import org.gcube.gcat.api.GCatConstants;
import org.gcube.gcat.api.roles.Role;
import org.gcube.gcat.configuration.CatalogueConfigurationFactory;
import org.gcube.gcat.configuration.ServiceCatalogueConfiguration;
import org.gcube.gcat.configuration.service.ServiceCatalogueConfiguration;
import org.gcube.gcat.persistence.ckan.CKANUser;
import org.gcube.gcat.persistence.ckan.CKANUserCache;
import org.gcube.gcat.rest.BaseREST;

View File

@ -1,4 +1,4 @@
package org.gcube.gcat.configuration;
package org.gcube.gcat.configuration.isproxies;
import java.io.BufferedReader;
import java.io.InputStream;
@ -8,6 +8,7 @@ import java.util.stream.Collectors;
import org.gcube.common.authorization.utils.manager.SecretManagerProvider;
import org.gcube.gcat.ContextTest;
import org.gcube.gcat.configuration.service.ServiceCatalogueConfiguration;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;