From f0944b0dffa4904161cf40d5da13d5d2d34b0cbe Mon Sep 17 00:00:00 2001 From: liboNet Date: Wed, 27 Mar 2019 00:49:32 +0800 Subject: add SDC client and reception handle . add reception framework wraps handle and subplug interface . add plugins include sdc handler now. . add forward acts the post interface for specified item like artifact . add model acts for the sepcifeid item like CSAR . update pom.xml and package/pom.xml to includes all submodules . Fix the compile issue by typo and change groupid to framework Change-Id: Idbff0ca612045c6ee52ba23cd305f2764c9600f8 Issue-ID: MULTICLOUD-514 Signed-off-by: liboNet --- ...eptionHandlerConfigurationParameterBuilder.java | 357 +++++++++++++++++++++ 1 file changed, 357 insertions(+) create mode 100644 artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java (limited to 'artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java') diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java new file mode 100644 index 0000000..65305c1 --- /dev/null +++ b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java @@ -0,0 +1,357 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.distribution.reception.handling.sdc; + +import java.util.List; + +/** + * This class builds an instance of {@link SdcReceptionHandlerConfigurationParameterGroup} class. + * + * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com) + */ +public class SdcReceptionHandlerConfigurationParameterBuilder { + + private boolean activeserverTlsAuth; + private boolean filterinEmptyResources; + private boolean useHttpsWithDmaap; + private int pollingTimeout; + private int pollingInterval; + private String user; + private String password; + private String consumerId; + private String consumerGroup; + private String asdcAddress; + private String environmentName; + private String keystorePath; + private String keystorePassword; + private List messageBusAddress; + private List artifactTypes; + private int retryDelay; + + /** + * Set activeserverTlsAuth to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param activeserverTlsAuth the activeserverTlsAuth + */ + public SdcReceptionHandlerConfigurationParameterBuilder setActiveserverTlsAuth(final boolean activeserverTlsAuth) { + this.activeserverTlsAuth = activeserverTlsAuth; + return this; + } + + /** + * Set filterinEmptyResources to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param filterinEmptyResources the filterinEmptyResources + */ + public SdcReceptionHandlerConfigurationParameterBuilder setFilterinEmptyResources( + final boolean filterinEmptyResources) { + this.filterinEmptyResources = filterinEmptyResources; + return this; + } + + /** + * Set useHttpsWithDmaap to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param useHttpsWithDmaap the useHttpsWithDmaap + */ + public SdcReceptionHandlerConfigurationParameterBuilder setUseHttpsWithDmaap(final Boolean useHttpsWithDmaap) { + this.useHttpsWithDmaap = useHttpsWithDmaap; + return this; + } + + /** + * Set pollingInterval to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param pollingInterval the pollingInterval + */ + public SdcReceptionHandlerConfigurationParameterBuilder setPollingInterval(final int pollingInterval) { + this.pollingInterval = pollingInterval; + return this; + } + + /** + * Set pollingTimeout to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param pollingTimeout the pollingTimeout + */ + public SdcReceptionHandlerConfigurationParameterBuilder setPollingTimeout(final int pollingTimeout) { + this.pollingTimeout = pollingTimeout; + return this; + } + + /** + * Set asdcAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param asdcAddress the asdcAddress + */ + public SdcReceptionHandlerConfigurationParameterBuilder setAsdcAddress(final String asdcAddress) { + this.asdcAddress = asdcAddress; + return this; + } + + /** + * Set user to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param user the user + */ + public SdcReceptionHandlerConfigurationParameterBuilder setUser(final String user) { + this.user = user; + return this; + } + + /** + * Set password to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param password the password + */ + public SdcReceptionHandlerConfigurationParameterBuilder setPassword(final String password) { + this.password = password; + return this; + } + + /** + * Set consumerId to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param consumerId the consumerId + */ + public SdcReceptionHandlerConfigurationParameterBuilder setConsumerId(final String consumerId) { + this.consumerId = consumerId; + return this; + } + + /** + * Set consumerGroup to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param consumerGroup the consumerGroup + */ + public SdcReceptionHandlerConfigurationParameterBuilder setConsumerGroup(final String consumerGroup) { + this.consumerGroup = consumerGroup; + return this; + } + + /** + * Set environmentName to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param environmentName the environmentName + */ + public SdcReceptionHandlerConfigurationParameterBuilder setEnvironmentName(final String environmentName) { + this.environmentName = environmentName; + return this; + } + + /** + * Set keystorePath to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param keystorePath the keystorePath + */ + public SdcReceptionHandlerConfigurationParameterBuilder setKeystorePath(final String keystorePath) { + this.keystorePath = keystorePath; + return this; + } + + /** + * Set keystorePassword to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param keystorePassword the keystorePassword + */ + public SdcReceptionHandlerConfigurationParameterBuilder setKeystorePassword(final String keystorePassword) { + this.keystorePassword = keystorePassword; + return this; + } + + /** + * Set messageBusAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param messageBusAddress the messageBusAddress + */ + public SdcReceptionHandlerConfigurationParameterBuilder setMessageBusAddress(final List messageBusAddress) { + this.messageBusAddress = messageBusAddress; + return this; + } + + /** + * Set artifactTypes to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param artifactTypes the artifactTypes + */ + public SdcReceptionHandlerConfigurationParameterBuilder setArtifactTypes(final List artifactTypes) { + this.artifactTypes = artifactTypes; + return this; + } + + /** + * Set retryDelay to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @param retryDelay the retryDelay + */ + public SdcReceptionHandlerConfigurationParameterBuilder setRetryDelay(final int retryDelay) { + this.retryDelay = retryDelay; + return this; + } + + /** + * Returns the active server TlsAuth of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the activeserverTlsAuth + */ + public boolean isActiveserverTlsAuth() { + return activeserverTlsAuth; + } + + /** + * Returns the isFilterinEmptyResources flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder} + * instance. + * + * @return the isFilterinEmptyResources + */ + public boolean isFilterinEmptyResources() { + return filterinEmptyResources; + } + + /** + * Returns the isUseHttpsWithDmaap flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the isUseHttpsWithDmaap + */ + public Boolean getIsUseHttpsWithDmaap() { + return useHttpsWithDmaap; + } + + /** + * Returns the polling interval of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the pollingInterval + */ + public int getPollingInterval() { + return pollingInterval; + } + + /** + * Returns the polling timeout of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the pollingTimeout + */ + public int getPollingTimeout() { + return pollingTimeout; + } + + /** + * Returns the asdc address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the asdcAddress + */ + public String getAsdcAddress() { + return asdcAddress; + } + + /** + * Returns the user of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the user + */ + public String getUser() { + return user; + } + + /** + * Returns the password of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the password + */ + public String getPassword() { + return password; + } + + /** + * Returns the consumer id of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the consumerId + */ + public String getConsumerId() { + return consumerId; + } + + /** + * Returns the consumer group of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the consumerGroup + */ + public String getConsumerGroup() { + return consumerGroup; + } + + /** + * Returns the environment name of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the environmentName + */ + public String getEnvironmentName() { + return environmentName; + } + + /** + * Returns the keystore path of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the keystorePath + */ + public String getKeystorePath() { + return keystorePath; + } + + /** + * Returns the keystore password of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the keystorePassword + */ + public String getKeystorePassword() { + return keystorePassword; + } + + /** + * Returns the message bus address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the messageBusAddress + */ + public List getMessageBusAddress() { + return messageBusAddress; + } + + /** + * Returns the artifact types of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the artifactTypes + */ + public List getArtifactTypes() { + return artifactTypes; + } + + /** + * Returns the retryDelay of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the retryDelay + */ + public int getRetryDelay() { + return retryDelay; + } + +} + + -- cgit 1.2.3-korg