Formatting Code base with ktlint
[ccsdk/cds.git] / ms / sdclistener / application / src / main / java / org / onap / ccsdk / cds / sdclistener / SdcListenerConfiguration.java
1 /*
2  * Copyright © 2019 Bell Canada
3  *
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
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 package org.onap.ccsdk.cds.sdclistener;
18
19 import org.onap.sdc.api.consumer.IConfiguration;
20 import org.springframework.beans.factory.annotation.Value;
21 import org.springframework.boot.context.properties.ConfigurationProperties;
22
23 import java.util.List;
24
25 /**
26  * In order to initiate a SDC distribution client we need to supply some pre-configuration values that
27  * distribution client needs.
28  */
29 @ConfigurationProperties("listenerservice")
30 public class SdcListenerConfiguration implements IConfiguration {
31
32     public static final String TOSCA_CSAR = "TOSCA_CSAR";
33
34     @Value("${listenerservice.config.asdcAddress}")
35     private String asdcAddress;
36
37     @Value("${listenerservice.config.messageBusAddress}")
38     private List<String> messageBusAddress;
39
40     @Value("${listenerservice.config.user}")
41     private String user;
42
43     @Value("${listenerservice.config.password}")
44     private String password;
45
46     @Value("${listenerservice.config.pollingTimeout}")
47     private int pollingTimeout;
48
49     @Value("${listenerservice.config.pollingInterval}")
50     private int pollingInterval;
51
52     @Value("${listenerservice.config.relevantArtifactTypes}")
53     private List<String> relevantArtifactTypes;
54
55     @Value("${listenerservice.config.consumerGroup}")
56     private String consumerGroup;
57
58     @Value("${listenerservice.config.environmentName}")
59     private String envName;
60
61     @Value("${listenerservice.config.consumerId}")
62     private String consumerId;
63
64     @Value("${listenerservice.config.activateServerTLSAuth}")
65     private boolean activateServerTLSAuth;
66
67     @Value("${listenerservice.config.isUseHttpsWithDmaap}")
68     private boolean isUseHttpsWithDmaap;
69
70     @Override
71     public String getAsdcAddress() {
72         return asdcAddress;
73     }
74
75     @Override
76     public List<String> getMsgBusAddress() {
77         return messageBusAddress;
78     }
79
80     @Override
81     public String getUser() {
82         return user;
83     }
84
85     @Override
86     public String getPassword() {
87         return password;
88     }
89
90     @Override
91     public int getPollingInterval() {
92         return pollingInterval;
93     }
94
95     @Override
96     public int getPollingTimeout() {
97         return pollingTimeout;
98     }
99
100     @Override
101     public List<String> getRelevantArtifactTypes() {
102         return relevantArtifactTypes;
103     }
104
105     @Override
106     public String getConsumerGroup() {
107         return consumerGroup;
108     }
109
110     @Override
111     public String getEnvironmentName() {
112         return envName;
113     }
114
115     @Override
116     public String getConsumerID() {
117         return consumerId;
118     }
119
120     @Override
121     public String getKeyStorePath() {
122         return null;
123     }
124
125     @Override
126     public String getKeyStorePassword() {
127         return null;
128     }
129
130     @Override
131     public boolean activateServerTLSAuth() {
132         return activateServerTLSAuth;
133     }
134
135     @Override
136     public boolean isFilterInEmptyResources() {
137         return false;
138     }
139
140     @Override
141     public Boolean isUseHttpsWithDmaap() {
142         return isUseHttpsWithDmaap;
143     }
144
145 }
146