aboutsummaryrefslogtreecommitdiffstats
path: root/services/src
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-07-30 13:55:59 -0400
committerKevin Smokowski <kevin.smokowski@att.com>2020-07-31 17:44:39 +0000
commit8804a42d24f2f29b135fc0675bfe8ff987bde8f6 (patch)
tree89fb876925b92a563fc641a72401db42725820fb /services/src
parent385874a6fd067cb17323a27ecd1af62b4176aecc (diff)
Register SqlResource in SvcLogicMap
Register SqlResource in hashmap used to locate services in springboot Change-Id: I48ee488848db1e2f593cc332f5b69c804f78edc7 Issue-ID: CCSDK-2626 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'services/src')
-rw-r--r--services/src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/services/src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java b/services/src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java
index 8711e7ed..c2fa1010 100644
--- a/services/src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java
+++ b/services/src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java
@@ -24,10 +24,13 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
import java.util.Properties;
+
+import org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource;
import org.onap.ccsdk.sli.core.sli.ConfigurationException;
import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
import org.onap.ccsdk.sli.core.sli.SvcLogicLoader;
import org.onap.ccsdk.sli.core.sli.SvcLogicRecorder;
+import org.onap.ccsdk.sli.core.sli.SvcLogicResource;
import org.onap.ccsdk.sli.core.sli.SvcLogicStore;
import org.onap.ccsdk.sli.core.sli.SvcLogicStoreFactory;
import org.onap.ccsdk.sli.core.sli.provider.base.HashMapResolver;
@@ -57,6 +60,9 @@ public class SvcLogicFactory {
@Autowired
List<SvcLogicJavaPlugin> plugins;
+ @Autowired
+ List<SvcLogicResource> svcLogicResources;
+
@Bean
public SvcLogicStore getStore() throws Exception {
SvcLogicPropertiesProvider propProvider = new SvcLogicPropertiesProvider() {
@@ -120,6 +126,10 @@ public class SvcLogicFactory {
resolver.addSvcLogicSvcLogicJavaPlugin(plugin.getClass().getName(), plugin);
}
+ for (SvcLogicResource svcLogicResource : svcLogicResources) {
+ resolver.addSvcLogicResource(svcLogicResource.getClass().getName(), svcLogicResource);
+ }
+
return new SvcLogicServiceImplBase(getStore(), resolver);
}
@@ -148,4 +158,10 @@ public class SvcLogicFactory {
return new PropertiesNode();
}
+ @Bean
+ public SqlResource sqlResource() {
+ return new SqlResource();
+ }
+
+
}