X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Futils%2FAafPropsUtils.java;h=6b78d21dfd872d2f0011745abcd22eeb8832579e;hb=adb2ad2d16e851fbf8dcc71af68949a74463204d;hp=68981599891ffd5e5cbb60f7e53347e7ab423f43;hpb=1ccd9c36ba12849148f9eb73e8ff2ffe4ade5870;p=dmaap%2Fdatarouter.git diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/AafPropsUtils.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/AafPropsUtils.java index 68981599..6b78d21d 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/AafPropsUtils.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/AafPropsUtils.java @@ -29,10 +29,8 @@ import org.onap.aaf.cadi.PropAccess; public class AafPropsUtils { - private static AafPropsUtils aafPropsUtilsInstance = null; private static EELFLogger eelfLogger = EELFManager.getInstance().getLogger(AafPropsUtils.class); - public static final String DEFAULT_TRUSTSTORE = "/opt/app/osaaf/local/org.onap.dmaap-dr.trust.jks"; public static final String KEYSTORE_TYPE_PROPERTY = "PKCS12"; public static final String TRUESTSTORE_TYPE_PROPERTY = "jks"; private static final String KEYSTORE_PATH_PROPERTY = "cadi_keystore"; @@ -42,7 +40,7 @@ public class AafPropsUtils { private PropAccess propAccess; - private AafPropsUtils(File propsFile) throws IOException { + public AafPropsUtils(File propsFile) throws IOException { propAccess = new PropAccess(); try { propAccess.load(new FileInputStream(propsFile)); @@ -52,20 +50,6 @@ public class AafPropsUtils { } } - public static synchronized void init(File propsFile) throws IOException { - if (aafPropsUtilsInstance != null) { - throw new IllegalStateException("Already initialized"); - } - aafPropsUtilsInstance = new AafPropsUtils(propsFile); - } - - public static AafPropsUtils getInstance() { - if (aafPropsUtilsInstance == null) { - throw new IllegalStateException("Call AafPropsUtils.init(File propsFile) first"); - } - return aafPropsUtilsInstance; - } - private String decryptedPass(String password) { String decryptedPass = null; try { @@ -77,9 +61,6 @@ public class AafPropsUtils { } public PropAccess getPropAccess() { - if (propAccess == null) { - throw new IllegalStateException("Call AafPropsUtils.init(File propsFile) first"); - } return propAccess; }