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>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.
32 public class DecisionRequestParameters {
33 private String onapName;
34 private Map<String,String> decisionAttributes;
35 private UUID requestID;
38 * Constructor with no Parameters
40 public DecisionRequestParameters(){
44 * Constructor with Parameters
46 * @param onapName the <code>String</code> format of the onapName 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 ONAP components to correlate logging messages.
50 public DecisionRequestParameters(String onapName, Map<String,String> decisionAttributes, UUID requestID){
51 this.onapName = onapName;
52 this.decisionAttributes = decisionAttributes;
53 this.requestID = requestID;
57 * Gets the onapName of the Decision Request Parameters.
59 * @return onapName the <code>String</code> format of the onapName of the Decision Request Parameters.
61 public String getOnapName() {
66 * Gets the onapName of the Decision Request Parameters.
68 * @return onapName the <code>String</code> format of the onapName of the Decision Request Parameters.
69 * @deprecated use {@link #getOnapName()} instead.
72 public String getECOMPComponentName() {
77 * Sets the onapName of the Decision Request parameters.
79 * @param onapName the <code>String</code> format of the onapName whose Decision is required.
81 public void setOnapName(String onapName) {
82 this.onapName = onapName;
86 * Sets the ecompComponentName of the Decision Request parameters.
88 * @param ecompName the <code>String</code> format of the onapName whose Decision is required.
89 * @deprecated use {@link #setOnapName(String)} instead.
92 public void setECOMPComponentName(String ecompName) {
93 this.onapName = ecompName;
97 * Gets the Decision Attributes from Decision Request Parameters.
99 * @return decisionAttributes the <code>Map</code> of <code>String,String</code> format of the decisionAttributes that contain the ID and values.
101 public Map<String,String> getDecisionAttributes() {
102 return decisionAttributes;
105 * Sets the Decision Attributes which contain ID and values for obtaining Decision from PDP.
107 * @param decisionAttributes the <code>Map</code> of <code>String,String</code> format of the decisionAttributes that must contain the ID and values.
109 public void setDecisionAttributes(Map<String,String> decisionAttributes) {
110 this.decisionAttributes = decisionAttributes;
113 * Gets the request ID of Decision Request Parameters.
115 * @return the requestID unique request ID which will be passed throughout the ONAP components to correlate logging messages.
117 public UUID getRequestID() {
121 * Sets the ReqestID of Decision Request Parameters which will be passed around ONAP requests.
123 * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging messages.
125 public void setRequestID(UUID requestID) {
126 this.requestID = requestID;