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=========================================================
22 package org.onap.policy.api;
27 * Defines the objects that represent PolicyEngine Response elements. PolicyResponse communicates the PolicyResponseStatus,
28 * PolicyResponseMessage, ActionAdvised, ActionTaken and RequestAttributes.
32 public interface PolicyResponse {
34 * Gets the {@link org.onap.policy.api.PolicyResponseStatus} associated with this <code>PolicyResponse</code>.
36 * @return the <code>PolicyResponseStatus</code> associated with this <code>PolicyResponse</code>
38 public PolicyResponseStatus getPolicyResponseStatus();
41 * Gets the <code>Map</code> of <code>String,String</code> which consists of ActionAdvised in this <code>PolicyResponse</code>.
42 * If there is no ActionAdvised this method must return an empty <code>Map</code>.
44 * @return the <code>Map</code> of <code>String,String</code> which consists of AdviceAttributes in <code>PolicyResponse</code>
46 public Map<String,String> getActionAdvised();
49 * Gets the <code>Map</code> of <code>String,String</code> which consists of ActionTaken in this <code>PolicyResponse</code>.
50 * If there are no ActionTaken this method must return an empty <code>Map</code>.
52 * @return the <code>Map</code> of <code>String,String</code> which consists of ActionTaken in <code>PolicyResponse</code>
54 public Map<String,String> getActionTaken();
57 * Gets the <code>Map</code> of <code>String,String</code> which consists of RequestAttributes in this <code>PolicyResponse</code>.
59 * @return the <code>Map</code> of <code>String,String</code> which consists of RequestAttributes from <code>PolicyResponse</code>
61 public Map<String,String> getRequestAttributes();
64 * Gets the <code>String</code> of the PolicyResponseMessage from <code>PolicyResponse</code>
66 * @return the <code>String</code> which consists of PolicyResponseMessage from <code>PolicyResponse</code>
68 public String getPolicyResponseMessage();
71 * Returns the <code>String</code> version of the <code>PolicyResponse</code> object.
73 * @return <code>String</code> of the <code>PolicyResponse</code> Object.
76 public String toString();