Initial OpenECOMP policy/engine commit
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / openecomp / 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.openecomp.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 eCOMPComponentName;
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 ECOMP Component Name of the Config policy which needs to be retrieved. 
51          * 
52          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose configuration is required.
53          */
54         public void setEcompName(String eCOMPComponentName){
55                 this.eCOMPComponentName = eCOMPComponentName;
56         }
57         
58         /**
59          * Sets the Config Name of the Config policy which needs to be retrieved.  
60          * 
61          * @param configName the <code>String</code> format of the configurationName whose configuration is required.
62          */
63         public void setConfigName(String configName){
64                 this.configName = configName;
65         }
66         
67         /**
68          * Sets the ConfigAttributes of the Config policy which needs to be retrieved. 
69          * 
70          * @param configAttributes the <code>Map</code> of <code>String,String</code> format of the configuration attributes which are required.
71          */
72         public void setConfigAttributes(Map<String, String> configAttributes){
73                 this.configAttributes = configAttributes;
74         }
75         
76         /**
77          * Sets the Request ID of the ECOMP request. 
78          * 
79          * @param requestID unique <code>UUID</code> requestID which will be passed throughout the ECOMP components to correlate logging messages.
80          */
81         public void setRequestID(UUID requestID){
82                 this.requestID = requestID;
83         }
84         
85         /**
86          * Gets the policyName of the Request Parameters.
87          * 
88          * @return <code>String</code> format of the policyName.
89          */
90         public String getPolicyName(){
91                 return policyName;
92         }
93         
94         /**
95          * Gets the ECOMP Component Name of the Request Parameters. 
96          * 
97          * @return <code>String</code> format of the ECOMP Component Name. 
98          */
99         public String getEcompName(){
100                 return eCOMPComponentName;
101         }
102         
103         /**
104          * Gets the Config name of the Request Parameters. 
105          * 
106          * @return <code>String</code> format of the Config Name.  
107          */
108         public String getConfigName(){
109                 return configName;
110         }
111         
112         /**
113          *  Gets the Config Attributes of the Request Parameters. 
114          *  
115          * @return <code>Map</code> of <code>String</code>,<code>String</code> format of the config Attributes. 
116          */
117         public Map<String,String> getConfigAttributes(){
118                 return configAttributes;
119         }
120         
121         /**
122          *  Gets the Request ID of the Request Paramters.
123          *  
124          * @return <code>UUID</code> format of requestID. 
125          */
126         public UUID getRequestID(){
127                 return requestID;
128         }
129         
130         /**
131          * Makes the results Unique, priority based. If set to True. Default Value is set to False. 
132          * 
133          * @param unique flag which is either true or false. 
134          */
135         public void makeUnique(Boolean unique){
136                 this.unique = unique;
137         }
138         
139         /**
140          * Gets the Unique flag value from the Config Request Parameters. 
141          * 
142          * @return unique flag which is either true or false. 
143          */
144         public Boolean getUnique(){
145                 return this.unique;
146         }
147
148 }