Added oparent to sdc main
[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
21 package org.openecomp.sdc.be.config;
22 /**
23  * Contains DMAAP Client configuration parameters
24  */
25 public class DmaapConsumerConfiguration {
26         private boolean active;
27         private String hosts;
28         private String consumerGroup;
29         private String consumerId;
30         private Integer timeoutMs;
31         private Integer limit;
32         private Integer pollingInterval;
33         private String topic;
34         private Double latitude;
35         private Double longitude;
36         private String version;
37         private String serviceName;
38         private String environment;
39         private String partner;
40         private String routeOffer;
41         private String protocol;
42         private String contenttype;
43         private Boolean dme2TraceOn;
44         private String aftEnvironment;
45         private Integer aftDme2ConnectionTimeoutMs;
46         private Integer aftDme2RoundtripTimeoutMs;
47         private Integer aftDme2ReadTimeoutMs;
48         private String dme2preferredRouterFilePath; 
49         private Credential credential;
50         private Integer timeLimitForNotificationHandleMs;
51
52         public String getHosts() {
53                 return hosts;
54         }
55
56         public void setHosts(String hosts) {
57                 this.hosts = hosts;
58         }
59
60         public String getConsumerGroup() {
61                 return consumerGroup;
62         }
63
64         public void setConsumerGroup(String consumerGroup) {
65                 this.consumerGroup = consumerGroup;
66         }
67
68         public String getConsumerId() {
69                 return consumerId;
70         }
71
72         public void setConsumerId(String consumerId) {
73                 this.consumerId = consumerId;
74         }
75
76         public Integer getTimeoutMs() {
77                 return timeoutMs;
78         }
79
80         public void setTimeoutMs(Integer timeoutMs) {
81                 this.timeoutMs = timeoutMs;
82         }
83
84         public Integer getLimit() {
85                 return limit;
86         }
87
88         public void setLimit(Integer limit) {
89                 this.limit = limit;
90         }
91
92         public Integer getPollingInterval() {
93                 return pollingInterval;
94         }
95
96         public void setPollingInterval(Integer pollingInterval) {
97                 this.pollingInterval = pollingInterval;
98         }
99
100         public String getTopic() {
101                 return topic;
102         }
103
104         public void setTopic(String topic) {
105                 this.topic = topic;
106         }
107
108         public Double getLatitude() {
109                 return latitude;
110         }
111
112         public void setLatitude(Double latitude) {
113                 this.latitude = latitude;
114         }
115
116         public Double getLongitude() {
117                 return longitude;
118         }
119
120         public void setLongitude(Double longitude) {
121                 this.longitude = longitude;
122         }
123
124         public String getVersion() {
125                 return version;
126         }
127
128         public void setVersion(String version) {
129                 this.version = version;
130         }
131
132         public String getServiceName() {
133                 return serviceName;
134         }
135
136         public void setServiceName(String serviceName) {
137                 this.serviceName = serviceName;
138         }
139
140         public String getEnvironment() {
141                 return environment;
142         }
143
144         public void setEnvironment(String environment) {
145                 this.environment = environment;
146         }
147
148         public String getPartner() {
149                 return partner;
150         }
151
152         public void setPartner(String partner) {
153                 this.partner = partner;
154         }
155
156         public String getRouteOffer() {
157                 return routeOffer;
158         }
159
160         public void setRouteOffer(String routeOffer) {
161                 this.routeOffer = routeOffer;
162         }
163
164         public String getProtocol() {
165                 return protocol;
166         }
167
168         public void setProtocol(String protocol) {
169                 this.protocol = protocol;
170         }
171
172         public String getContenttype() {
173                 return contenttype;
174         }
175
176         public void setContenttype(String contenttype) {
177                 this.contenttype = contenttype;
178         }
179
180         public Boolean isDme2TraceOn() {
181                 return dme2TraceOn;
182         }
183         
184         public Boolean getDme2TraceOn() {
185                 return dme2TraceOn;
186         }
187
188         public void setDme2TraceOn(Boolean dme2TraceOn) {
189                 this.dme2TraceOn = dme2TraceOn;
190         }
191
192         public String getAftEnvironment() {
193                 return aftEnvironment;
194         }
195
196         public void setAftEnvironment(String aftEnvironment) {
197                 this.aftEnvironment = aftEnvironment;
198         }
199
200         public Integer getAftDme2ConnectionTimeoutMs() {
201                 return aftDme2ConnectionTimeoutMs;
202         }
203
204         public void setAftDme2ConnectionTimeoutMs(Integer aftDme2ConnectionTimeoutMs) {
205                 this.aftDme2ConnectionTimeoutMs = aftDme2ConnectionTimeoutMs;
206         }
207
208         public Integer getAftDme2RoundtripTimeoutMs() {
209                 return aftDme2RoundtripTimeoutMs;
210         }
211
212         public void setAftDme2RoundtripTimeoutMs(Integer aftDme2RoundtripTimeoutMs) {
213                 this.aftDme2RoundtripTimeoutMs = aftDme2RoundtripTimeoutMs;
214         }
215
216         public Integer getAftDme2ReadTimeoutMs() {
217                 return aftDme2ReadTimeoutMs;
218         }
219
220         public void setAftDme2ReadTimeoutMs(Integer aftDme2ReadTimeoutMs) {
221                 this.aftDme2ReadTimeoutMs = aftDme2ReadTimeoutMs;
222         }
223
224         public String getDme2preferredRouterFilePath() {
225                 return dme2preferredRouterFilePath;
226         }
227
228         public void setDme2preferredRouterFilePath(String dme2preferredRouterFilePath) {
229                 this.dme2preferredRouterFilePath = dme2preferredRouterFilePath;
230         }
231
232         public Credential getCredential() {
233                 return credential;
234         }
235
236         public void setCredential(Credential credential) {
237                 this.credential = credential;
238         }
239
240         public boolean isActive() { return active; }
241
242         public void setActive(boolean isActive) { this.active = isActive; }
243
244         /**
245          * Contains Dmaap Client credential parameters: username and password
246          */
247         public static class Credential{
248                 
249                 private String username;
250                 private String password;
251                 
252                 public String getUsername() {
253                         return username;
254                 }
255                 public void setUsername(String username) {
256                         this.username = username;
257                 }
258                 public String getPassword() {
259                         return password;
260                 }
261                 public void setPassword(String password) {
262                         this.password = password;
263                 }
264                 @Override
265                 public String toString() {
266                         return "Credential [username=" + username + ", password=" + password + "]";
267                 }
268                  
269           }
270
271         @Override
272         public String toString() {
273                 return "DmaapConsumerConfiguration [active=" + active + ", hosts=" + hosts + ", consumerGroup=" + consumerGroup + ", consumerId="
274                                 + consumerId + ", timeoutMs=" + timeoutMs + ", limit=" + limit + ", pollingInterval=" + pollingInterval
275                                 + ", topic=" + topic + ", latitude=" + latitude + ", longitude=" + longitude + ", version=" + version
276                                 + ", serviceName=" + serviceName + ", environment=" + environment + ", partner=" + partner
277                                 + ", routeOffer=" + routeOffer + ", protocol=" + protocol + ", contenttype=" + contenttype
278                                 + ", dme2TraceOn=" + dme2TraceOn + ", aftEnvironment=" + aftEnvironment
279                                 + ", aftDme2ConnectionTimeoutMs=" + aftDme2ConnectionTimeoutMs + ", aftDme2RoundtripTimeoutMs="
280                                 + aftDme2RoundtripTimeoutMs + ", aftDme2ReadTimeoutMs=" + aftDme2ReadTimeoutMs
281                                 + ", dme2preferredRouterFilePath=" + dme2preferredRouterFilePath
282                                 + ", timeLimitForNotificationHandleMs=" + timeLimitForNotificationHandleMs+ ", credential=" + credential + "]";
283         }
284
285         public Integer getTimeLimitForNotificationHandleMs() {
286                 return timeLimitForNotificationHandleMs;
287         }
288
289         public void setTimeLimitForNotificationHandleMs(Integer timeLimitForNotificationHandleMs) {
290                 this.timeLimitForNotificationHandleMs = timeLimitForNotificationHandleMs;
291         }
292         
293 }