From 724a6bcfff1c6cd6ebc1e7d46a15a71e2e9e805d Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi Date: Wed, 6 Apr 2022 17:04:56 +0200 Subject: [PATCH] Base Implementations refactoring --- .../plugins/implementations/AbstractLifeCycleManager.java | 4 ++-- .../plugins/implementations/SimpleLifeCycleManager.java | 2 +- .../gcube/application/geoportal/service/PluginsTests.java | 7 +++++++ test-data/profiledDocuments/profiles/basicProfile.json | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 geoportal-service/src/test/java/org/gcube/application/geoportal/service/PluginsTests.java diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/implementations/AbstractLifeCycleManager.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/implementations/AbstractLifeCycleManager.java index 4d05dee..01e4e29 100644 --- a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/implementations/AbstractLifeCycleManager.java +++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/implementations/AbstractLifeCycleManager.java @@ -45,12 +45,12 @@ public abstract class AbstractLifeCycleManager extends AbstractPlugin implements protected void setEvent(GuardedEventManager m){ OperationDescriptor op= m.getOp(); DESCRIPTOR.getSupportedEvents().put(op.getId(),op); - registeredEvent.put(op.getDescription(),m); + registeredEvent.put(op.getId(),m); } protected void setStep(GuardedStepExecution e){ OperationDescriptor op= e.getOp(); DESCRIPTOR.getSupportedSteps().put(op.getId(),op); - registeredSteps.put(op.getDescription(),e); + registeredSteps.put(op.getId(),e); } public AbstractLifeCycleManager() { diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/implementations/SimpleLifeCycleManager.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/implementations/SimpleLifeCycleManager.java index 69e0ba8..f3ca3ea 100644 --- a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/implementations/SimpleLifeCycleManager.java +++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/implementations/SimpleLifeCycleManager.java @@ -26,7 +26,7 @@ import java.util.Collections; public class SimpleLifeCycleManager extends AbstractLifeCycleManager implements LifecycleManager { public SimpleLifeCycleManager() { - DESCRIPTOR.setId("DEFAULT-SINGLE-PHASE"); + DESCRIPTOR.setId("DEFAULT-SINGLE-STEP"); } diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/PluginsTests.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/PluginsTests.java new file mode 100644 index 0000000..ddb7c18 --- /dev/null +++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/PluginsTests.java @@ -0,0 +1,7 @@ +package org.gcube.application.geoportal.service; + +public class PluginsTests { + + + +} diff --git a/test-data/profiledDocuments/profiles/basicProfile.json b/test-data/profiledDocuments/profiles/basicProfile.json index 90caba3..45f3474 100644 --- a/test-data/profiledDocuments/profiles/basicProfile.json +++ b/test-data/profiledDocuments/profiles/basicProfile.json @@ -1,7 +1,7 @@ { "_id" : "basic", "_version" : "1.0.0", - "_name" : "Concessione", + "_name" : "Basic Use Case Descriptor", "_schema" : {},