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.sdcAddress}")
35 private String sdcAddress;
37 @Value("${listenerservice.config.user}")
40 @Value("${listenerservice.config.password}")
41 private String password;
43 @Value("${listenerservice.config.pollingTimeout}")
44 private int pollingTimeout;
46 @Value("${listenerservice.config.pollingInterval}")
47 private int pollingInterval;
49 @Value("${listenerservice.config.relevantArtifactTypes}")
50 private List<String> relevantArtifactTypes;
52 @Value("${listenerservice.config.consumerGroup}")
53 private String consumerGroup;
55 @Value("${listenerservice.config.environmentName}")
56 private String envName;
58 @Value("${listenerservice.config.consumerId}")
59 private String consumerId;
61 @Value("${listenerservice.config.activateServerTLSAuth}")
62 private boolean activateServerTLSAuth;
64 @Value("${listenerservice.config.isUseHttpsWithSDC}")
65 private boolean isUseHttpsWithSDC;
67 @Value("${listenerservice.config.httpsProxyHost}")
68 private String getHttpsProxyHost;
70 @Value("${listenerservice.config.httpProxyHost}")
71 private String getHttpProxyHost;
73 @Value("${listenerservice.config.httpsProxyPort}")
74 private int getHttpsProxyPort;
76 @Value("${listenerservice.config.httpProxyPort}")
77 private int getHttpProxyPort;
80 public String getSdcAddress() {
85 public String getUser() {
90 public String getPassword() {
95 public int getPollingInterval() {
96 return pollingInterval;
100 public int getPollingTimeout() {
101 return pollingTimeout;
105 public List<String> getRelevantArtifactTypes() {
106 return relevantArtifactTypes;
110 public String getConsumerGroup() {
111 return consumerGroup;
115 public String getEnvironmentName() {
120 public String getConsumerID() {
125 public String getKeyStorePath() {
130 public String getKeyStorePassword() {
135 public boolean activateServerTLSAuth() {
136 return activateServerTLSAuth;
140 public boolean isFilterInEmptyResources() {
145 public Boolean isUseHttpsWithSDC() {
146 return isUseHttpsWithSDC;
150 public String getHttpsProxyHost() {
151 return getHttpsProxyHost;
155 public String getHttpProxyHost() {
156 return getHttpProxyHost;
160 public int getHttpsProxyPort() {
161 return getHttpsProxyPort;
165 public int getHttpProxyPort() {
166 return getHttpProxyPort;