summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/pom.xml5
-rw-r--r--services/src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java16
2 files changed, 21 insertions, 0 deletions
diff --git a/services/pom.xml b/services/pom.xml
index 004e55e0..0520aef0 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -112,6 +112,11 @@
<version>${ccsdk.sli.core.version}</version>
</dependency>
<dependency>
+ <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+ <artifactId>sql-resource-provider</artifactId>
+ <version>${ccsdk.sli.adaptors.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.onap.ccsdk.sli.plugins</groupId>
<artifactId>restapi-call-node-provider</artifactId>
<version>${ccsdk.sli.plugins.version}</version>
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();
+ }
+
+
}