Remove GroupValidationResult
[policy/apex-pdp.git] / context / context-management / src / main / java / org / onap / policy / apex / context / parameters / DistributorParameters.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
4  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. 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.apex.context.parameters;
23
24 import org.onap.policy.apex.context.impl.distribution.jvmlocal.JvmLocalDistributor;
25 import org.onap.policy.common.parameters.ParameterGroupImpl;
26 import org.onap.policy.common.parameters.annotations.ClassName;
27 import org.onap.policy.common.parameters.annotations.NotNull;
28
29 /**
30  * An empty distributor parameter class that may be specialized by context distributor plugins that
31  * require plugin specific parameters. The class defines the default distributor plugin as the JVM
32  * local distributor.
33  *
34  * @author Liam Fallon (liam.fallon@ericsson.com)
35  */
36 @NotNull
37 public class DistributorParameters extends ParameterGroupImpl {
38     /** The default distributor makes context albums available to all threads in a single JVM. */
39     public static final String DEFAULT_DISTRIBUTOR_PLUGIN_CLASS = JvmLocalDistributor.class.getName();
40
41     private @ClassName String pluginClass = DEFAULT_DISTRIBUTOR_PLUGIN_CLASS;
42
43     /**
44      * Constructor to create a distributor parameters instance and register the instance with the
45      * parameter service.
46      */
47     public DistributorParameters() {
48         super(ContextParameterConstants.DISTRIBUTOR_GROUP_NAME);
49     }
50
51     /**
52      * Gets the plugin class.
53      *
54      * @return the plugin class
55      */
56     public String getPluginClass() {
57         return pluginClass;
58     }
59
60     /**
61      * Sets the plugin class.
62      *
63      * @param pluginClass the plugin class
64      */
65     public void setPluginClass(final String pluginClass) {
66         this.pluginClass = pluginClass;
67     }
68
69     @Override
70     public String toString() {
71         return "DistributorParameters [name=" + getName() + ", pluginClass=" + pluginClass + "]";
72     }
73 }