aboutsummaryrefslogtreecommitdiffstats
path: root/services/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'services/src/main')
-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();
+ }
+
+
}