summaryrefslogtreecommitdiffstats
path: root/sli
diff options
context:
space:
mode:
Diffstat (limited to 'sli')
-rwxr-xr-xsli/common/pom.xml4
-rw-r--r--sli/features/features-sli/pom.xml4
-rw-r--r--sli/features/odl-sli/pom.xml4
-rw-r--r--sli/features/pom.xml4
-rwxr-xr-xsli/installer/pom.xml4
-rwxr-xr-xsli/lighty/pom.xml47
-rw-r--r--sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/lighty/SliModule.java77
-rw-r--r--sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicAdaptorFactoryLighty.java53
-rw-r--r--sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicClassResolverLighty.java51
-rw-r--r--sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicPropertiesProviderImplLighty.java172
-rwxr-xr-xsli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImplLighty.java110
-rwxr-xr-xsli/model/pom.xml4
-rwxr-xr-xsli/pom.xml5
-rw-r--r--sli/provider-base/pom.xml4
-rwxr-xr-xsli/provider/pom.xml4
-rwxr-xr-xsli/recording/pom.xml4
16 files changed, 20 insertions, 531 deletions
diff --git a/sli/common/pom.xml b/sli/common/pom.xml
index 24e29b2e..63967b1f 100755
--- a/sli/common/pom.xml
+++ b/sli/common/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sli-common</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>ccsdk-sli-core :: sli :: ${project.artifactId}</name>
diff --git a/sli/features/features-sli/pom.xml b/sli/features/features-sli/pom.xml
index 8597432e..23224e10 100644
--- a/sli/features/features-sli/pom.xml
+++ b/sli/features/features-sli/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>features-sli</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<packaging>feature</packaging>
<name>ccsdk-sli-core :: sli :: ${project.artifactId}</name>
diff --git a/sli/features/odl-sli/pom.xml b/sli/features/odl-sli/pom.xml
index 8c46e819..069895df 100644
--- a/sli/features/odl-sli/pom.xml
+++ b/sli/features/odl-sli/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>ccsdk-sli</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<packaging>feature</packaging>
<name>ccsdk-sli-core :: sli :: ${project.artifactId}</name>
diff --git a/sli/features/pom.xml b/sli/features/pom.xml
index 871d41c3..780035b7 100644
--- a/sli/features/pom.xml
+++ b/sli/features/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sli-feature-aggregator</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ccsdk-sli-core :: sli :: ${project.artifactId}</name>
diff --git a/sli/installer/pom.xml b/sli/installer/pom.xml
index ad8a9200..723cd174 100755
--- a/sli/installer/pom.xml
+++ b/sli/installer/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sli-installer</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ccsdk-sli-core :: sli :: ${project.artifactId}</name>
diff --git a/sli/lighty/pom.xml b/sli/lighty/pom.xml
deleted file mode 100755
index c38ad286..00000000
--- a/sli/lighty/pom.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.onap.ccsdk.parent</groupId>
- <artifactId>binding-parent</artifactId>
- <version>1.4.0-SNAPSHOT</version>
- <relativePath/>
- </parent>
-
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-lighty</artifactId>
- <version>0.6.0-SNAPSHOT</version>
- <packaging>jar</packaging>
-
- <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name>
- <url>http://maven.apache.org</url>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>ccsdk-lighty-dependency-versions</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>io.lighty.core</groupId>
- <artifactId>lighty-controller</artifactId>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-provider</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/lighty/SliModule.java b/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/lighty/SliModule.java
deleted file mode 100644
index d4846932..00000000
--- a/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/lighty/SliModule.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * ============LICENSE_START==========================================
- * Copyright (c) 2019 PANTHEON.tech s.r.o.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- *
- */
-package org.onap.ccsdk.sli.core.sli.lighty;
-
-import io.lighty.core.controller.api.AbstractLightyModule;
-import org.onap.ccsdk.sli.core.dblib.DbLibService;
-import org.onap.ccsdk.sli.core.sli.SvcLogicAdaptor;
-import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
-import org.onap.ccsdk.sli.core.sli.SvcLogicRecorder;
-import org.onap.ccsdk.sli.core.sli.SvcLogicResource;
-import org.onap.ccsdk.sli.core.sli.provider.SvcLogicClassResolverLighty;
-import org.onap.ccsdk.sli.core.sli.provider.SvcLogicPropertiesProviderImpl;
-import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService;
-import org.onap.ccsdk.sli.core.sli.provider.SvcLogicServiceImplLighty;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The implementation of the {@link io.lighty.core.controller.api.LightyModule} that manages and provides services from
- * the sli-provider artifact.
- */
-public class SliModule extends AbstractLightyModule {
-
- private static final Logger LOG = LoggerFactory.getLogger(SliModule.class);
-
- private final DbLibService dbLibService;
- private final SvcLogicResource svcLogicResource;
- private final SvcLogicRecorder svcLogicRecorder;
- private final SvcLogicJavaPlugin svcLogicJavaPlugin;
- private final SvcLogicAdaptor svcLogicAdaptor;
-
- private SvcLogicPropertiesProviderImpl svcLogicPropertiesImpl;
- private SvcLogicServiceImplLighty svcLogicImpl;
- private SvcLogicClassResolverLighty svcLogicClassResolver;
-
- public SliModule(DbLibService dbLibService, SvcLogicResource svcLogicResource, SvcLogicRecorder svcLogicRecorder,
- SvcLogicJavaPlugin svcLogicJavaPlugin, SvcLogicAdaptor svcLogicAdaptor) {
- this.dbLibService = dbLibService;
- this.svcLogicResource = svcLogicResource;
- this.svcLogicRecorder = svcLogicRecorder;
- this.svcLogicJavaPlugin = svcLogicJavaPlugin;
- this.svcLogicAdaptor = svcLogicAdaptor;
- }
-
- @Override
- protected boolean initProcedure() {
- this.svcLogicPropertiesImpl = new SvcLogicPropertiesProviderImpl();
- this.svcLogicClassResolver = new SvcLogicClassResolverLighty(svcLogicResource, svcLogicRecorder,
- svcLogicJavaPlugin, svcLogicAdaptor);
- this.svcLogicImpl = new SvcLogicServiceImplLighty(this.svcLogicPropertiesImpl, dbLibService,
- svcLogicClassResolver);
- return true;
- }
-
- @Override
- protected boolean stopProcedure() {
- return true;
- }
-
- public SvcLogicService getSvcLogicServiceImpl() {
- return this.svcLogicImpl;
- }
-}
diff --git a/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicAdaptorFactoryLighty.java b/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicAdaptorFactoryLighty.java
deleted file mode 100644
index d60e4311..00000000
--- a/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicAdaptorFactoryLighty.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP : CCSDK
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.ccsdk.sli.core.sli.provider;
-
-import java.util.HashMap;
-import org.onap.ccsdk.sli.core.sli.SvcLogicAdaptor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * THIS CLASS IS A COPY OF {@link SvcLogicAdaptorFactory} WITH REMOVED OSGi DEPENDENCIES
- */
-public class SvcLogicAdaptorFactoryLighty {
-
- private static final Logger LOG = LoggerFactory
- .getLogger(SvcLogicAdaptorFactoryLighty.class);
-
- private static HashMap<String, SvcLogicAdaptor> adaptorMap = new HashMap<>();
-
- public static void registerAdaptor(SvcLogicAdaptor adaptor) {
- String name = adaptor.getClass().getName();
- LOG.info("Registering adaptor " + name);
- adaptorMap.put(name, adaptor);
-
- }
-
- public static void unregisterAdaptor(String name) {
- if (adaptorMap.containsKey(name)) {
- LOG.info("Unregistering " + name);
- adaptorMap.remove(name);
- }
- }
-
-}
diff --git a/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicClassResolverLighty.java b/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicClassResolverLighty.java
deleted file mode 100644
index 7b730a8e..00000000
--- a/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicClassResolverLighty.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.onap.ccsdk.sli.core.sli.provider;
-
-import org.onap.ccsdk.sli.core.sli.SvcLogicAdaptor;
-import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
-import org.onap.ccsdk.sli.core.sli.SvcLogicRecorder;
-import org.onap.ccsdk.sli.core.sli.SvcLogicResource;
-import org.onap.ccsdk.sli.core.sli.provider.base.SvcLogicResolver;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * THIS CLASS IS A COPY OF {@link SvcLogicClassResolver} WITH REMOVED OSGi DEPENDENCIES
- */
-public class SvcLogicClassResolverLighty implements SvcLogicResolver {
-
- private static final Logger LOG = LoggerFactory.getLogger(SvcLogicClassResolverLighty.class);
-
- private final SvcLogicResource svcLogicResource;
- private final SvcLogicRecorder svcLogicRecorder;
- private final SvcLogicJavaPlugin svcLogicJavaPlugin;
- private final SvcLogicAdaptor svcLogicAdaptor;
-
- public SvcLogicClassResolverLighty(SvcLogicResource svcLogicResource, SvcLogicRecorder svcLogicRecorder,
- SvcLogicJavaPlugin svcLogicJavaPlugin, SvcLogicAdaptor svcLogicAdaptor) {
- this.svcLogicResource = svcLogicResource;
- this.svcLogicRecorder = svcLogicRecorder;
- this.svcLogicJavaPlugin = svcLogicJavaPlugin;
- this.svcLogicAdaptor = svcLogicAdaptor;
- }
-
- @Override
- public SvcLogicResource getSvcLogicResource(String resourceName) {
- return svcLogicResource;
- }
-
- @Override
- public SvcLogicRecorder getSvcLogicRecorder(String recorderName) {
- return svcLogicRecorder;
- }
-
- @Override
- public SvcLogicJavaPlugin getSvcLogicJavaPlugin(String pluginName) {
- return svcLogicJavaPlugin;
- }
-
- @Override
- public SvcLogicAdaptor getSvcLogicAdaptor(String adaptorName) {
- return svcLogicAdaptor;
- }
-
-}
diff --git a/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicPropertiesProviderImplLighty.java b/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicPropertiesProviderImplLighty.java
deleted file mode 100644
index dfc5855f..00000000
--- a/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicPropertiesProviderImplLighty.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * onap
- * ================================================================================
- * Copyright (C) 2016 - 2017 ONAP
- * Modifications Copyright (C) 2018 IBM.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.ccsdk.sli.core.sli.provider;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Optional;
-import java.util.Properties;
-import java.util.Vector;
-import org.onap.ccsdk.sli.core.sli.ConfigurationException;
-import org.onap.ccsdk.sli.core.sli.provider.base.SvcLogicPropertiesProvider;
-import org.onap.ccsdk.sli.core.utils.KarafRootFileResolver;
-import org.onap.ccsdk.sli.core.utils.PropertiesFileResolver;
-import org.onap.ccsdk.sli.core.utils.common.CoreDefaultFileResolver;
-import org.onap.ccsdk.sli.core.utils.common.SdncConfigEnvVarFileResolver;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * THIS CLASS IS A COPY OF {@link SvcLogicPropertiesProviderImpl} WITH REMOVED OSGi DEPENDENCIES
- */
-public class SvcLogicPropertiesProviderImplLighty implements SvcLogicPropertiesProvider {
-
- private static final Logger log = LoggerFactory.getLogger(SvcLogicPropertiesProviderImplLighty.class);
-
- /**
- * The name of the properties file for database configuration
- */
- private static final String SVCLOGIC_PROP_FILE_NAME = "svclogic.properties";
-
- /**
- * A prioritized list of strategies for resolving dblib properties files.
- */
- private Vector<PropertiesFileResolver> sliPropertiesFileResolvers = new Vector<>();
-
- /**
- * The configuration properties for the db connection.
- */
- private Properties properties;
-
- /**
- * Set up the prioritized list of strategies for resolving dblib properties
- * files.
- */
- public SvcLogicPropertiesProviderImplLighty() {
- sliPropertiesFileResolvers
- .add(new SdncConfigEnvVarFileResolver("Using property file (1) from environment variable"));
- sliPropertiesFileResolvers.add(new CoreDefaultFileResolver("Using property file (2) from default directory"));
- sliPropertiesFileResolvers.add(new KarafRootFileResolver("Using property file (4) from karaf root", this));
-
- // determines properties file as according to the priority described in the
- // class header comment
- final File propertiesFile = determinePropertiesFile(this);
- if (propertiesFile != null) {
- try (FileInputStream fileInputStream = new FileInputStream(propertiesFile)) {
- properties = new Properties();
- properties.load(fileInputStream);
- } catch (final IOException e) {
- log.error("Failed to load properties for file: {}", propertiesFile.toString(),
- new ConfigurationException("Failed to load properties for file: " + propertiesFile.toString(),
- e));
- }
- } else {
- // Try to read properties as resource
-
- InputStream propStr = getClass().getResourceAsStream("/" + SVCLOGIC_PROP_FILE_NAME);
- if (propStr != null) {
- properties = new Properties();
- try {
- properties.load(propStr);
- propStr.close();
- } catch (IOException e) {
- log.error("IO Exception",e);
- properties = null;
- }
- }
-
- }
-
- if (properties == null) {
- reportFailure("Missing configuration properties resource(3)", new ConfigurationException(
- "Missing configuration properties resource(3): " + SVCLOGIC_PROP_FILE_NAME));
- }
- }
-
- /**
- * Extract svclogic config properties.
- *
- * @return the svclogic config properties
- */
- public Properties getProperties() {
- return properties;
- }
-
- /**
- * Reports the method chosen for properties resolution to the
- * <code>Logger</code>.
- *
- * @param message
- * Some user friendly message
- * @param fileOptional
- * The file location of the chosen properties file
- * @return the file location of the chosen properties file
- */
- private static File reportSuccess(final String message, final Optional<File> fileOptional) {
- if (fileOptional.isPresent()) {
- final File file = fileOptional.get();
- log.info("{} {}", message, file.getPath());
- return file;
- }
- return null;
- }
-
- /**
- * Reports fatal errors. This is the case in which no properties file could be
- * found.
- *
- * @param message
- * An appropriate fatal error message
- * @param configurationException
- * An exception describing what went wrong during resolution
- */
- private static void reportFailure(final String message, final ConfigurationException configurationException) {
-
- log.error("{}", message, configurationException);
- }
-
- /**
- * Determines the dblib properties file to use based on the following priority:
- * <ol>
- * <li>A directory identified by the system environment variable
- * <code>SDNC_CONFIG_DIR</code></li>
- * <li>The default directory <code>DEFAULT_DBLIB_PROP_DIR</code></li>
- * <li>A directory identified by the JRE argument
- * <code>dblib.properties</code></li>
- * <li>A <code>dblib.properties</code> file located in the karaf root
- * directory</li>
- * </ol>
- */
- File determinePropertiesFile(final SvcLogicPropertiesProviderImplLighty resourceProvider) {
-
- for (final PropertiesFileResolver sliPropertiesFileResolver : sliPropertiesFileResolvers) {
- final Optional<File> fileOptional = sliPropertiesFileResolver.resolveFile(SVCLOGIC_PROP_FILE_NAME);
- if (fileOptional.isPresent()) {
- return reportSuccess(sliPropertiesFileResolver.getSuccessfulResolutionMessage(), fileOptional);
- }
- }
-
- return null;
- }
-}
diff --git a/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImplLighty.java b/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImplLighty.java
deleted file mode 100755
index b9740c58..00000000
--- a/sli/lighty/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImplLighty.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP : CCSDK
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
- * ================================================================================
- * Modifications Copyright (C) 2018 IBM.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.ccsdk.sli.core.sli.provider;
-
-import java.util.Properties;
-import org.onap.ccsdk.sli.core.dblib.DbLibService;
-import org.onap.ccsdk.sli.core.sli.ConfigurationException;
-import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
-import org.onap.ccsdk.sli.core.sli.SvcLogicDblibStore;
-import org.onap.ccsdk.sli.core.sli.SvcLogicException;
-import org.onap.ccsdk.sli.core.sli.SvcLogicGraph;
-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.SvcLogicPropertiesProvider;
-import org.onap.ccsdk.sli.core.sli.provider.base.SvcLogicResolver;
-import org.onap.ccsdk.sli.core.sli.provider.base.SvcLogicServiceImplBase;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
-
-/**
- * THIS CLASS IS A COPY OF {@link SvcLogicServiceImpl} WITH REMOVED OSGi DEPENDENCIES
- */
-public class SvcLogicServiceImplLighty extends SvcLogicServiceImplBase implements SvcLogicService {
-
- private static final Logger LOG = LoggerFactory.getLogger(SvcLogicServiceImplLighty.class);
-
- public SvcLogicServiceImplLighty(SvcLogicPropertiesProvider resourceProvider, DbLibService dbSvc,
- SvcLogicResolver resolver) {
- super(null);
- this.resolver = resolver;
- properties = resourceProvider.getProperties();
- this.store = new SvcLogicDblibStore(dbSvc);
- }
-
- @Override
- public Properties execute(String module, String rpc, String version, String mode, Properties props)
- throws SvcLogicException {
- return (execute(module, rpc, version, mode, props, null));
- }
-
- @Override
- public Properties execute(String module, String rpc, String version, String mode, Properties props,
- DOMDataBroker domDataBroker) throws SvcLogicException {
- LOG.info("Fetching service logic from data store");
- SvcLogicGraph graph = store.fetch(module, rpc, version, mode);
-
- if (graph == null) {
- Properties retProps = new Properties();
- retProps.setProperty("error-code", "401");
- retProps.setProperty("error-message",
- "No service logic found for [" + module + "," + rpc + "," + version + "," + mode + "]");
- return (retProps);
- }
-
- SvcLogicContext ctx = new SvcLogicContext(props);
- ctx.setAttribute(CURRENT_GRAPH, graph.toString());
- ctx.setAttribute("X-ECOMP-RequestID", MDC.get("X-ECOMP-RequestID"));
- ctx.setDomDataBroker(domDataBroker);
- execute(graph, ctx);
- return (ctx.toProperties());
- }
-
- @Override
- public SvcLogicStore getStore() throws SvcLogicException {
- // Create and initialize SvcLogicStore object - used to access
- // saved service logic.
- if (store != null) {
- return store;
- }
-
- try {
- store = SvcLogicStoreFactory.getSvcLogicStore(properties);
- } catch (Exception e) {
- throw new ConfigurationException("Could not get service logic store", e);
-
- }
-
- try {
- store.init(properties);
- } catch (SvcLogicException e) {
- throw new ConfigurationException("Could not get service logic store", e);
- }
-
- return store;
- }
-
-}
diff --git a/sli/model/pom.xml b/sli/model/pom.xml
index 243223e1..7882669f 100755
--- a/sli/model/pom.xml
+++ b/sli/model/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sli-model</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>ccsdk-sli-core :: sli :: ${project.artifactId}</name>
diff --git a/sli/pom.xml b/sli/pom.xml
index bf21cb63..91c52020 100755
--- a/sli/pom.xml
+++ b/sli/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sli</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ccsdk-sli-core :: sli</name>
@@ -28,6 +28,5 @@
<module>recording</module>
<module>features</module>
<module>installer</module>
- <module>lighty</module>
</modules>
</project>
diff --git a/sli/provider-base/pom.xml b/sli/provider-base/pom.xml
index d1dd6293..72943918 100644
--- a/sli/provider-base/pom.xml
+++ b/sli/provider-base/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sli-provider-base</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<properties>
diff --git a/sli/provider/pom.xml b/sli/provider/pom.xml
index 1326ef7a..783fbb91 100755
--- a/sli/provider/pom.xml
+++ b/sli/provider/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sli-provider</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>ccsdk-sli-core :: sli :: ${project.artifactId}</name>
diff --git a/sli/recording/pom.xml b/sli/recording/pom.xml
index de8a5644..c0c0e256 100755
--- a/sli/recording/pom.xml
+++ b/sli/recording/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sli-recording</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>ccsdk-sli-core :: sli :: ${project.artifactId}</name>