aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-distribution-client/src/main/java/org/onap/sdc/impl/Configuration.java
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-distribution-client/src/main/java/org/onap/sdc/impl/Configuration.java')
-rw-r--r--sdc-distribution-client/src/main/java/org/onap/sdc/impl/Configuration.java84
1 files changed, 58 insertions, 26 deletions
diff --git a/sdc-distribution-client/src/main/java/org/onap/sdc/impl/Configuration.java b/sdc-distribution-client/src/main/java/org/onap/sdc/impl/Configuration.java
index 2da9c4e..db4433b 100644
--- a/sdc-distribution-client/src/main/java/org/onap/sdc/impl/Configuration.java
+++ b/sdc-distribution-client/src/main/java/org/onap/sdc/impl/Configuration.java
@@ -28,7 +28,12 @@ import org.onap.sdc.utils.DistributionClientConstants;
public class Configuration implements IConfiguration {
private List<String> msgBusAddressList;
- private String asdcAddress;
+ private final String kafkaSecurityProtocolConfig;
+ private final String kafkaSaslMechanism;
+ private final String kafkaSaslJaasConfig;
+ private String sdcStatusTopicName;
+ private String sdcNotificationTopicName;
+ private String sdcAddress;
private String user;
private String password;
private int pollingInterval = DistributionClientConstants.MIN_POLLING_INTERVAL_SEC;
@@ -40,10 +45,9 @@ public class Configuration implements IConfiguration {
private String keyStorePath;
private String keyStorePassword;
private boolean activateServerTLSAuth;
- private boolean filterInEmptyResources;
- private Boolean useHttpsWithDmaap;
+ private final boolean filterInEmptyResources;
private Boolean useHttpsWithSDC;
- private boolean consumeProduceStatusTopic;
+ private final boolean consumeProduceStatusTopic;
private String httpProxyHost;
private int httpProxyPort;
private String httpsProxyHost;
@@ -51,23 +55,24 @@ public class Configuration implements IConfiguration {
private boolean useSystemProxy;
public Configuration(IConfiguration other) {
- this.asdcAddress = other.getAsdcAddress();
- this.msgBusAddressList = other.getMsgBusAddress();
+ this.kafkaSecurityProtocolConfig = other.getKafkaSecurityProtocolConfig();
+ this.kafkaSaslMechanism = other.getKafkaSaslMechanism();
+ this.kafkaSaslJaasConfig = other.getKafkaSaslJaasConfig();
this.comsumerID = other.getConsumerID();
this.consumerGroup = other.getConsumerGroup();
- this.environmentName = other.getEnvironmentName();
- this.password = other.getPassword();
this.pollingInterval = other.getPollingInterval();
this.pollingTimeout = other.getPollingTimeout();
- this.relevantArtifactTypes = other.getRelevantArtifactTypes();
+ this.environmentName = other.getEnvironmentName();
+ this.consumeProduceStatusTopic = other.isConsumeProduceStatusTopic();
+ this.sdcAddress = other.getSdcAddress();
this.user = other.getUser();
+ this.password = other.getPassword();
+ this.relevantArtifactTypes = other.getRelevantArtifactTypes();
this.useHttpsWithSDC = other.isUseHttpsWithSDC();
this.keyStorePath = other.getKeyStorePath();
this.keyStorePassword = other.getKeyStorePassword();
this.activateServerTLSAuth = other.activateServerTLSAuth();
this.filterInEmptyResources = other.isFilterInEmptyResources();
- this.useHttpsWithDmaap = other.isUseHttpsWithDmaap();
- this.consumeProduceStatusTopic = other.isConsumeProduceStatusTopic();
this.httpProxyHost = other.getHttpProxyHost();
this.httpProxyPort = other.getHttpProxyPort();
this.httpsProxyHost = other.getHttpsProxyHost();
@@ -76,8 +81,24 @@ public class Configuration implements IConfiguration {
}
@Override
- public String getAsdcAddress() {
- return asdcAddress;
+ public String getSdcAddress() {
+ return sdcAddress;
+ }
+
+ public String getStatusTopicName() {
+ return sdcStatusTopicName;
+ }
+
+ public void setStatusTopicName(String sdcStatusTopicName) {
+ this.sdcStatusTopicName = sdcStatusTopicName;
+ }
+
+ public String getNotificationTopicName() {
+ return sdcNotificationTopicName;
+ }
+
+ public void setNotificationTopicName(String sdcNotificationTopicName) {
+ this.sdcNotificationTopicName = sdcNotificationTopicName;
}
@Override
@@ -85,6 +106,25 @@ public class Configuration implements IConfiguration {
return msgBusAddressList;
}
+ public void setMsgBusAddress(List<String> newMsgBusAddress) {
+ msgBusAddressList = newMsgBusAddress;
+ }
+
+ @Override
+ public String getKafkaSecurityProtocolConfig() {
+ return kafkaSecurityProtocolConfig;
+ }
+
+ @Override
+ public String getKafkaSaslMechanism() {
+ return kafkaSaslMechanism;
+ }
+
+ @Override
+ public String getKafkaSaslJaasConfig() {
+ return kafkaSaslJaasConfig;
+ }
+
@Override
public Boolean isUseHttpsWithSDC() {
return useHttpsWithSDC;
@@ -169,8 +209,8 @@ public class Configuration implements IConfiguration {
this.comsumerID = comsumerID;
}
- public void setAsdcAddress(String asdcAddress) {
- this.asdcAddress = asdcAddress;
+ public void setSdcAddress(String sdcAddress) {
+ this.sdcAddress = sdcAddress;
}
public void setUser(String user) {
@@ -243,19 +283,10 @@ public class Configuration implements IConfiguration {
return this.filterInEmptyResources;
}
- @Override
- public Boolean isUseHttpsWithDmaap() {
- return this.useHttpsWithDmaap;
- }
-
public void setUseHttpsWithSDC(boolean useHttpsWithSDC) {
this.useHttpsWithSDC = useHttpsWithSDC;
}
- public void setUseHttpsWithDmaap(boolean useHttpsWithDmaap) {
- this.useHttpsWithDmaap = useHttpsWithDmaap;
- }
-
@Override
public boolean isConsumeProduceStatusTopic() {
return this.consumeProduceStatusTopic;
@@ -265,11 +296,13 @@ public class Configuration implements IConfiguration {
public String toString() {
//@formatter:off
return "Configuration ["
- + "asdcAddress=" + asdcAddress
+ + "sdcAddress=" + sdcAddress
+ ", user=" + user
+ ", password=" + password
+ ", useHttpsWithSDC=" + useHttpsWithSDC
+ ", pollingInterval=" + pollingInterval
+ + ", sdcStatusTopicName=" + sdcStatusTopicName
+ + ", sdcNotificationTopicName=" + sdcNotificationTopicName
+ ", pollingTimeout=" + pollingTimeout
+ ", relevantArtifactTypes=" + relevantArtifactTypes
+ ", consumerGroup=" + consumerGroup
@@ -279,7 +312,6 @@ public class Configuration implements IConfiguration {
+ ", keyStorePassword=" + keyStorePassword
+ ", activateServerTLSAuth=" + activateServerTLSAuth
+ ", filterInEmptyResources=" + filterInEmptyResources
- + ", useHttpsWithDmaap=" + useHttpsWithDmaap
+ ", consumeProduceStatusTopic=" + consumeProduceStatusTopic
+ ", useSystemProxy=" + useSystemProxy
+ ", httpProxyHost=" + httpProxyHost