[POLICY-73] replace openecomp for policy-engine
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / onap / policy / api / PolicyConfig.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.onap.policy.api;
22
23 import java.util.Map;
24 import java.util.Properties;
25
26 import javax.json.JsonObject;
27
28 import org.w3c.dom.Document;
29 /**
30  * Defines the objects that represent PolicyEngine config elements. PolicyConfig communicates the PolicyConfigStatus,
31  * PolicyConfigMessage, PolicyType, Properties, JsonObject, String and Document. 
32  * 
33  * @version 0.7
34  */
35
36 public interface PolicyConfig {
37         /**
38          * Gets the {@link org.onap.policy.api.PolicyType} associated with <code>PolicyConfig</code> 
39          * 
40          * @return the <code>PolicyType</code> associated with this <code>PolicyConfig</code> 
41          */
42         public PolicyType getType();
43         
44         /**
45          * Gives the <code>Properties</code> response associated with the <code>PolicyConfig</code> 
46          * 
47          * @return the <code>Properties</code> associated with this <code>PolicyConfig</code>
48          */
49         public Properties toProperties();
50         
51         /**
52          * Gives the <code>JsonObject</code> response associated with the <code>PolicyConfig</code> 
53          * 
54          * @return the <code>JsonObject</code> result associated with <code>PolicyConfig</code> 
55          */
56         public JsonObject toJSON();
57         
58         /**
59          * Gives the XML <code>Document</code> result associated with <code>PolicyConfig</code> 
60          * 
61          * @return the <code>Document</code> result associated with <code>PolicyConfig</code> 
62          */
63         public Document toXML();
64         
65         /**
66          * Gives the Other <code>String</code> response associated with <code>PolicyConfig</code>
67          * 
68          * @return the <code>String</code> result associated with <code>PolicyConfig</code>
69          */
70         public String toOther();
71         
72         /**
73          * Gets the {@link org.onap.policy.api.PolicyConfigStatus} associated with this <code>PolicyConfig</code>.
74          * 
75          * @return the <code>PolicyConfigStatus</code> associated with this <code>PolicyConfig</code>
76          */
77         public PolicyConfigStatus getPolicyConfigStatus();
78         
79         /**
80          * Gets the <code>String</code> of the PolicyConfigMessage from <code>PolicyConfig</code>.
81          * 
82          * @return the <code>String</code> which consists of PolicyConfigMessage from <code>PolicyConfig</code>
83          */
84         public String getPolicyConfigMessage();
85         
86         /**
87          * Gets the <code>String</code> of the PolicyName retrieved.
88          * 
89          * @return the <code>String</code> which consists of Policy Name which has been retrieved.  
90          */
91         public String getPolicyName();
92         
93         
94         /**
95          * Gets the <code>String</code> of the PolicyVersion retrieved.
96          * 
97          * @return the <code>String</code> which consists of the Policy Version number which has been retrieved.
98          */
99         public String getPolicyVersion();
100         
101         /**
102          * Gets the Matching Conditions of the policy retrieved which can be used in the getConfig call.
103          * 
104          * @return <code>Map</code> of <code>String, String</code> which consists of the Matching conditions of the Policy retrieved. 
105          */
106         public Map<String,String> getMatchingConditions();
107         
108         /**
109          * Gets the Response Attributes of the policy retrieved. Which can hold additional information about the policy retrieved.  
110          * 
111          * @return <code>Map</code> of <code>String, String</code> which consists of the Response Attributes of the Policy retrieved. 
112          */
113         public Map<String,String> getResponseAttributes();
114         
115         /**
116          * Returns the <code>String</code> version of the <code>PolicyConfig</code> object.
117          * 
118          *  @return <code>String</code> of the <code>PolicyConfig</code> Object.  
119          */
120         @Override
121         public String toString();
122         
123 }