diff --git a/use-cases/src/test/java/org/gcube/application/cms/usecases/legacyConcessioni/Import.java b/use-cases/src/test/java/org/gcube/application/cms/usecases/legacyConcessioni/Import.java index b17e8f5..6e8fdb3 100644 --- a/use-cases/src/test/java/org/gcube/application/cms/usecases/legacyConcessioni/Import.java +++ b/use-cases/src/test/java/org/gcube/application/cms/usecases/legacyConcessioni/Import.java @@ -4,15 +4,20 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.gcube.application.cms.tests.TokenSetter; import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI; +import org.gcube.application.geoportal.client.legacy.MongoConcessioniPlugin; +import org.gcube.application.geoportal.client.legacy.StatefulMongoConcessioniPlugin; +import org.gcube.application.geoportal.client.plugins.GeoportalAbstractPlugin; import org.gcube.application.geoportal.client.utils.Serialization; import org.gcube.application.geoportal.common.model.legacy.AssociatedContent; import org.gcube.application.geoportal.common.model.legacy.Concessione; import org.gcube.application.geoportal.common.model.legacy.PersistedContent; import org.gcube.application.geoportal.common.model.legacy.WorkspaceContent; +import org.gcube.common.clients.ProxyBuilderImpl; import org.gcube.common.storagehub.client.dsl.FileContainer; import org.gcube.common.storagehub.client.dsl.StorageHubClient; import org.gcube.common.storagehub.model.exceptions.StorageHubException; +import javax.ws.rs.client.WebTarget; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -36,10 +41,11 @@ public class Import { File dir=new File("import"+System.currentTimeMillis()); dir.mkdirs(); - String sourceContext="/d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype"; + String sourceContext="/d4science.research-infrastructures.eu/D4OS/GNA"; // String sourceContext="/pred4s/preprod/preVRE"; + Boolean saveFilesLocally=false; @@ -48,8 +54,19 @@ public class Import { StorageHubClient sgClient=new StorageHubClient(); + // need to override IS coordinates + StatefulMongoConcessioniPlugin stateful_mongo_concessioni_plugin= new StatefulMongoConcessioniPlugin(){ + @Override + public String serviceClass(){return "Application";} + + @Override + public String serviceName(){return "GeoPortal";} + + };; + + ConcessioniManagerI sourceManager= new ProxyBuilderImpl(stateful_mongo_concessioni_plugin).build(); + - ConcessioniManagerI sourceManager= statefulMongoConcessioni().build(); ArrayList found=new ArrayList<>(); Map errors = new HashMap<>();