Moved ImplementationProvider to framework

This commit is contained in:
Fabio Sinibaldi 2022-02-18 18:10:53 +01:00
parent f383d1b86a
commit 02ce058348
3 changed files with 22 additions and 44 deletions

View File

@ -1,4 +1,10 @@
package org.gcube.application.cms.implementations;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
public interface ISInterface {
public DatabaseConnection queryForDatabase(String platform, String flag) throws ConfigurationException;
}

View File

@ -4,7 +4,6 @@ package org.gcube.application.cms.implementations;
import lombok.Synchronized;
import org.gcube.application.cms.caches.Engine;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.gcube.application.geoportal.service.engine.providers.*;
import java.util.concurrent.ConcurrentHashMap;
@ -31,46 +30,4 @@ public class ImplementationProvider {
implementationsRegistry.put(clazz,engine);
}
// @Getter
// @Setter
// private MongoClientProvider mongoClientProvider=new MongoClientProvider();
//
//
// @Getter
// @Setter
// private StorageClientProvider storageProvider=new StorageClientProvider();
//
// @Getter
// @Setter
// private PostgisConnectionProvider dbProvider=new PostgisConnectionProvider();
//
// @Getter
// @Setter
// private ISProvider isProvider=new ISProvider();
//
// @Getter
// @Setter
// private ProfileMapCache profiles=new ProfileMapCache();
//
// @Getter
// @Setter
// private PluginManager pluginManager=new PluginManager();
//
// @Getter
// @Setter
// private StorageHubProvider sHubProvider=new StorageHubProvider();
//
// public void shutdown() {
// // Stop JPA
//// AbstractRecordManager.shutdown();
//
// mongoClientProvider.shutdown();
// pluginManager.shutdown();
// }
//
// public void startup() {
//// AbstractRecordManager.setDefaultProvider(emfProvider);
// pluginManager.init();
// mongoClientProvider.init();
// }
}

View File

@ -5,6 +5,7 @@ import org.gcube.application.cms.plugins.requests.EventExecutionRequest;
import org.gcube.application.cms.plugins.requests.StepExecutionRequest;
import org.gcube.application.geoportal.common.model.document.ProfiledDocument;
import java.util.ArrayList;
import java.util.List;
@Data
@ -13,4 +14,18 @@ public class StepExecutionReport extends DocumentHandlingReport<StepExecutionReq
List<EventExecutionRequest> toTriggerEvents;
List<StepExecutionRequest> cascadeSteps;
public StepExecutionReport addToTriggerEvent(EventExecutionRequest req){
if(toTriggerEvents==null) toTriggerEvents = new ArrayList<>();
toTriggerEvents.add(req);
return this;
}
public StepExecutionReport addCascadeStep(StepExecutionRequest req){
if(cascadeSteps == null ) cascadeSteps = new ArrayList<>();
cascadeSteps.add(req);
return this;
}
}