X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=asdc-controller%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fso%2Fasdc%2Fclient%2FASDCConfiguration.java;h=83515522230a502582bd2289563db5cbf9469ebd;hb=825e00a29f1ebd4f28cdd4f4fd1ace0a47e2292c;hp=c2b3ffddca3bb43415c3cc316a8004cf2664c37c;hpb=aa3a520e7b85bbebf8b1f603bd1979154204f718;p=so.git diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java index c2b3ffddca..8351552223 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java @@ -24,7 +24,6 @@ package org.onap.so.asdc.client; import java.security.GeneralSecurityException; import java.util.Arrays; -import java.util.Collections; import java.util.List; import org.onap.sdc.api.consumer.IConfiguration; import org.onap.so.utils.CryptoUtils; @@ -42,7 +41,7 @@ public class ASDCConfiguration implements IConfiguration { // echo -n "This is a test string" | openssl aes-128-ecb -e -K 546573746F736973546573746F736973 // -nosalt | xxd - private static Logger logger = LoggerFactory.getLogger(ASDCConfiguration.class); + private static final Logger logger = LoggerFactory.getLogger(ASDCConfiguration.class); private String asdcControllerName; @@ -64,8 +63,7 @@ public class ASDCConfiguration implements IConfiguration { HEAT_VOL, OTHER, TOSCA_CSAR, VF_MODULES_METADATA, WORKFLOW, CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT, HELM}; - public static final List SUPPORTED_ARTIFACT_TYPES_LIST = - Collections.unmodifiableList(Arrays.asList(SUPPORTED_ARTIFACT_TYPES)); + public static final List SUPPORTED_ARTIFACT_TYPES_LIST = List.of(SUPPORTED_ARTIFACT_TYPES); @Autowired private Environment env; @@ -73,20 +71,12 @@ public class ASDCConfiguration implements IConfiguration { @Value("${mso.asdc.config.key}") private String configKey; - @Value("${mso.asdc-connections.asdc-controller1.messageBusAddress}") - private String[] messageBusAddress; - public void setAsdcControllerName(String asdcControllerName) { this.asdcControllerName = asdcControllerName; } @Override - public java.lang.Boolean isUseHttpsWithDmaap() { - return getBooleanPropertyWithDefault("mso.asdc-connections.asdc-controller1.useHttpsWithDmaap", true); - } - - @Override - public java.lang.Boolean isUseHttpsWithSDC() { + public Boolean isUseHttpsWithSDC() { return getBooleanPropertyWithDefault("mso.asdc-connections.asdc-controller1.useHttpsWithSdc", true); } @@ -95,15 +85,6 @@ public class ASDCConfiguration implements IConfiguration { return true; } - @Override - public List getMsgBusAddress() { - if (messageBusAddress.length > 0) { - return Arrays.asList(messageBusAddress); - } else { - return Collections.emptyList(); - } - } - public String getAsdcControllerName() { return asdcControllerName; } @@ -173,7 +154,7 @@ public class ASDCConfiguration implements IConfiguration { return defaultValue; } else { try { - return Boolean.valueOf(config); + return Boolean.parseBoolean(config); } catch (Exception e) { logger.warn("Exception while getting boolean property with default property", e); return defaultValue; @@ -209,8 +190,8 @@ public class ASDCConfiguration implements IConfiguration { } @Override - public String getAsdcAddress() { - return getPropertyOrNull("mso.asdc-connections.asdc-controller1.asdcAddress"); + public String getSdcAddress() { + return getPropertyOrNull("mso.asdc-connections.asdc-controller1.sdcAddress"); } @Override @@ -242,4 +223,24 @@ public class ASDCConfiguration implements IConfiguration { return getBooleanPropertyWithDefault("mso.asdc-connections.asdc-controller1.isFilterInEmptyResources", true); } + @Override + public String getHttpProxyHost() { + return getPropertyOrNull("mso.asdc-connections.asdc-controller1.httpProxyHost"); + } + + @Override + public int getHttpProxyPort() { + return getIntegerPropertyOrZero("mso.asdc-connections.asdc-controller1.httpProxyPort"); + } + + @Override + public String getHttpsProxyHost() { + return getPropertyOrNull("mso.asdc-connections.asdc-controller1.httpsProxyHost"); + } + + @Override + public int getHttpsProxyPort() { + return getIntegerPropertyOrZero("mso.asdc-connections.asdc-controller1.httpsProxyPort"); + } + }