34eaf33ea49a383e8467ed041a67115838aacd7c
[policy/distribution.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.distribution.reception.handling.sdc;
22
23 import java.util.List;
24
25 /**
26  * This class builds an instance of {@link SdcReceptionHandlerConfigurationParameterGroup} class.
27  *
28  * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
29  */
30 public class SdcReceptionHandlerConfigurationParameterBuilder {
31
32     private boolean activeserverTlsAuth;
33     private boolean filterinEmptyResources;
34     private boolean useHttpsWithDmaap;
35     private int pollingTimeout;
36     private int pollingInterval;
37     private String user;
38     private String password;
39     private String consumerId;
40     private String consumerGroup;
41     private String asdcAddress;
42     private String environmentName;
43     private String keystorePath;
44     private String keystorePassword;
45     private List<String> messageBusAddress;
46     private List<String> artifactTypes;
47
48     /**
49      * Set activeserverTlsAuth to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
50      *
51      * @param activeserverTlsAuth the activeserverTlsAuth
52      */
53     public SdcReceptionHandlerConfigurationParameterBuilder setActiveserverTlsAuth(final boolean activeserverTlsAuth) {
54         this.activeserverTlsAuth = activeserverTlsAuth;
55         return this;
56     }
57
58     /**
59      * Set filterinEmptyResources to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
60      *
61      * @param filterinEmptyResources the filterinEmptyResources
62      */
63     public SdcReceptionHandlerConfigurationParameterBuilder setFilterinEmptyResources(
64             final boolean filterinEmptyResources) {
65         this.filterinEmptyResources = filterinEmptyResources;
66         return this;
67     }
68
69     /**
70      * Set useHttpsWithDmaap to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
71      *
72      * @param useHttpsWithDmaap the useHttpsWithDmaap
73      */
74     public SdcReceptionHandlerConfigurationParameterBuilder setUseHttpsWithDmaap(final Boolean useHttpsWithDmaap) {
75         this.useHttpsWithDmaap = useHttpsWithDmaap;
76         return this;
77     }
78
79     /**
80      * Set pollingInterval to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
81      *
82      * @param pollingInterval the pollingInterval
83      */
84     public SdcReceptionHandlerConfigurationParameterBuilder setPollingInterval(final int pollingInterval) {
85         this.pollingInterval = pollingInterval;
86         return this;
87     }
88
89     /**
90      * Set pollingTimeout to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
91      *
92      * @param pollingTimeout the pollingTimeout
93      */
94     public SdcReceptionHandlerConfigurationParameterBuilder setPollingTimeout(final int pollingTimeout) {
95         this.pollingTimeout = pollingTimeout;
96         return this;
97     }
98
99     /**
100      * Set asdcAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
101      *
102      * @param asdcAddress the asdcAddress
103      */
104     public SdcReceptionHandlerConfigurationParameterBuilder setAsdcAddress(final String asdcAddress) {
105         this.asdcAddress = asdcAddress;
106         return this;
107     }
108
109     /**
110      * Set user to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
111      *
112      * @param user the user
113      */
114     public SdcReceptionHandlerConfigurationParameterBuilder setUser(final String user) {
115         this.user = user;
116         return this;
117     }
118
119     /**
120      * Set password to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
121      *
122      * @param password the password
123      */
124     public SdcReceptionHandlerConfigurationParameterBuilder setPassword(final String password) {
125         this.password = password;
126         return this;
127     }
128
129     /**
130      * Set consumerId to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
131      *
132      * @param consumerId the consumerId
133      */
134     public SdcReceptionHandlerConfigurationParameterBuilder setConsumerId(final String consumerId) {
135         this.consumerId = consumerId;
136         return this;
137     }
138
139     /**
140      * Set consumerGroup to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
141      *
142      * @param consumerGroup the consumerGroup
143      */
144     public SdcReceptionHandlerConfigurationParameterBuilder setConsumerGroup(final String consumerGroup) {
145         this.consumerGroup = consumerGroup;
146         return this;
147     }
148
149     /**
150      * Set environmentName to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
151      *
152      * @param environmentName the environmentName
153      */
154     public SdcReceptionHandlerConfigurationParameterBuilder setEnvironmentName(final String environmentName) {
155         this.environmentName = environmentName;
156         return this;
157     }
158
159     /**
160      * Set keystorePath to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
161      *
162      * @param keystorePath the keystorePath
163      */
164     public SdcReceptionHandlerConfigurationParameterBuilder setKeystorePath(final String keystorePath) {
165         this.keystorePath = keystorePath;
166         return this;
167     }
168
169     /**
170      * Set keystorePassword to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
171      *
172      * @param keystorePassword the keystorePassword
173      */
174     public SdcReceptionHandlerConfigurationParameterBuilder setKeystorePassword(final String keystorePassword) {
175         this.keystorePassword = keystorePassword;
176         return this;
177     }
178
179     /**
180      * Set messageBusAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
181      *
182      * @param messageBusAddress the messageBusAddress
183      */
184     public SdcReceptionHandlerConfigurationParameterBuilder setMessageBusAddress(final List<String> messageBusAddress) {
185         this.messageBusAddress = messageBusAddress;
186         return this;
187     }
188
189     /**
190      * Set artifactTypes to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
191      *
192      * @param artifactTypes the artifactTypes
193      */
194     public SdcReceptionHandlerConfigurationParameterBuilder setArtifactTypes(final List<String> artifactTypes) {
195         this.artifactTypes = artifactTypes;
196         return this;
197     }
198
199     /**
200      * Returns the active server TlsAuth of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
201      *
202      * @return the activeserverTlsAuth
203      */
204     public boolean isActiveserverTlsAuth() {
205         return activeserverTlsAuth;
206     }
207
208     /**
209      * Returns the isFilterinEmptyResources flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder}
210      * instance.
211      *
212      * @return the isFilterinEmptyResources
213      */
214     public boolean isFilterinEmptyResources() {
215         return filterinEmptyResources;
216     }
217
218     /**
219      * Returns the isUseHttpsWithDmaap flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
220      *
221      * @return the isUseHttpsWithDmaap
222      */
223     public Boolean getIsUseHttpsWithDmaap() {
224         return useHttpsWithDmaap;
225     }
226
227     /**
228      * Returns the polling interval of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
229      *
230      * @return the pollingInterval
231      */
232     public int getPollingInterval() {
233         return pollingInterval;
234     }
235
236     /**
237      * Returns the polling timeout of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
238      *
239      * @return the pollingTimeout
240      */
241     public int getPollingTimeout() {
242         return pollingTimeout;
243     }
244
245     /**
246      * Returns the asdc address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
247      *
248      * @return the asdcAddress
249      */
250     public String getAsdcAddress() {
251         return asdcAddress;
252     }
253
254     /**
255      * Returns the user of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
256      *
257      * @return the user
258      */
259     public String getUser() {
260         return user;
261     }
262
263     /**
264      * Returns the password of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
265      *
266      * @return the password
267      */
268     public String getPassword() {
269         return password;
270     }
271
272     /**
273      * Returns the consumer id of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
274      *
275      * @return the consumerId
276      */
277     public String getConsumerId() {
278         return consumerId;
279     }
280
281     /**
282      * Returns the consumer group of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
283      *
284      * @return the consumerGroup
285      */
286     public String getConsumerGroup() {
287         return consumerGroup;
288     }
289
290     /**
291      * Returns the environment name of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
292      *
293      * @return the environmentName
294      */
295     public String getEnvironmentName() {
296         return environmentName;
297     }
298
299     /**
300      * Returns the keystore path of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
301      *
302      * @return the keystorePath
303      */
304     public String getKeystorePath() {
305         return keystorePath;
306     }
307
308     /**
309      * Returns the keystore password of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
310      *
311      * @return the keystorePassword
312      */
313     public String getKeystorePassword() {
314         return keystorePassword;
315     }
316
317     /**
318      * Returns the message bus address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
319      *
320      * @return the messageBusAddress
321      */
322     public List<String> getMessageBusAddress() {
323         return messageBusAddress;
324     }
325
326     /**
327      * Returns the artifact types of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
328      *
329      * @return the artifactTypes
330      */
331     public List<String> getArtifactTypes() {
332         return artifactTypes;
333     }
334
335 }
336
337