summaryrefslogtreecommitdiffstats
path: root/northbound/daexim-offsite-backup/provider/src/main/java
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2021-02-17 15:25:45 -0500
committerDan Timoney <dtimoney@att.com>2021-02-18 16:05:55 -0500
commit69e393da4cce52a0491fffff2dc81fbe59aeca08 (patch)
tree404cc750fa69ba2a89c7a2fce921da34db5edda4 /northbound/daexim-offsite-backup/provider/src/main/java
parent56c27daf1656fd6436f8c818c771cf803079e1ea (diff)
Add new EnvProperties class
Added new class EnvProperties, which extends java.util.Properties and supports property values containing embedded environment variable references. Updated code to use this class to load svclogic.properties, and updated dmaap listener to use that class to load dmaap listener configuration. Issue-ID: SDNC-1482 Signed-off-by: Dan Timoney <dtimoney@att.com> Change-Id: I7538b719631d8c10c27d059aeb4f70ce92760ebd
Diffstat (limited to 'northbound/daexim-offsite-backup/provider/src/main/java')
-rwxr-xr-xnorthbound/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProvider.java3
-rwxr-xr-xnorthbound/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupUtil.java4
2 files changed, 4 insertions, 3 deletions
diff --git a/northbound/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProvider.java b/northbound/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProvider.java
index 7ee2a91d7..3d32c7d74 100755
--- a/northbound/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProvider.java
+++ b/northbound/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProvider.java
@@ -48,6 +48,7 @@ import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import javax.annotation.Nonnull;
import org.eclipse.jdt.annotation.NonNull;
+import org.onap.ccsdk.sli.core.utils.common.EnvProperties;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.DataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.RpcProviderService;
@@ -112,7 +113,7 @@ public class DaeximOffsiteBackupProvider implements AutoCloseable, DaeximOffsite
private void loadProperties() {
LOG.info("Loading properties from " + PROPERTIES_FILE);
if(properties == null)
- properties = new Properties();
+ properties = new EnvProperties();
File propertiesFile = new File(PROPERTIES_FILE);
if(!propertiesFile.exists()) {
LOG.warn("Properties file (" + PROPERTIES_FILE + ") not found. Using default properties.");
diff --git a/northbound/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupUtil.java b/northbound/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupUtil.java
index 7adb2fa1b..d53d2fcae 100755
--- a/northbound/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupUtil.java
+++ b/northbound/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupUtil.java
@@ -33,7 +33,7 @@ import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.daeximoffsiteb
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.daeximoffsitebackup.rev180926.RetrieveDataOutputBuilder;
import org.onap.ccsdk.sli.core.sli.provider.MdsalHelper;
-
+import org.onap.ccsdk.sli.core.utils.common.EnvProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -43,7 +43,7 @@ public class DaeximOffsiteBackupUtil extends MdsalHelper {
public static void loadProperties() {
File file = new File(PROPERTIES_FILE);
- Properties properties = new Properties();
+ Properties properties = new EnvProperties();
InputStream input = null;
if(file.isFile() && file.canRead()) {
try {