2 * Copyright © 2019 Bell Canada
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.onap.ccsdk.cds.cdssdclistener;
18 import java.util.List;
19 import org.onap.sdc.api.consumer.IConfiguration;
20 import org.springframework.beans.factory.annotation.Value;
21 import org.springframework.boot.context.properties.ConfigurationProperties;
24 * In order to initiate a SDC distribution client we need to supply some pre-configuration values that
25 * distribution client needs.
27 @ConfigurationProperties("listenerservice")
28 public class CdsSdcListenerConfiguration implements IConfiguration {
30 public static final String TOSCA_CSAR = "TOSCA_CSAR";
32 @Value("${listenerservice.config.asdcAddress}")
33 private String asdcAddress;
35 @Value("${listenerservice.config.messageBusAddress}")
36 private List<String> messageBusAddress;
38 @Value("${listenerservice.config.user}")
41 @Value("${listenerservice.config.password}")
42 private String password;
44 @Value("${listenerservice.config.pollingTimeout}")
45 private int pollingTimeout;
47 @Value("${listenerservice.config.pollingInterval}")
48 private int pollingInterval;
50 @Value("${listenerservice.config.relevantArtifactTypes}")
51 private List<String> relevantArtifactTypes;
53 @Value("${listenerservice.config.consumerGroup}")
54 private String consumerGroup;
56 @Value("${listenerservice.config.environmentName}")
57 private String envName;
59 @Value("${listenerservice.config.consumerId}")
60 private String consumerId;
62 @Value("${listenerservice.config.activateServerTLSAuth}")
63 private boolean activateServerTLSAuth;
65 @Value("${listenerservice.config.isUseHttpsWithDmaap}")
66 private boolean isUseHttpsWithDmaap;
69 public String getAsdcAddress() {
74 public List<String> getMsgBusAddress() {
75 return messageBusAddress;
79 public String getUser() {
84 public String getPassword() {
89 public int getPollingInterval() {
90 return pollingInterval;
94 public int getPollingTimeout() {
95 return pollingTimeout;
99 public List<String> getRelevantArtifactTypes() {
100 return relevantArtifactTypes;
104 public String getConsumerGroup() {
105 return consumerGroup;
109 public String getEnvironmentName() {
114 public String getConsumerID() {
119 public String getKeyStorePath() {
124 public String getKeyStorePassword() {
129 public boolean activateServerTLSAuth() {
130 return activateServerTLSAuth;
134 public boolean isFilterInEmptyResources() {
139 public Boolean isUseHttpsWithDmaap() {
140 return isUseHttpsWithDmaap;