742cd1815e57208b4ac84628369bc69eb5738d4b
[sdc.git] / common-app-api / src / main / java / org / openecomp / sdc / be / config / DmaapConsumerConfiguration.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20 package org.openecomp.sdc.be.config;
21
22 /**
23  * Contains DMAAP Client configuration parameters
24  */
25 public class DmaapConsumerConfiguration {
26
27     private boolean active;
28     private String hosts;
29     private String consumerGroup;
30     private String consumerId;
31     private Integer timeoutMs;
32     private Integer limit;
33     private Integer pollingInterval;
34     private String topic;
35     private Double latitude;
36     private Double longitude;
37     private String version;
38     private String serviceName;
39     private String environment;
40     private String partner;
41     private String routeOffer;
42     private String protocol;
43     private String contenttype;
44     private Boolean dme2TraceOn;
45     private String aftEnvironment;
46     private Integer aftDme2ConnectionTimeoutMs;
47     private Integer aftDme2RoundtripTimeoutMs;
48     private Integer aftDme2ReadTimeoutMs;
49     private String dme2preferredRouterFilePath;
50     private Credential credential;
51     private Integer timeLimitForNotificationHandleMs;
52     private boolean aftDme2SslEnable;
53     private boolean aftDme2ClientIgnoreSslConfig;
54     private String aftDme2ClientKeystore;
55     private String aftDme2ClientKeystorePassword;
56     private String aftDme2ClientSslCertAlias;
57
58     public String getHosts() {
59         return hosts;
60     }
61
62     public void setHosts(String hosts) {
63         this.hosts = hosts;
64     }
65
66     public String getConsumerGroup() {
67         return consumerGroup;
68     }
69
70     public void setConsumerGroup(String consumerGroup) {
71         this.consumerGroup = consumerGroup;
72     }
73
74     public String getConsumerId() {
75         return consumerId;
76     }
77
78     public void setConsumerId(String consumerId) {
79         this.consumerId = consumerId;
80     }
81
82     public Integer getTimeoutMs() {
83         return timeoutMs;
84     }
85
86     public void setTimeoutMs(Integer timeoutMs) {
87         this.timeoutMs = timeoutMs;
88     }
89
90     public Integer getLimit() {
91         return limit;
92     }
93
94     public void setLimit(Integer limit) {
95         this.limit = limit;
96     }
97
98     public Integer getPollingInterval() {
99         return pollingInterval;
100     }
101
102     public void setPollingInterval(Integer pollingInterval) {
103         this.pollingInterval = pollingInterval;
104     }
105
106     public String getTopic() {
107         return topic;
108     }
109
110     public void setTopic(String topic) {
111         this.topic = topic;
112     }
113
114     public Double getLatitude() {
115         return latitude;
116     }
117
118     public void setLatitude(Double latitude) {
119         this.latitude = latitude;
120     }
121
122     public Double getLongitude() {
123         return longitude;
124     }
125
126     public void setLongitude(Double longitude) {
127         this.longitude = longitude;
128     }
129
130     public String getVersion() {
131         return version;
132     }
133
134     public void setVersion(String version) {
135         this.version = version;
136     }
137
138     public String getServiceName() {
139         return serviceName;
140     }
141
142     public void setServiceName(String serviceName) {
143         this.serviceName = serviceName;
144     }
145
146     public String getEnvironment() {
147         return environment;
148     }
149
150     public void setEnvironment(String environment) {
151         this.environment = environment;
152     }
153
154     public String getPartner() {
155         return partner;
156     }
157
158     public void setPartner(String partner) {
159         this.partner = partner;
160     }
161
162     public String getRouteOffer() {
163         return routeOffer;
164     }
165
166     public void setRouteOffer(String routeOffer) {
167         this.routeOffer = routeOffer;
168     }
169
170     public String getProtocol() {
171         return protocol;
172     }
173
174     public void setProtocol(String protocol) {
175         this.protocol = protocol;
176     }
177
178     public String getContenttype() {
179         return contenttype;
180     }
181
182     public void setContenttype(String contenttype) {
183         this.contenttype = contenttype;
184     }
185
186     public Boolean isDme2TraceOn() {
187         return dme2TraceOn;
188     }
189
190     public Boolean getDme2TraceOn() {
191         return dme2TraceOn;
192     }
193
194     public void setDme2TraceOn(Boolean dme2TraceOn) {
195         this.dme2TraceOn = dme2TraceOn;
196     }
197
198     public String getAftEnvironment() {
199         return aftEnvironment;
200     }
201
202     public void setAftEnvironment(String aftEnvironment) {
203         this.aftEnvironment = aftEnvironment;
204     }
205
206     public Integer getAftDme2ConnectionTimeoutMs() {
207         return aftDme2ConnectionTimeoutMs;
208     }
209
210     public void setAftDme2ConnectionTimeoutMs(Integer aftDme2ConnectionTimeoutMs) {
211         this.aftDme2ConnectionTimeoutMs = aftDme2ConnectionTimeoutMs;
212     }
213
214     public Integer getAftDme2RoundtripTimeoutMs() {
215         return aftDme2RoundtripTimeoutMs;
216     }
217
218     public void setAftDme2RoundtripTimeoutMs(Integer aftDme2RoundtripTimeoutMs) {
219         this.aftDme2RoundtripTimeoutMs = aftDme2RoundtripTimeoutMs;
220     }
221
222     public Integer getAftDme2ReadTimeoutMs() {
223         return aftDme2ReadTimeoutMs;
224     }
225
226     public void setAftDme2ReadTimeoutMs(Integer aftDme2ReadTimeoutMs) {
227         this.aftDme2ReadTimeoutMs = aftDme2ReadTimeoutMs;
228     }
229
230     public String getDme2preferredRouterFilePath() {
231         return dme2preferredRouterFilePath;
232     }
233
234     public void setDme2preferredRouterFilePath(String dme2preferredRouterFilePath) {
235         this.dme2preferredRouterFilePath = dme2preferredRouterFilePath;
236     }
237
238     public Credential getCredential() {
239         return credential;
240     }
241
242     public void setCredential(Credential credential) {
243         this.credential = credential;
244     }
245
246     public boolean isActive() {
247         return active;
248     }
249
250     public void setActive(boolean isActive) {
251         this.active = isActive;
252     }
253
254     public Integer getTimeLimitForNotificationHandleMs() {
255         return timeLimitForNotificationHandleMs;
256     }
257
258     public void setTimeLimitForNotificationHandleMs(Integer timeLimitForNotificationHandleMs) {
259         this.timeLimitForNotificationHandleMs = timeLimitForNotificationHandleMs;
260     }
261
262     public boolean isAftDme2SslEnable() {
263         return aftDme2SslEnable;
264     }
265
266     public void setAftDme2SslEnable(boolean aftDme2SslEnable) {
267         this.aftDme2SslEnable = aftDme2SslEnable;
268     }
269
270     public boolean isAftDme2ClientIgnoreSslConfig() {
271         return aftDme2ClientIgnoreSslConfig;
272     }
273
274     public void setAftDme2ClientIgnoreSslConfig(boolean aftDme2ClientIgnoreSslConfig) {
275         this.aftDme2ClientIgnoreSslConfig = aftDme2ClientIgnoreSslConfig;
276     }
277
278     public String getAftDme2ClientKeystore() {
279         return aftDme2ClientKeystore;
280     }
281
282     public void setAftDme2ClientKeystore(String aftDme2ClientKeystore) {
283         this.aftDme2ClientKeystore = aftDme2ClientKeystore;
284     }
285
286     public String getAftDme2ClientKeystorePassword() {
287         return aftDme2ClientKeystorePassword;
288     }
289
290     public void setAftDme2ClientKeystorePassword(String aftDme2ClientKeystorePassword) {
291         this.aftDme2ClientKeystorePassword = aftDme2ClientKeystorePassword;
292     }
293
294     public String getAftDme2ClientSslCertAlias() {
295         return aftDme2ClientSslCertAlias;
296     }
297
298     public void setAftDme2ClientSslCertAlias(String aftDme2ClientSslCertAlias) {
299         this.aftDme2ClientSslCertAlias = aftDme2ClientSslCertAlias;
300     }
301
302     @Override
303     public String toString() {
304         return "DmaapConsumerConfiguration [active=" + active + ", hosts=" + hosts + ", consumerGroup=" + consumerGroup + ", consumerId=" + consumerId
305             + ", timeoutMs=" + timeoutMs + ", limit=" + limit + ", pollingInterval=" + pollingInterval + ", topic=" + topic + ", latitude=" + latitude
306             + ", longitude=" + longitude + ", version=" + version + ", serviceName=" + serviceName + ", environment=" + environment + ", partner="
307             + partner + ", routeOffer=" + routeOffer + ", protocol=" + protocol + ", contenttype=" + contenttype + ", dme2TraceOn=" + dme2TraceOn
308             + ", aftEnvironment=" + aftEnvironment + ", aftDme2ConnectionTimeoutMs=" + aftDme2ConnectionTimeoutMs + ", aftDme2RoundtripTimeoutMs="
309             + aftDme2RoundtripTimeoutMs + ", aftDme2ReadTimeoutMs=" + aftDme2ReadTimeoutMs + ", dme2preferredRouterFilePath="
310             + dme2preferredRouterFilePath + ", credential=" + credential + ", timeLimitForNotificationHandleMs=" + timeLimitForNotificationHandleMs
311             + ", aftDme2SslEnable=" + aftDme2SslEnable + ", aftDme2ClientIgnoreSslConfig=" + aftDme2ClientIgnoreSslConfig + ", aftDme2ClientKeystore="
312             + aftDme2ClientKeystore + ", aftDme2ClientKeystorePassword=" + aftDme2ClientKeystorePassword + ", aftDme2ClientSslCertAlias="
313             + aftDme2ClientSslCertAlias + "]";
314     }
315
316     /**
317      * Contains Dmaap Client credential parameters: username and password
318      */
319     public static class Credential {
320
321         private String username;
322         private String password;
323
324         public String getUsername() {
325             return username;
326         }
327
328         public void setUsername(String username) {
329             this.username = username;
330         }
331
332         public String getPassword() {
333             return password;
334         }
335
336         public void setPassword(String password) {
337             this.password = password;
338         }
339
340         @Override
341         public String toString() {
342             return "Credential [username=" + username + ", password=" + password + "]";
343         }
344     }
345 }