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.main.testclasses;
 
  23 import org.onap.policy.common.parameters.GroupValidationResult;
 
  24 import org.onap.policy.distribution.reception.parameters.ReceptionHandlerConfigurationParameterGroup;
 
  26 public class DummyReceptionHandlerParameterGroup extends ReceptionHandlerConfigurationParameterGroup {
 
  28     private String myStringParameter;
 
  29     private int myIntegerParameter;
 
  30     private boolean myBooleanParameter;
 
  33      * Inner static class is to used as a Builder.
 
  36     public static class DummyReceptionHandlerParameterGroupBuilder {
 
  37         private String myStringParameter;
 
  38         private int myIntegerParameter;
 
  39         private boolean myBooleanParameter;
 
  41         public DummyReceptionHandlerParameterGroupBuilder setMyStringParameter(final String val) {
 
  42             myStringParameter = val;
 
  46         public DummyReceptionHandlerParameterGroupBuilder setMyIntegerParameter(final int val) {
 
  47             myIntegerParameter = val;
 
  51         public DummyReceptionHandlerParameterGroupBuilder setMyBooleanParameter(final boolean val) {
 
  52             myBooleanParameter = val;
 
  57          * Creates a new DummyReceptionHandlerConfigurationParameterGroup instance.
 
  59         public DummyReceptionHandlerParameterGroup build() {
 
  60             return new DummyReceptionHandlerParameterGroup(this);
 
  65      * The constructor for instantiating PssdConfigurationParameterGroup. It is kept private so that
 
  66      * it could only be called by PssdConfigurationBuilder.
 
  68      * @param builder stores all the values used by PssdConfigurationParametersGroup
 
  70     private DummyReceptionHandlerParameterGroup(final DummyReceptionHandlerParameterGroupBuilder builder) {
 
  71         myStringParameter = builder.myStringParameter;
 
  72         myIntegerParameter = builder.myIntegerParameter;
 
  73         myBooleanParameter = builder.myBooleanParameter;
 
  76     public String getMyStringParameter() {
 
  77         return myStringParameter;
 
  80     public int getMyIntegerParameter() {
 
  81         return myIntegerParameter;
 
  84     public boolean isMyBooleanParameter() {
 
  85         return myBooleanParameter;
 
  93     public GroupValidationResult validate() {
 
  94         return new GroupValidationResult(this);