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 useHttpsWithSDC;
35 private int pollingTimeout;
36 private int pollingInterval;
38 private String password;
39 private String consumerId;
40 private String consumerGroup;
41 private String sdcAddress;
42 private String environmentName;
43 private String keystorePath;
44 private String keystorePassword;
45 private int httpsproxyPort;
46 private int httpproxyPort;
47 private String httpsproxyHost;
48 private String httpproxyHost;
49 private List<String> artifactTypes;
50 private int retryDelay;
53 * Set activeserverTlsAuth to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
55 * @param activeserverTlsAuth the activeserverTlsAuth
57 public SdcReceptionHandlerConfigurationParameterBuilder setActiveserverTlsAuth(final boolean activeserverTlsAuth) {
58 this.activeserverTlsAuth = activeserverTlsAuth;
63 * Set filterinEmptyResources to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
65 * @param filterinEmptyResources the filterinEmptyResources
67 public SdcReceptionHandlerConfigurationParameterBuilder setFilterinEmptyResources(
68 final boolean filterinEmptyResources) {
69 this.filterinEmptyResources = filterinEmptyResources;
74 * Set pollingInterval to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
76 * @param pollingInterval the pollingInterval
78 public SdcReceptionHandlerConfigurationParameterBuilder setPollingInterval(final int pollingInterval) {
79 this.pollingInterval = pollingInterval;
84 * Set pollingTimeout to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
86 * @param pollingTimeout the pollingTimeout
88 public SdcReceptionHandlerConfigurationParameterBuilder setPollingTimeout(final int pollingTimeout) {
89 this.pollingTimeout = pollingTimeout;
94 * Set sdcAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
96 * @param sdcAddress the sdcAddress
98 public SdcReceptionHandlerConfigurationParameterBuilder setSdcAddress(final String sdcAddress) {
99 this.sdcAddress = sdcAddress;
104 * Set user to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
106 * @param user the user
108 public SdcReceptionHandlerConfigurationParameterBuilder setUser(final String user) {
114 * Set password to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
116 * @param password the password
118 public SdcReceptionHandlerConfigurationParameterBuilder setPassword(final String password) {
119 this.password = password;
124 * Set consumerId to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
126 * @param consumerId the consumerId
128 public SdcReceptionHandlerConfigurationParameterBuilder setConsumerId(final String consumerId) {
129 this.consumerId = consumerId;
134 * Set consumerGroup to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
136 * @param consumerGroup the consumerGroup
138 public SdcReceptionHandlerConfigurationParameterBuilder setConsumerGroup(final String consumerGroup) {
139 this.consumerGroup = consumerGroup;
144 * Set environmentName to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
146 * @param environmentName the environmentName
148 public SdcReceptionHandlerConfigurationParameterBuilder setEnvironmentName(final String environmentName) {
149 this.environmentName = environmentName;
154 * Set keystorePath to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
156 * @param keystorePath the keystorePath
158 public SdcReceptionHandlerConfigurationParameterBuilder setKeystorePath(final String keystorePath) {
159 this.keystorePath = keystorePath;
164 * Set keystorePassword to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
166 * @param keystorePassword the keystorePassword
168 public SdcReceptionHandlerConfigurationParameterBuilder setKeystorePassword(final String keystorePassword) {
169 this.keystorePassword = keystorePassword;
174 * Set artifactTypes to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
176 * @param artifactTypes the artifactTypes
178 public SdcReceptionHandlerConfigurationParameterBuilder setArtifactTypes(final List<String> artifactTypes) {
179 this.artifactTypes = artifactTypes;
184 * Set retryDelay to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
186 * @param retryDelay the retryDelay
188 public SdcReceptionHandlerConfigurationParameterBuilder setRetryDelay(final int retryDelay) {
189 this.retryDelay = retryDelay;
194 * Returns the active server TlsAuth of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
196 * @return the activeserverTlsAuth
198 public boolean isActiveserverTlsAuth() {
199 return activeserverTlsAuth;
203 * Returns the isFilterinEmptyResources flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder}
206 * @return the isFilterinEmptyResources
208 public boolean isFilterinEmptyResources() {
209 return filterinEmptyResources;
213 * Returns the isUseHttpsWithSDC flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
215 * @return the isUseHttpsWithSDC
217 public Boolean getIsUseHttpsWithSDC() {
218 return useHttpsWithSDC;
222 * Returns the polling interval of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
224 * @return the pollingInterval
226 public int getPollingInterval() {
227 return pollingInterval;
231 * Returns the polling timeout of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
233 * @return the pollingTimeout
235 public int getPollingTimeout() {
236 return pollingTimeout;
240 * Returns the asdc address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
242 * @return the sdcAddress
244 public String getSdcAddress() {
249 * Returns the user of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
253 public String getUser() {
258 * Returns the password of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
260 * @return the password
262 public String getPassword() {
267 * Returns the consumer id of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
269 * @return the consumerId
271 public String getConsumerId() {
276 * Returns the consumer group of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
278 * @return the consumerGroup
280 public String getConsumerGroup() {
281 return consumerGroup;
285 * Returns the environment name of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
287 * @return the environmentName
289 public String getEnvironmentName() {
290 return environmentName;
294 * Returns the keystore path of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
296 * @return the keystorePath
298 public String getKeystorePath() {
303 * Returns the keystore password of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
305 * @return the keystorePassword
307 public String getKeystorePassword() {
308 return keystorePassword;
312 * Returns the artifact types of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
314 * @return the artifactTypes
316 public List<String> getArtifactTypes() {
317 return artifactTypes;
321 * Returns the retryDelay of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
323 * @return the retryDelay
325 public int getRetryDelay() {
329 * Returns the https proxy port of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
331 * @return the httpsproxyPort
333 public int getHttpsProxyPort() {
334 return httpsproxyPort;
337 * Returns the https proxy host of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
339 * @return the httpsproxyHost
341 public String getHttpsProxyHost() {
342 return httpsproxyHost;
345 * Returns the http proxy port of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
347 * @return the httpproxyPort
349 public int getHttpProxyPort() {
350 return httpproxyPort;
353 * Returns the http proxy host of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
355 * @return the httpsproxyHost
357 public String getHttpProxyHost() {
358 return httpproxyHost;