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.Properties;
26 import javax.json.JsonObject;
28 import org.w3c.dom.Document;
30 * Defines the objects that represent PolicyEngine config elements. PolicyConfig communicates the PolicyConfigStatus,
31 * PolicyConfigMessage, PolicyType, Properties, JsonObject, String and Document.
36 public interface PolicyConfig {
38 * Gets the {@link org.onap.policy.api.PolicyType} associated with <code>PolicyConfig</code>
40 * @return the <code>PolicyType</code> associated with this <code>PolicyConfig</code>
42 public PolicyType getType();
45 * Gives the <code>Properties</code> response associated with the <code>PolicyConfig</code>
47 * @return the <code>Properties</code> associated with this <code>PolicyConfig</code>
49 public Properties toProperties();
52 * Gives the <code>JsonObject</code> response associated with the <code>PolicyConfig</code>
54 * @return the <code>JsonObject</code> result associated with <code>PolicyConfig</code>
56 public JsonObject toJSON();
59 * Gives the XML <code>Document</code> result associated with <code>PolicyConfig</code>
61 * @return the <code>Document</code> result associated with <code>PolicyConfig</code>
63 public Document toXML();
66 * Gives the Other <code>String</code> response associated with <code>PolicyConfig</code>
68 * @return the <code>String</code> result associated with <code>PolicyConfig</code>
70 public String toOther();
73 * Gets the {@link org.onap.policy.api.PolicyConfigStatus} associated with this <code>PolicyConfig</code>.
75 * @return the <code>PolicyConfigStatus</code> associated with this <code>PolicyConfig</code>
77 public PolicyConfigStatus getPolicyConfigStatus();
80 * Gets the <code>String</code> of the PolicyConfigMessage from <code>PolicyConfig</code>.
82 * @return the <code>String</code> which consists of PolicyConfigMessage from <code>PolicyConfig</code>
84 public String getPolicyConfigMessage();
87 * Gets the <code>String</code> of the PolicyName retrieved.
89 * @return the <code>String</code> which consists of Policy Name which has been retrieved.
91 public String getPolicyName();
95 * Gets the <code>String</code> of the PolicyVersion retrieved.
97 * @return the <code>String</code> which consists of the Policy Version number which has been retrieved.
99 public String getPolicyVersion();
102 * Gets the Matching Conditions of the policy retrieved which can be used in the getConfig call.
104 * @return <code>Map</code> of <code>String, String</code> which consists of the Matching conditions of the Policy retrieved.
106 public Map<String,String> getMatchingConditions();
109 * Gets the Response Attributes of the policy retrieved. Which can hold additional information about the policy retrieved.
111 * @return <code>Map</code> of <code>String, String</code> which consists of the Response Attributes of the Policy retrieved.
113 public Map<String,String> getResponseAttributes();
116 * Gets the {@link PolicyConfigType} of the policy that has been retrieved.
118 * @return the <code>PolicyConfigType</code> of the policy that has been retrieved.
120 public PolicyConfigType getPolicyType();
123 * Returns the <code>String</code> version of the <code>PolicyConfig</code> object.
125 * @return <code>String</code> of the <code>PolicyConfig</code> Object.
128 public String toString();