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.
17 package org.onap.ccsdk.cds.sdclistener;
19 import org.onap.sdc.api.consumer.IConfiguration;
20 import org.springframework.beans.factory.annotation.Value;
21 import org.springframework.boot.context.properties.ConfigurationProperties;
23 import java.util.List;
26 * In order to initiate a SDC distribution client we need to supply some pre-configuration values that distribution
29 @ConfigurationProperties("listenerservice")
30 public class SdcListenerConfiguration implements IConfiguration {
32 public static final String TOSCA_CSAR = "TOSCA_CSAR";
34 @Value("${listenerservice.config.asdcAddress}")
35 private String asdcAddress;
37 @Value("${listenerservice.config.messageBusAddress}")
38 private List<String> messageBusAddress;
40 @Value("${listenerservice.config.user}")
43 @Value("${listenerservice.config.password}")
44 private String password;
46 @Value("${listenerservice.config.pollingTimeout}")
47 private int pollingTimeout;
49 @Value("${listenerservice.config.pollingInterval}")
50 private int pollingInterval;
52 @Value("${listenerservice.config.relevantArtifactTypes}")
53 private List<String> relevantArtifactTypes;
55 @Value("${listenerservice.config.consumerGroup}")
56 private String consumerGroup;
58 @Value("${listenerservice.config.environmentName}")
59 private String envName;
61 @Value("${listenerservice.config.consumerId}")
62 private String consumerId;
64 @Value("${listenerservice.config.activateServerTLSAuth}")
65 private boolean activateServerTLSAuth;
67 @Value("${listenerservice.config.isUseHttpsWithDmaap}")
68 private boolean isUseHttpsWithDmaap;
70 @Value("${listenerservice.config.isUseHttpsWithSDC}")
71 private boolean isUseHttpsWithSDC;
73 @Value("${listenerservice.config.httpsProxyHost}")
74 private String getHttpsProxyHost;
76 @Value("${listenerservice.config.httpProxyHost}")
77 private String getHttpProxyHost;
79 @Value("${listenerservice.config.httpsProxyPort}")
80 private int getHttpsProxyPort;
82 @Value("${listenerservice.config.httpProxyPort}")
83 private int getHttpProxyPort;
86 public String getAsdcAddress() {
91 public List<String> getMsgBusAddress() {
92 return messageBusAddress;
96 public String getUser() {
101 public String getPassword() {
106 public int getPollingInterval() {
107 return pollingInterval;
111 public int getPollingTimeout() {
112 return pollingTimeout;
116 public List<String> getRelevantArtifactTypes() {
117 return relevantArtifactTypes;
121 public String getConsumerGroup() {
122 return consumerGroup;
126 public String getEnvironmentName() {
131 public String getConsumerID() {
136 public String getKeyStorePath() {
141 public String getKeyStorePassword() {
146 public boolean activateServerTLSAuth() {
147 return activateServerTLSAuth;
151 public boolean isFilterInEmptyResources() {
156 public Boolean isUseHttpsWithDmaap() {
157 return isUseHttpsWithDmaap;
161 public Boolean isUseHttpsWithSDC() {
162 return isUseHttpsWithSDC;
166 public String getHttpsProxyHost() {
167 return getHttpsProxyHost;
171 public String getHttpProxyHost() {
172 return getHttpsProxyHost;
176 public int getHttpsProxyPort() {
177 return getHttpsProxyPort;
181 public int getHttpProxyPort() {
182 return getHttpsProxyPort;