summaryrefslogtreecommitdiffstats
path: root/sliapi/provider
diff options
context:
space:
mode:
authorSamuel Kontris <samuel.kontris@pantheon.tech>2019-09-04 15:31:48 +0200
committerDan Timoney <dtimoney@att.com>2019-10-15 18:19:47 +0000
commit574363f5a29ac9237a377c4c0923b414a38fddec (patch)
tree7f74f7e8acfc05055bd3ff281e57d6b0c37cb982 /sliapi/provider
parent4999c933f01789a4f71eb34cc32c7377c62ee2dd (diff)
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 <samuel.kontris@pantheon.tech>
Diffstat (limited to 'sliapi/provider')
-rw-r--r--sliapi/provider/src/test/java/org/onap/ccsdk/sli/core/sliapi/TestSliapiProvider.java5
1 files changed, 3 insertions, 2 deletions
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 c898ffffe..f48cf783b 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));
}