2  * ============LICENSE_START=======================================================
 
   3  *  Copyright (C) 2019 Intel Corp. All rights reserved.
 
   4  *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
 
   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.forwarding.file;
 
  24 import org.onap.policy.common.parameters.GroupValidationResult;
 
  25 import org.onap.policy.common.parameters.ValidationStatus;
 
  26 import org.onap.policy.common.utils.validation.ParameterValidationUtils;
 
  27 import org.onap.policy.distribution.main.parameters.PolicyForwarderConfigurationParameterGroup;
 
  30  * Holds the parameters for the{@link FilePolicyForwarder}.
 
  32 public class FilePolicyForwarderParameterGroup extends PolicyForwarderConfigurationParameterGroup {
 
  33     public static final String POLICY_FORWARDER_PLUGIN_CLASS = FilePolicyForwarder.class.getName();
 
  36     private boolean verbose;
 
  39      * Constructor for instantiating {@link FilePolicyForwarderParameterGroup} class.
 
  41      * @param builder the apex forwarder parameter builder
 
  43     public FilePolicyForwarderParameterGroup(final FilePolicyForwarderParameterBuilder builder) {
 
  44         this.path = builder.getPath();
 
  45         this.verbose = builder.isVerbose();
 
  48     public String getPath() {
 
  52     public boolean isVerbose() {
 
  57     public GroupValidationResult validate() {
 
  58         final GroupValidationResult validationResult = new GroupValidationResult(this);
 
  59         if (!ParameterValidationUtils.validateStringParameter(path)) {
 
  60             validationResult.setResult("path", ValidationStatus.INVALID,
 
  61                     "must be a non-blank string containing path directory");
 
  63         return validationResult;