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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.distribution.reception.handling.sdc;
23 import java.util.List;
26 * This class builds an instance of {@link SdcReceptionHandlerConfigurationParameterGroup} class.
28 * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
30 public class SdcReceptionHandlerConfigurationParameterBuilder {
32 private boolean activeserverTlsAuth;
33 private boolean filterinEmptyResources;
34 private boolean useHttpsWithDmaap;
35 private int pollingTimeout;
36 private int pollingInterval;
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 private int retryDelay;
50 * Set activeserverTlsAuth to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
52 * @param activeserverTlsAuth the activeserverTlsAuth
54 public SdcReceptionHandlerConfigurationParameterBuilder setActiveserverTlsAuth(final boolean activeserverTlsAuth) {
55 this.activeserverTlsAuth = activeserverTlsAuth;
60 * Set filterinEmptyResources to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
62 * @param filterinEmptyResources the filterinEmptyResources
64 public SdcReceptionHandlerConfigurationParameterBuilder setFilterinEmptyResources(
65 final boolean filterinEmptyResources) {
66 this.filterinEmptyResources = filterinEmptyResources;
71 * Set useHttpsWithDmaap to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
73 * @param useHttpsWithDmaap the useHttpsWithDmaap
75 public SdcReceptionHandlerConfigurationParameterBuilder setUseHttpsWithDmaap(final Boolean useHttpsWithDmaap) {
76 this.useHttpsWithDmaap = useHttpsWithDmaap;
81 * Set pollingInterval to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
83 * @param pollingInterval the pollingInterval
85 public SdcReceptionHandlerConfigurationParameterBuilder setPollingInterval(final int pollingInterval) {
86 this.pollingInterval = pollingInterval;
91 * Set pollingTimeout to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
93 * @param pollingTimeout the pollingTimeout
95 public SdcReceptionHandlerConfigurationParameterBuilder setPollingTimeout(final int pollingTimeout) {
96 this.pollingTimeout = pollingTimeout;
101 * Set asdcAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
103 * @param asdcAddress the asdcAddress
105 public SdcReceptionHandlerConfigurationParameterBuilder setAsdcAddress(final String asdcAddress) {
106 this.asdcAddress = asdcAddress;
111 * Set user to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
113 * @param user the user
115 public SdcReceptionHandlerConfigurationParameterBuilder setUser(final String user) {
121 * Set password to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
123 * @param password the password
125 public SdcReceptionHandlerConfigurationParameterBuilder setPassword(final String password) {
126 this.password = password;
131 * Set consumerId to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
133 * @param consumerId the consumerId
135 public SdcReceptionHandlerConfigurationParameterBuilder setConsumerId(final String consumerId) {
136 this.consumerId = consumerId;
141 * Set consumerGroup to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
143 * @param consumerGroup the consumerGroup
145 public SdcReceptionHandlerConfigurationParameterBuilder setConsumerGroup(final String consumerGroup) {
146 this.consumerGroup = consumerGroup;
151 * Set environmentName to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
153 * @param environmentName the environmentName
155 public SdcReceptionHandlerConfigurationParameterBuilder setEnvironmentName(final String environmentName) {
156 this.environmentName = environmentName;
161 * Set keystorePath to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
163 * @param keystorePath the keystorePath
165 public SdcReceptionHandlerConfigurationParameterBuilder setKeystorePath(final String keystorePath) {
166 this.keystorePath = keystorePath;
171 * Set keystorePassword to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
173 * @param keystorePassword the keystorePassword
175 public SdcReceptionHandlerConfigurationParameterBuilder setKeystorePassword(final String keystorePassword) {
176 this.keystorePassword = keystorePassword;
181 * Set messageBusAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
183 * @param messageBusAddress the messageBusAddress
185 public SdcReceptionHandlerConfigurationParameterBuilder setMessageBusAddress(final List<String> messageBusAddress) {
186 this.messageBusAddress = messageBusAddress;
191 * Set artifactTypes to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
193 * @param artifactTypes the artifactTypes
195 public SdcReceptionHandlerConfigurationParameterBuilder setArtifactTypes(final List<String> artifactTypes) {
196 this.artifactTypes = artifactTypes;
201 * Set retryDelay to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
203 * @param retryDelay the retryDelay
205 public SdcReceptionHandlerConfigurationParameterBuilder setRetryDelay(final int retryDelay) {
206 this.retryDelay = retryDelay;
211 * Returns the active server TlsAuth of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
213 * @return the activeserverTlsAuth
215 public boolean isActiveserverTlsAuth() {
216 return activeserverTlsAuth;
220 * Returns the isFilterinEmptyResources flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder}
223 * @return the isFilterinEmptyResources
225 public boolean isFilterinEmptyResources() {
226 return filterinEmptyResources;
230 * Returns the isUseHttpsWithDmaap flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
232 * @return the isUseHttpsWithDmaap
234 public Boolean getIsUseHttpsWithDmaap() {
235 return useHttpsWithDmaap;
239 * Returns the polling interval of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
241 * @return the pollingInterval
243 public int getPollingInterval() {
244 return pollingInterval;
248 * Returns the polling timeout of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
250 * @return the pollingTimeout
252 public int getPollingTimeout() {
253 return pollingTimeout;
257 * Returns the asdc address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
259 * @return the asdcAddress
261 public String getAsdcAddress() {
266 * Returns the user of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
270 public String getUser() {
275 * Returns the password of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
277 * @return the password
279 public String getPassword() {
284 * Returns the consumer id of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
286 * @return the consumerId
288 public String getConsumerId() {
293 * Returns the consumer group of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
295 * @return the consumerGroup
297 public String getConsumerGroup() {
298 return consumerGroup;
302 * Returns the environment name of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
304 * @return the environmentName
306 public String getEnvironmentName() {
307 return environmentName;
311 * Returns the keystore path of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
313 * @return the keystorePath
315 public String getKeystorePath() {
320 * Returns the keystore password of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
322 * @return the keystorePassword
324 public String getKeystorePassword() {
325 return keystorePassword;
329 * Returns the message bus address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
331 * @return the messageBusAddress
333 public List<String> getMessageBusAddress() {
334 return messageBusAddress;
338 * Returns the artifact types of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
340 * @return the artifactTypes
342 public List<String> getArtifactTypes() {
343 return artifactTypes;
347 * Returns the retryDelay of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
349 * @return the retryDelay
351 public int getRetryDelay() {