Fix link address of artifact broker package
[multicloud/framework.git] / artifactbroker / main / src / test / java / org / onap / policy / distribution / main / testclasses / DummyReceptionHandlerParameterGroup.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  *  Copyright (C) 2019 Intel. All rights reserved.
5  * ================================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * SPDX-License-Identifier: Apache-2.0
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.policy.distribution.main.testclasses;
23
24 import org.onap.policy.common.parameters.GroupValidationResult;
25 import org.onap.policy.distribution.reception.parameters.ReceptionHandlerConfigurationParameterGroup;
26
27 public class DummyReceptionHandlerParameterGroup extends ReceptionHandlerConfigurationParameterGroup {
28
29     private String myStringParameter;
30     private int myIntegerParameter;
31     private boolean myBooleanParameter;
32
33     /**
34      * Inner static class is to used as a Builder.
35      *
36      */
37     public static class DummyReceptionHandlerParameterGroupBuilder {
38         private String myStringParameter;
39         private int myIntegerParameter;
40         private boolean myBooleanParameter;
41
42         public DummyReceptionHandlerParameterGroupBuilder setMyStringParameter(final String val) {
43             myStringParameter = val;
44             return this;
45         }
46
47         public DummyReceptionHandlerParameterGroupBuilder setMyIntegerParameter(final int val) {
48             myIntegerParameter = val;
49             return this;
50         }
51
52         public DummyReceptionHandlerParameterGroupBuilder setMyBooleanParameter(final boolean val) {
53             myBooleanParameter = val;
54             return this;
55         }
56
57         /**
58          * Creates a new DummyReceptionHandlerConfigurationParameterGroup instance.
59          */
60         public DummyReceptionHandlerParameterGroup build() {
61             return new DummyReceptionHandlerParameterGroup(this);
62         }
63     }
64
65     /**
66      * The constructor for instantiating PssdConfigurationParameterGroup. It is kept private so that
67      * it could only be called by PssdConfigurationBuilder.
68      *
69      * @param builder stores all the values used by PssdConfigurationParametersGroup
70      */
71     private DummyReceptionHandlerParameterGroup(final DummyReceptionHandlerParameterGroupBuilder builder) {
72         myStringParameter = builder.myStringParameter;
73         myIntegerParameter = builder.myIntegerParameter;
74         myBooleanParameter = builder.myBooleanParameter;
75     }
76
77     public String getMyStringParameter() {
78         return myStringParameter;
79     }
80
81     public int getMyIntegerParameter() {
82         return myIntegerParameter;
83     }
84
85     public boolean isMyBooleanParameter() {
86         return myBooleanParameter;
87     }
88
89
90     /**
91      * {@inheritDoc}.
92      */
93     @Override
94     public GroupValidationResult validate() {
95         return new GroupValidationResult(this);
96     }
97
98 }
99