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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 * SPDX-License-Identifier: Apache-2.0
19 * ============LICENSE_END=========================================================
22 package org.onap.policy.distribution.main.testclasses;
24 import org.onap.policy.common.parameters.GroupValidationResult;
25 import org.onap.policy.distribution.reception.parameters.ReceptionHandlerConfigurationParameterGroup;
27 public class DummyReceptionHandlerParameterGroup extends ReceptionHandlerConfigurationParameterGroup {
29 private String myStringParameter;
30 private int myIntegerParameter;
31 private boolean myBooleanParameter;
34 * Inner static class is to used as a Builder.
37 public static class DummyReceptionHandlerParameterGroupBuilder {
38 private String myStringParameter;
39 private int myIntegerParameter;
40 private boolean myBooleanParameter;
42 public DummyReceptionHandlerParameterGroupBuilder setMyStringParameter(final String val) {
43 myStringParameter = val;
47 public DummyReceptionHandlerParameterGroupBuilder setMyIntegerParameter(final int val) {
48 myIntegerParameter = val;
52 public DummyReceptionHandlerParameterGroupBuilder setMyBooleanParameter(final boolean val) {
53 myBooleanParameter = val;
58 * Creates a new DummyReceptionHandlerConfigurationParameterGroup instance.
60 public DummyReceptionHandlerParameterGroup build() {
61 return new DummyReceptionHandlerParameterGroup(this);
66 * The constructor for instantiating PssdConfigurationParameterGroup. It is kept private so that
67 * it could only be called by PssdConfigurationBuilder.
69 * @param builder stores all the values used by PssdConfigurationParametersGroup
71 private DummyReceptionHandlerParameterGroup(final DummyReceptionHandlerParameterGroupBuilder builder) {
72 myStringParameter = builder.myStringParameter;
73 myIntegerParameter = builder.myIntegerParameter;
74 myBooleanParameter = builder.myBooleanParameter;
77 public String getMyStringParameter() {
78 return myStringParameter;
81 public int getMyIntegerParameter() {
82 return myIntegerParameter;
85 public boolean isMyBooleanParameter() {
86 return myBooleanParameter;
94 public GroupValidationResult validate() {
95 return new GroupValidationResult(this);