CLAMP Model policy creation support
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / onap / policy / api / ConfigRequestParameters.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * PolicyEngineAPI
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.policy.api;
22
23 import java.util.Map;
24 import java.util.UUID;
25
26 /**
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.  
29  * 
30  * @version 0.1
31  */
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;
39         
40         /**
41          * Sets the PolicyName of the Config policy which needs to be retrieved. 
42          * 
43          * @param policyName the <code>String</code> format of the PolicyFile Name whose configuration is required.
44          */
45         public void setPolicyName(String policyName){
46                 this.policyName = policyName;
47         }
48         
49         /**
50          * Sets the ONAP Component Name of the Config policy which needs to be retrieved. 
51          * 
52          * @param onapName the <code>String</code> format of the onapName whose configuration is required.
53          */
54         public void setOnapName(String onapName){
55                 this.onapName = onapName;
56         }
57         
58         /**
59      * Sets the ONAP Component Name of the Config policy which needs to be retrieved. 
60      * 
61      * @param ecompName the <code>String</code> format of the onapName whose configuration is required.
62      * @deprecated use {@link #setOnapName(String)} instead.  
63      */
64         @Deprecated
65     public void setEcompName(String ecompName){
66         this.onapName = ecompName;
67     }
68         
69         /**
70          * Sets the Config Name of the Config policy which needs to be retrieved.  
71          * 
72          * @param configName the <code>String</code> format of the configurationName whose configuration is required.
73          */
74         public void setConfigName(String configName){
75                 this.configName = configName;
76         }
77         
78         /**
79          * Sets the ConfigAttributes of the Config policy which needs to be retrieved. 
80          * 
81          * @param configAttributes the <code>Map</code> of <code>String,String</code> format of the configuration attributes which are required.
82          */
83         public void setConfigAttributes(Map<String, String> configAttributes){
84                 this.configAttributes = configAttributes;
85         }
86         
87         /**
88          * Sets the Request ID of the ONAP request. 
89          * 
90          * @param requestID unique <code>UUID</code> requestID which will be passed throughout the ONAP components to correlate logging messages.
91          */
92         public void setRequestID(UUID requestID){
93                 this.requestID = requestID;
94         }
95         
96         /**
97          * Gets the policyName of the Request Parameters.
98          * 
99          * @return <code>String</code> format of the policyName.
100          */
101         public String getPolicyName(){
102                 return policyName;
103         }
104         
105         /**
106          * Gets the ONAP Component Name of the Request Parameters. 
107          * 
108          * @return <code>String</code> format of the ONAP Component Name. 
109          */
110         public String getOnapName(){
111                 return onapName;
112         }
113         
114         /**
115      * Gets the ONAP Component Name of the Request Parameters. 
116      * 
117      * @return <code>String</code> format of the ONAP Component Name. 
118      * @deprecated use {@link #getOnapName()} instead. 
119      */
120         @Deprecated
121     public String getEcompName(){
122         return onapName;
123     }
124         
125         /**
126          * Gets the Config name of the Request Parameters. 
127          * 
128          * @return <code>String</code> format of the Config Name.  
129          */
130         public String getConfigName(){
131                 return configName;
132         }
133         
134         /**
135          *  Gets the Config Attributes of the Request Parameters. 
136          *  
137          * @return <code>Map</code> of <code>String</code>,<code>String</code> format of the config Attributes. 
138          */
139         public Map<String,String> getConfigAttributes(){
140                 return configAttributes;
141         }
142         
143         /**
144          *  Gets the Request ID of the Request Paramters.
145          *  
146          * @return <code>UUID</code> format of requestID. 
147          */
148         public UUID getRequestID(){
149                 return requestID;
150         }
151         
152         /**
153          * Makes the results Unique, priority based. If set to True. Default Value is set to False. 
154          * 
155          * @param unique flag which is either true or false. 
156          */
157         public void makeUnique(Boolean unique){
158                 this.unique = unique;
159         }
160         
161         /**
162          * Gets the Unique flag value from the Config Request Parameters. 
163          * 
164          * @return unique flag which is either true or false. 
165          */
166         public Boolean getUnique(){
167                 return this.unique;
168         }
169
170 }