2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.api;
24 import java.util.UUID;
27 * <code>ConfigRequestParameters</code> defines the Config Policy Request Parameters
28 * which retrieve(s) the policy from PDP if the request parameters match with any Config Policy.
32 public class ConfigRequestParameters {
33 private String policyName;
34 private String onapName;
35 private String configName;
36 private Map<String,String> configAttributes;
37 private UUID requestID;
38 private Boolean unique = false;
41 * Sets the PolicyName of the Config policy which needs to be retrieved.
43 * @param policyName the <code>String</code> format of the PolicyFile Name whose configuration is required.
45 public void setPolicyName(String policyName){
46 this.policyName = policyName;
50 * Sets the ONAP Component Name of the Config policy which needs to be retrieved.
52 * @param onapName the <code>String</code> format of the onapName whose configuration is required.
54 public void setOnapName(String onapName){
55 this.onapName = onapName;
59 * Sets the ONAP Component Name of the Config policy which needs to be retrieved.
61 * @param ecompName the <code>String</code> format of the onapName whose configuration is required.
62 * @deprecated use {@link #setOnapName(String)} instead.
65 public void setEcompName(String ecompName){
66 this.onapName = ecompName;
70 * Sets the Config Name of the Config policy which needs to be retrieved.
72 * @param configName the <code>String</code> format of the configurationName whose configuration is required.
74 public void setConfigName(String configName){
75 this.configName = configName;
79 * Sets the ConfigAttributes of the Config policy which needs to be retrieved.
81 * @param configAttributes the <code>Map</code> of <code>String,String</code> format of the configuration attributes which are required.
83 public void setConfigAttributes(Map<String, String> configAttributes){
84 this.configAttributes = configAttributes;
88 * Sets the Request ID of the ONAP request.
90 * @param requestID unique <code>UUID</code> requestID which will be passed throughout the ONAP components to correlate logging messages.
92 public void setRequestID(UUID requestID){
93 this.requestID = requestID;
97 * Gets the policyName of the Request Parameters.
99 * @return <code>String</code> format of the policyName.
101 public String getPolicyName(){
106 * Gets the ONAP Component Name of the Request Parameters.
108 * @return <code>String</code> format of the ONAP Component Name.
110 public String getOnapName(){
115 * Gets the ONAP Component Name of the Request Parameters.
117 * @return <code>String</code> format of the ONAP Component Name.
118 * @deprecated use {@link #getOnapName()} instead.
121 public String getEcompName(){
126 * Gets the Config name of the Request Parameters.
128 * @return <code>String</code> format of the Config Name.
130 public String getConfigName(){
135 * Gets the Config Attributes of the Request Parameters.
137 * @return <code>Map</code> of <code>String</code>,<code>String</code> format of the config Attributes.
139 public Map<String,String> getConfigAttributes(){
140 return configAttributes;
144 * Gets the Request ID of the Request Paramters.
146 * @return <code>UUID</code> format of requestID.
148 public UUID getRequestID(){
153 * Makes the results Unique, priority based. If set to True. Default Value is set to False.
155 * @param unique flag which is either true or false.
157 public void makeUnique(Boolean unique){
158 this.unique = unique;
162 * Gets the Unique flag value from the Config Request Parameters.
164 * @return unique flag which is either true or false.
166 public Boolean getUnique(){