From 9f292d4f7c3b7d008b67eb02655b61b420e8d2c1 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 20 Oct 2020 16:32:43 -0400 Subject: Add bean wrappers Add bean wrappers for additional nodes in sli/adaptors Change-Id: I728d8e92d0ce50919d221339d7d9ab703a22d12e Issue-ID: CCSDK-2924 Signed-off-by: Dan Timoney --- services/pom.xml | 20 +++++++++ .../onap/ccsdk/apps/services/SvcLogicFactory.java | 48 ++++++++++++++++++++-- 2 files changed, 64 insertions(+), 4 deletions(-) (limited to 'services') diff --git a/services/pom.xml b/services/pom.xml index e828e812..329b7bf6 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -105,11 +105,31 @@ javax.servlet javax.servlet-api + + org.onap.ccsdk.sli.core + utils-provider + ${ccsdk.sli.core.version} + org.onap.ccsdk.sli.core sliPluginUtils-provider ${ccsdk.sli.core.version} + + org.onap.ccsdk.sli.adaptors + mdsal-resource-provider + ${ccsdk.sli.adaptors.version} + + + org.onap.ccsdk.sli.adaptors.messagerouter + publisher.provider + ${ccsdk.sli.adaptors.version} + + + org.onap.ccsdk.sli.adaptors + netbox-client-provider + ${ccsdk.sli.adaptors.version} + org.onap.ccsdk.sli.adaptors sql-resource-provider 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 c2fa1010..f7e3662f 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 @@ -25,7 +25,19 @@ import java.io.IOException; import java.util.List; import java.util.Properties; +import org.onap.ccsdk.sli.adaptors.messagerouter.publisher.api.PublisherApi; +import org.onap.ccsdk.sli.adaptors.messagerouter.publisher.provider.impl.PublisherApiImpl; +import org.onap.ccsdk.sli.adaptors.netbox.api.NetboxClient; +import org.onap.ccsdk.sli.adaptors.netbox.impl.NetboxClientImpl; +import org.onap.ccsdk.sli.adaptors.netbox.impl.NetboxHttpClient; +import org.onap.ccsdk.sli.adaptors.netbox.property.NetboxProperties; +import org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource; +import org.onap.ccsdk.sli.adaptors.resource.mdsal.MdsalResourcePropertiesProviderImpl; +import org.onap.ccsdk.sli.adaptors.resource.mdsal.OperationalResource; import org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource; +import org.onap.ccsdk.sli.core.dblib.DBLIBResourceProvider; +import org.onap.ccsdk.sli.core.dblib.DBResourceManager; +import org.onap.ccsdk.sli.core.dblib.DbLibService; import org.onap.ccsdk.sli.core.sli.ConfigurationException; import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; import org.onap.ccsdk.sli.core.sli.SvcLogicLoader; @@ -138,6 +150,8 @@ public class SvcLogicFactory { return new Slf4jRecorder(); } + // Beans from sli/core + @Bean public SliPluginUtils sliPluginUtil() { return new SliPluginUtils(); @@ -147,6 +161,36 @@ public class SvcLogicFactory { public SliStringUtils sliStringUtils() { return new SliStringUtils(); } + + // Beans from sli/adaptors + + @Bean + public ConfigResource configResource() { + return new ConfigResource(new MdsalResourcePropertiesProviderImpl()); + } + + @Bean + public OperationalResource operationalResource() { + return new OperationalResource(new MdsalResourcePropertiesProviderImpl()); + } + + @Bean + public PublisherApi publisherApi() { + return new PublisherApiImpl(); + } + + + @Bean + public NetboxClient netboxClient() { + return new NetboxClientImpl(); + } + + + @Bean + public SqlResource sqlResource() { + return new SqlResource(); + } + @Bean public RestapiCallNode restapiCallNode() { @@ -158,10 +202,6 @@ public class SvcLogicFactory { return new PropertiesNode(); } - @Bean - public SqlResource sqlResource() { - return new SqlResource(); - } } -- cgit 1.2.3-korg