[POLICY-122] Policy GUI Fixes
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / openecomp / policy / api / DecisionRequestParameters.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>DecisionRequestParameters</code> defines the Decision Policy Request Parameters
28  *  which retrieve(s) the response from PDP if the request parameters match with any Decision Policy.
29  * 
30  * @version 0.1
31  */
32 public class DecisionRequestParameters {
33         private String eCOMPComponentName;
34         private Map<String,String> decisionAttributes;
35         private UUID requestID;
36         
37         /**
38          * Constructor with no Parameters
39          */
40         public DecisionRequestParameters(){
41         }
42         
43         /**
44          * Constructor with Parameters
45          * 
46          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose Decision is required.
47          * @param decisionAttributes the <code>Map</code> of <code>String,String</code> format of the decisionAttributes that contain the ID and values.
48          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
49          */
50         public DecisionRequestParameters(String eCOMPComponentName, Map<String,String> decisionAttributes, UUID requestID){
51                 this.eCOMPComponentName = eCOMPComponentName;
52                 this.decisionAttributes = decisionAttributes;
53                 this.requestID = requestID;
54         }
55         
56         /**
57          * Gets the ECOMPComponentName of the Decision Request Parameters. 
58          * 
59          * @return ECOMPComponentName the <code>String</code> format of the eCOMPComponentName of the Decision Request Parameters.
60          */
61         public String getECOMPComponentName() {
62                 return eCOMPComponentName;
63         }
64         /**
65          * Sets the ECOMPComponentName of the Decision Request parameters.  
66          * 
67          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose Decision is required.
68          */
69         public void setECOMPComponentName(String eCOMPComponentName) {
70                 this.eCOMPComponentName = eCOMPComponentName;
71         }
72         /**
73          * Gets the Decision Attributes from Decision Request Parameters. 
74          * 
75          * @return decisionAttributes the <code>Map</code> of <code>String,String</code> format of the decisionAttributes that contain the ID and values.
76          */
77         public Map<String,String> getDecisionAttributes() {
78                 return decisionAttributes;
79         }
80         /**
81          * Sets the Decision Attributes which contain ID and values for obtaining Decision from PDP. 
82          * 
83          * @param decisionAttributes the <code>Map</code> of <code>String,String</code> format of the decisionAttributes that must contain the ID and values.
84          */
85         public void setDecisionAttributes(Map<String,String> decisionAttributes) {
86                 this.decisionAttributes = decisionAttributes;
87         }
88         /**
89          * Gets the request ID of Decision Request Parameters. 
90          * 
91          * @return the requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
92          */
93         public UUID getRequestID() {
94                 return requestID;
95         }
96         /**
97          * Sets the ReqestID of Decision Request Parameters which will be passed around ECOMP requests.
98          * 
99          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
100          */
101         public void setRequestID(UUID requestID) {
102                 this.requestID = requestID;
103         }
104 }