From 574363f5a29ac9237a377c4c0923b414a38fddec Mon Sep 17 00:00:00 2001 From: Samuel Kontris Date: Wed, 4 Sep 2019 15:31:48 +0200 Subject: Refactor class/instance loading and resolving in the SLI module Code from the static class SvcLogicAdaptorFactory is moved to the SvcLogicClassResolver class. Class SvcLogicClassResolver is created as a bean in the blueprint xml file, not as singleton directly in the code. Then is injected via blueprint into the SvcLogicServiceImpl. Methods registerExecutor and unregisterExecutor from the SvcLogicServiceImpl class are removed - are not used anywhere. This change causes compilation error in the northbound repository. Fix for this error is here: https://gerrit.onap.org/r/#/c/ccsdk/sli/northbound/+/95053/ Issue-ID: CCSDK-1688 Change-Id: I26ce01b761ab5d17f1cc19e39af581b1963658a5 Signed-off-by: Samuel Kontris --- .../test/java/org/onap/ccsdk/sli/core/sliapi/TestSliapiProvider.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sliapi/provider') diff --git a/sliapi/provider/src/test/java/org/onap/ccsdk/sli/core/sliapi/TestSliapiProvider.java b/sliapi/provider/src/test/java/org/onap/ccsdk/sli/core/sliapi/TestSliapiProvider.java index c898ffff..f48cf783 100644 --- a/sliapi/provider/src/test/java/org/onap/ccsdk/sli/core/sliapi/TestSliapiProvider.java +++ b/sliapi/provider/src/test/java/org/onap/ccsdk/sli/core/sliapi/TestSliapiProvider.java @@ -18,13 +18,13 @@ import java.util.List; import java.util.Map; import java.util.Properties; import java.util.concurrent.Future; - import org.junit.After; import org.junit.Before; import org.junit.Test; import org.onap.ccsdk.sli.core.sli.SvcLogicParser; import org.onap.ccsdk.sli.core.sli.SvcLogicStore; import org.onap.ccsdk.sli.core.sli.SvcLogicStoreFactory; +import org.onap.ccsdk.sli.core.sli.provider.SvcLogicClassResolver; import org.onap.ccsdk.sli.core.sli.provider.SvcLogicPropertiesProviderImpl; import org.onap.ccsdk.sli.core.sli.provider.SvcLogicServiceImpl; import org.onap.ccsdk.sli.core.sli.provider.base.AbstractSvcLogicNodeExecutor; @@ -124,7 +124,8 @@ public class TestSliapiProvider { SvcLogicParser.activate("sli", "healthcheck", "1.0.0", "sync", store); // Create a ServiceLogicService and initialize it - SvcLogicServiceImpl svc = new SvcLogicServiceImpl(new SvcLogicPropertiesProviderImpl()); + SvcLogicServiceImpl svc = new SvcLogicServiceImpl(new SvcLogicPropertiesProviderImpl(), + new SvcLogicClassResolver()); for (String nodeType : BUILTIN_NODES.keySet()) { svc.registerExecutor(nodeType, BUILTIN_NODES.get(nodeType)); } -- cgit 1.2.3-korg