Initial OpenECOMP policy/engine commit
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / openecomp / policy / api / PolicyEngine.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.Collection;
24 import java.util.Map;
25 import java.util.UUID;
26
27 import javax.json.JsonObject;
28
29 import org.openecomp.policy.api.NotificationHandler;
30 import org.openecomp.policy.api.PDPNotification;
31 import org.openecomp.policy.std.StdPolicyEngine;
32
33 /**
34  * PolicyEngine is the Interface that applications use to make policy queries against a PEPEngine 
35  * 
36  * @version 1.0
37  */
38 public class PolicyEngine{
39         private String propertyFilePath = null;
40         private StdPolicyEngine stdPolicyEngine;
41         private NotificationScheme scheme = null;
42         private NotificationHandler handler = null;
43         
44         /**
45          * Gets the configuration from the PolicyDecisionPoint(PDP) for the <code>String</code> which represents the Policy File Name 
46          * 
47          * @param policyName the <code>String</code> format of the PolicyFile Name whose configuration is required. 
48          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyConfig} which has the configuration. 
49          * @throws PolicyConfigException
50          * @deprecated use {@link #getConfigByPolicyName(String policyName, UUID requestID)} Instead.
51          */
52         @Deprecated
53         public Collection<PolicyConfig> getConfigByPolicyName(String policyName) throws PolicyConfigException {
54                 Collection<PolicyConfig> policyConfig = stdPolicyEngine.policyName(policyName,(UUID)null);
55                 return policyConfig;    
56         }
57         
58         /**
59          * Gets the configuration from the PolicyDecisionPoint(PDP) for the <code>String</code> which represents the Policy File Name 
60          * 
61          * @param policyName the <code>String</code> format of the PolicyFile Name whose configuration is required. 
62          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
63          * A different request ID should be passed for each request.
64          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyConfig} which has the configuration. 
65          * @throws PolicyConfigException
66          * @deprecated use {@link #getConfigByPolicyName(String policyName, UUID requestID)} Instead.
67          */
68         @Deprecated
69         public Collection<PolicyConfig> getConfigByPolicyName(String policyName, UUID requestID) throws PolicyConfigException {
70                 Collection<PolicyConfig> policyConfig = stdPolicyEngine.policyName(policyName,requestID);
71                 return policyConfig;    
72         }
73         
74         /**
75          * Gets the configuration from the PolicyDecisionPoint(PDP) for the <code>String</code> which represents the eCOMPComponentName 
76          * 
77          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose configuration is required. 
78          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyConfig} which has the configuration.
79          * @throws PolicyConfigException 
80          * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
81          */
82         @Deprecated
83         public Collection<PolicyConfig> getConfig(String eCOMPComponentName) throws PolicyConfigException {
84                 Collection<PolicyConfig> policyConfig = stdPolicyEngine.config(eCOMPComponentName,(UUID)null);
85                 return policyConfig;
86         }
87         
88         /**
89          * Gets the configuration from the PolicyDecisionPoint(PDP) for the <code>String</code> which represents the eCOMPComponentName 
90          * 
91          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose configuration is required. 
92          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyConfig} which has the configuration.
93          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
94          * A different request ID should be passed for each request.
95          * @throws PolicyConfigException 
96          * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
97          */
98         @Deprecated
99         public Collection<PolicyConfig> getConfig(String eCOMPComponentName, UUID requestID) throws PolicyConfigException {
100                 Collection<PolicyConfig> policyConfig = stdPolicyEngine.config(eCOMPComponentName,requestID);
101                 return policyConfig;
102         }
103         
104         /**
105          * Requests the configuration of the <code>String</code> which represents the eCOMPComponentName and <code>String</code>
106          * which represents the configName and returns the configuration if different Configurations exist for the
107          * particular eCOMPComponentName.  
108          * 
109          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose configuration is required.
110          * @param configName the <code>String</code> format of the configurationName whose configuration is required.
111          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyConfig} which has the configuration. 
112          * @throws PolicyConfigException
113          * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
114          */
115         @Deprecated
116         public Collection<PolicyConfig> getConfig(String eCOMPComponentName, String configName) throws PolicyConfigException {
117                 Collection<PolicyConfig> policyConfig = stdPolicyEngine.config(eCOMPComponentName,configName,(UUID)null);
118                 return policyConfig;
119         }
120         
121         /**
122          * Requests the configuration of the <code>String</code> which represents the eCOMPComponentName and <code>String</code>
123          * which represents the configName and returns the configuration if different Configurations exist for the
124          * particular eCOMPComponentName.  
125          * 
126          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose configuration is required.
127          * @param configName the <code>String</code> format of the configurationName whose configuration is required.
128          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
129          * A different request ID should be passed for each request.
130          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyConfig} which has the configuration. 
131          * @throws PolicyConfigException
132          * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
133          */
134         @Deprecated
135         public Collection<PolicyConfig> getConfig(String eCOMPComponentName, String configName, UUID requestID) throws PolicyConfigException {
136                 Collection<PolicyConfig> policyConfig = stdPolicyEngine.config(eCOMPComponentName,configName,requestID);
137                 return policyConfig;
138         }
139         
140         /**
141          * Requests the configuration of the <code>String</code> which represents the eCOMPComponentName, <code>String</code>
142          * which represents the configName and <code>Map</code> of <code>String,String</code> which has the configAttribute and returns the specific 
143          * configuration related to the configAttributes mentioned.
144          * 
145          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose configuration is required.
146          * @param configName the <code>String</code> format of the configurationName whose configuration is required.
147          * @param configAttributes the <code>Map</code> of <code>String,String</code> format of the configuration attributes which are required.
148          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyConfig} which has the configuration.
149          * @throws PolicyConfigException
150          * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
151          */
152         @Deprecated
153         public Collection<PolicyConfig> getConfig(String eCOMPComponentName, String configName, Map<String, String> configAttributes) throws PolicyConfigException{
154                 Collection<PolicyConfig> policyConfig = stdPolicyEngine.config(eCOMPComponentName,configName,configAttributes,(UUID)null);
155                 return policyConfig;
156         }
157         
158         /**
159          * Requests the configuration of the <code>String</code> which represents the eCOMPComponentName, <code>String</code>
160          * which represents the configName and <code>Map</code> of <code>String,String</code> which has the configAttribute and returns the specific 
161          * configuration related to the configAttributes mentioned.
162          * 
163          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose configuration is required.
164          * @param configName the <code>String</code> format of the configurationName whose configuration is required.
165          * @param configAttributes the <code>Map</code> of <code>String,String</code> format of the configuration attributes which are required.
166          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
167          * A different request ID should be passed for each request.
168          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyConfig} which has the configuration.
169          * @throws PolicyConfigException
170          * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
171          */
172         @Deprecated
173         public Collection<PolicyConfig> getConfig(String eCOMPComponentName, String configName, Map<String, String> configAttributes, UUID requestID) throws PolicyConfigException{
174                 Collection<PolicyConfig> policyConfig = stdPolicyEngine.config(eCOMPComponentName,configName,configAttributes,requestID);
175                 return policyConfig;
176         }
177         
178         /**
179          * Requests the configuration of the <code>ConfigRequestParameters</code> which represents the Config policy request parameters 
180          * and returns the specific configuration related to the matching parameters. 
181          * 
182          * @param configRequestParameters {@link org.openecomp.policy.api.ConfigRequestParameters} which represents the Config policy request parameters. 
183          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyConfig} which has the configuration.
184          * @throws PolicyConfigException
185          */
186         public Collection<PolicyConfig> getConfig(ConfigRequestParameters configRequestParameters)  throws PolicyConfigException{
187                 Collection<PolicyConfig> policyConfig = stdPolicyEngine.config(configRequestParameters);
188                 return policyConfig;
189         }
190         
191         /**
192          * Requests the list of policies based on the <code>ConfigRequestParameters</code> which represents the policy request parameters 
193          * and returns the list of policies filtered by the parameters. 
194          * 
195          * @param configRequestParameters {@link org.openecomp.policy.api.ConfigRequestParameters} which represents the List Policy request parameters. 
196          * @return <code>Collection</code> of <code>String</code> which returns the list of policies.
197          * @throws PolicyConfigException
198          */
199         public Collection<String> listConfig(ConfigRequestParameters listPolicyRequestParameters)  throws PolicyConfigException{
200                 Collection<String> policyList = stdPolicyEngine.listConfig(listPolicyRequestParameters);
201                 return policyList;
202         }
203         
204         
205         /**
206          * Sends the Events specified to the PEP and returns back the PolicyResponse. 
207          * 
208          * @param eventAttributes the <code>Map</code> of <code>String,String</code> format of the eventAttributes that must contain the event ID and values.
209          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyResponse} which has the Response. 
210          * @throws PolicyEventException
211          * @deprecated use {@link #sendEvent(EventRequestParameters)} Instead.
212          */
213         @Deprecated
214         public Collection<PolicyResponse> sendEvent(Map<String, String> eventAttributes) throws PolicyEventException {
215                 Collection<PolicyResponse> policyResponse = stdPolicyEngine.event(eventAttributes, (UUID) null);
216                 return policyResponse;
217         }
218         
219         /**
220          * Sends the Events specified to the PEP and returns back the PolicyResponse. 
221          * 
222          * @param eventAttributes the <code>Map</code> of <code>String,String</code> format of the eventAttributes that must contain the event ID and values.
223          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
224          * A different request ID should be passed for each request.
225          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyResponse} which has the Response. 
226          * @throws PolicyEventException
227          * @deprecated use {@link #sendEvent(EventRequestParameters)} Instead.
228          */
229         @Deprecated
230         public Collection<PolicyResponse> sendEvent(Map<String, String> eventAttributes, UUID requestID) throws PolicyEventException {
231                 Collection<PolicyResponse> policyResponse = stdPolicyEngine.event(eventAttributes, requestID);
232                 return policyResponse;
233         }
234         
235         /**
236          * Sends the Events specified to the PEP and returns back the PolicyResponse.
237          * 
238          * @param eventRequestParameters {@link org.openecomp.policy.api.EventRequestParameters} which represents the Event Request Parameters. 
239          * @return <code>Collection</code> of {@link org.openecomp.policy.api.PolicyResponse} which has the Response.
240          * @throws PolicyEventException
241          */
242         public Collection<PolicyResponse> sendEvent(EventRequestParameters eventRequestParameters) throws PolicyEventException {
243                 Collection<PolicyResponse> policyResponse = stdPolicyEngine.event(eventRequestParameters);
244                 return policyResponse;
245         }
246         
247         /**
248          * Sends the decision Attributes specified to the PEP and returns back the PolicyDecision. 
249          * 
250          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose Decision is required.
251          * @param decisionAttributes the <code>Map</code> of <code>String,String</code> format of the decisionAttributes that must contain the ID and values.
252          * @return {@link org.openecomp.policy.api.DecisionResponse} which has the Decision. 
253          * @throws PolicyDecisionException
254          * @deprecated use {@link #getDecision(DecisionRequestParameters)} Instead.
255          */
256         @Deprecated
257         public DecisionResponse getDecision(String eCOMPComponentName, Map<String,String> decisionAttributes) throws PolicyDecisionException {
258                 DecisionResponse policyDecision = stdPolicyEngine.decide(eCOMPComponentName, decisionAttributes, null);
259                 return policyDecision;
260         }
261         
262         /**
263          * Sends the decision Attributes specified to the PEP and returns back the PolicyDecision. 
264          * 
265          * @param eCOMPComponentName the <code>String</code> format of the eCOMPComponentName whose Decision is required.
266          * @param decisionAttributes the <code>Map</code> of <code>String,String</code> format of the decisionAttributes that must contain the ID and values.
267          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
268          * A different request ID should be passed for each request.
269          * @return {@link org.openecomp.policy.api.DecisionResponse} which has the Decision. 
270          * @throws PolicyDecisionException
271          * @deprecated use {@link #getDecision(DecisionRequestParameters)} Instead.
272          */
273         @Deprecated
274         public DecisionResponse getDecision(String eCOMPComponentName, Map<String,String> decisionAttributes, UUID requestID) throws PolicyDecisionException {
275                 DecisionResponse policyDecision = stdPolicyEngine.decide(eCOMPComponentName, decisionAttributes, requestID);
276                 return policyDecision;
277         }
278         
279         /**
280          * Sends the decision Attributes specified to the PEP and returns back the PolicyDecision. 
281          * 
282          * @param decisionRequestParameters {@link org.openecomp.policy.api.DecisionRequestParameters} which represents the Decision Request Parameters.
283          * @return {@link org.openecomp.policy.api.DecisionResponse} which has the Decision.
284          * @throws PolicyDecisionException
285          */
286         public DecisionResponse getDecision(DecisionRequestParameters decisionRequestParameters) throws PolicyDecisionException {
287                 DecisionResponse policyDecision = stdPolicyEngine.decide(decisionRequestParameters);
288                 return policyDecision;
289         }
290         
291         /**
292          * <code>setNotification</code> allows changes to the Notification Scheme and Notification Handler
293          * 
294          * @param scheme the <code>NotificationScheme</code> of {@link org.openecomp.policy.api.NotificationScheme} which defines the Notification Scheme
295          * @param handler the <code>NotificationHandler</code> of {@link org.openecomp.policy.api.NotificationHandler} which defines what should happen when a notification is received.
296          */
297         public void setNotification(NotificationScheme scheme, NotificationHandler handler) {
298                 this.scheme = scheme;
299                 this.handler = handler;
300                 stdPolicyEngine.notification(this.scheme,this.handler);
301         }
302         
303         /**
304          * <code>clearNotification</code> shutsDown the Notification Service if the Auto Scehme Notification service is running.
305          */
306         public void clearNotification(){
307                 stdPolicyEngine.stopNotification();
308         }
309         
310         /**
311          * <code>setNotification</code> allows changes to the Notification Scheme
312          * 
313          * @param scheme the <code>NotificationScheme</code> of {@link org.openecomp.policy.api.NotificationScheme} which defines the Notification Scheme
314          */
315         public void setScheme(NotificationScheme scheme){
316                 this.scheme = scheme;
317                 stdPolicyEngine.setScheme(this.scheme);
318         }
319         /**
320          * Gets the <code>PDPNotification</code> if there is one exists. This is used for Polling Patterns. 
321          * 
322          * @return <code>PDPNotification</code> of {@link org.openecomp.policy.api.PDPNotification} which has the Notification. 
323          */
324         public PDPNotification getNotification() {
325                 return stdPolicyEngine.getNotification();
326         }
327         
328         /**
329          * Creates a Config Policy based on given arguments
330          * @param policyName the <code>String</code> format of the Policy Name
331          * @param policyDescription the <code>String</code> format of the Policy Description
332          * @param ecompName the <code>String</code> format of the ECOMP Name
333          * @param configName the <code>String</code> format of the Config Name
334          * @param configAttributes the <code>List</code> the <code>Map</code> Attributes that must contain the key and value.
335          * @param configType the <code>String</code> format of the Config Type
336          * @param body the <code>String</code> format of the Policy Body
337          * @param policyScope the <code>String</code> value of the sub scope directory where the policy will be created and stored
338          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
339          * A different request ID should be passed for each request.
340          * @throws Exception 
341          * @return <code>String</code> format of response
342          * @deprecated use {@link #createPolicy(PolicyParameters)} Instead.
343          */
344         @Deprecated
345         public String createConfigPolicy(String policyName, String policyDescription, String ecompName, String configName, 
346                                                                                                 Map<String, String> configAttributes, String configType, String body, String policyScope, UUID requestID,
347                                                                                                 String riskLevel, String riskType, String guard, String ttlDate) throws Exception {
348                 
349                 String response = stdPolicyEngine.createConfigPolicy(policyName, policyDescription, ecompName, configName, 
350                                                                                                                                 configAttributes, configType, body, policyScope, requestID,
351                                                                                                                                 riskLevel, riskType, guard, ttlDate);
352                 
353                 return response;
354                 
355         }
356         
357         /**
358          * Creates a Config Policy based on given arguments
359          * @param policyName the <code>String</code> format of the Policy Name
360          * @param policyDescription the <code>String</code> format of the Policy Description
361          * @param ecompName the <code>String</code> format of the ECOMP Name
362          * @param configName the <code>String</code> format of the Config Name
363          * @param configAttributes the <code>List</code> the <code>Map</code> Attributes that must contain the key and value.
364          * @param configType the <code>String</code> format of the Config Type
365          * @param body the <code>String</code> format of the Policy Body
366          * @param policyScope the <code>String</code> value of the sub scope directory where the policy will be created and stored
367          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
368          * A different request ID should be passed for each request.
369          * @throws Exception 
370          * @return <code>String</code> format of response
371          * @deprecated use {@link #updatePolicy(PolicyParameters)} Instead.
372          */
373         @Deprecated
374         public String updateConfigPolicy(String policyName, String policyDescription, String ecompName, String configName, 
375                                                                                                 Map<String, String> configAttributes, String configType, String body, String policyScope, UUID requestID,
376                                                                                                 String riskLevel, String riskType, String guard, String ttlDate) throws Exception {
377                 
378                 String response = stdPolicyEngine.updateConfigPolicy(policyName, policyDescription, ecompName, configName, 
379                                                                                                                                 configAttributes, configType, body, policyScope, requestID,riskLevel, riskType, guard, ttlDate);
380                 
381                 return response;
382                 
383         }
384         
385         /**
386          * Creates a Config Firewall Policy based on given arguments
387          * @param policyName the <code>String</code> format of the Policy Name
388          * @param firewallJson the <code>JsonObject</code> representation of the Firewall Rules List
389          * @param policyScope the <code>String</code> value of the sub scope directory where the policy will be created and stored
390          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
391          * A different request ID should be passed for each request.
392          * @throws Exception 
393          * @return <code>String</code> format of response.
394          * @deprecated use {@link #createPolicy(PolicyParameters)} Instead.
395          */
396         @Deprecated
397         public String createConfigFirewallPolicy(String policyName, JsonObject firewallJson, String policyScope, UUID requestID,
398                         String riskLevel, String riskType, String guard, String ttlDate) throws Exception {
399                 
400                 String response = stdPolicyEngine.createConfigFirewallPolicy(policyName, firewallJson, policyScope, requestID,riskLevel, 
401                                 riskType, guard, ttlDate);
402                 
403                 return response;
404                 
405         }
406         
407         /**
408          * Updates a Config Firewall Policy based on given arguments
409          * @param policyName the <code>String</code> format of the Policy Name
410          * @param firewallJson the <code>JsonObject</code> representation of the Firewall Rules List
411          * @param policyScope the <code>String</code> value of the sub scope directory where the policy will be created and stored
412          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
413          * A different request ID should be passed for each request.
414          * @throws Exception 
415          * @return <code>String</code> format of response. 
416          * @deprecated use {@link #updatePolicy(PolicyParameters)} Instead.
417          */
418         @Deprecated
419         public String updateConfigFirewallPolicy(String policyName, JsonObject firewallJson, String policyScope, UUID requestID,
420                         String riskLevel, String riskType, String guard, String ttlDate) throws Exception {
421                 
422                 String response = stdPolicyEngine.updateConfigFirewallPolicy(policyName, firewallJson, policyScope, requestID,riskLevel, riskType, guard, ttlDate);
423                 
424                 return response;
425                 
426         }
427         
428         /**
429          * Creates a Dictionary Item based on given Dictionary Parameters
430          * 
431          * @param policyParameters {@link org.openecomp.policy.api.DictionaryParameters} which represents the Dictionary Parameters required to create a Dictionary Item. 
432          * @return {@link org.openecomp.policy.api.PolicyChangeResponse} which consists of the response related to create dictionary item Request. 
433          * @throws Exception
434          */
435         public PolicyChangeResponse createDictionaryItem(DictionaryParameters parameters) throws Exception {
436                 PolicyChangeResponse response = stdPolicyEngine.createDictionaryItem(parameters);
437                 return response;
438         }
439         
440         /**
441          * Creates a Policy based on given Policy Parameters. 
442          * 
443          * @param policyParameters {@link org.openecomp.policy.api.PolicyParameters} which represents the Policy Parameters required to create a Policy. 
444          * @return {@link org.openecomp.policy.api.PolicyChangeResponse} which consists of the response related to create policy Request. 
445          * @throws Exception
446          */
447         public PolicyChangeResponse createPolicy(PolicyParameters policyParameters) throws Exception {
448                 PolicyChangeResponse response = stdPolicyEngine.createPolicy(policyParameters);
449                 return response;
450         }
451         
452         /**
453          * Update Policy based on given Policy Parameters. 
454          * 
455          * @param policyParameters {@link org.openecomp.policy.api.PolicyParameters} which represents the Policy Parameters required to update a Policy. 
456          * @return {@link org.openecomp.policy.api.PolicyChangeResponse} which consists of the response related to create policy Request. 
457          * @throws Exception
458          */
459         public PolicyChangeResponse updatePolicy(PolicyParameters policyParameters) throws Exception {
460                 PolicyChangeResponse response = stdPolicyEngine.updatePolicy(policyParameters);
461                 return response;
462         }
463         
464         /**
465          * Pushes the specified policy to the PDP Group. If no PDP group is selected default is used. 
466          * 
467          * @param policyScope the <code>String</code> value of the sub scope directory where the policy is located
468          * @param policyName the <code>String</code> format of the Policy Name being pushed. 
469          * @param policyType the <code>String</code> format of the Policy Type which is being pushed.  
470          * @param pdpGroup the <code>String</code> format of the PDP Group name to which the policy needs to be pushed to. 
471          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
472          * @return <code>String</code> format of the response related to the push Policy Request. 
473          * @throws Exception
474          * @deprecated use {@link #pushPolicy(PushPolicyParameters)} instead. 
475          */
476         @Deprecated
477         public String pushPolicy(String policyScope, String policyName, String policyType, String pdpGroup, UUID requestID) throws Exception {
478                 
479                 String response = stdPolicyEngine.pushPolicy(policyScope, policyName, policyType, pdpGroup, requestID);
480                 
481                 return response;
482         }
483         
484         /**
485          * Pushes the specified policy to the PDP Group. If no PDP group is selected default is used. 
486          * 
487          * @param pushPolicyParameters {@link org.openecomp.policy.api.PushPolicyParameters} which represents the Push Policy parameters required to push a policy. 
488          * @return {@link org.openecomp.policy.api.PolicyChangeResponse} which consists of the response related to the push Policy Request. 
489          * @throws Exception
490          */
491         public PolicyChangeResponse pushPolicy(PushPolicyParameters pushPolicyParameters) throws Exception {
492                 PolicyChangeResponse response = stdPolicyEngine.pushPolicy(pushPolicyParameters);
493                 return response;
494         }
495         
496         /**
497          * Deletes the specified policy from the PAP or PDP.
498          * 
499          * @param deletePolicyParameters {@link org.openecomp.policy.api.DeletePolicyParameters} which represents the Delete Policy parameters to delete a policy.
500          * @return {@link org.openecomp.policy.api.PolicyChangeResponse} which consists of the response related to the Delete Policy Request.
501          * @throws Exception
502          */
503         public PolicyChangeResponse deletePolicy(DeletePolicyParameters deletePolicyParameters) throws Exception {
504                 PolicyChangeResponse response = stdPolicyEngine.deletePolicy(deletePolicyParameters);
505                 return response;
506         }
507         
508         /**
509          * PolicyEngine Constructor with <code>String</code> format of propertiesFilePathname
510          * 
511          * @param propertiesFilePathname the <code>String</code> format of the propertiesFilePathname 
512          * @throws PolicyEngineException 
513          */
514         public PolicyEngine(String propertiesFilePathname) throws PolicyEngineException {
515                 this.propertyFilePath = propertiesFilePathname ; 
516                 this.stdPolicyEngine= new StdPolicyEngine(this.propertyFilePath);
517         }
518         
519         /**
520          * PolicyEngine Constructor with <code>String</code> format of PropertiesFilePathname, <code>NotificationScheme</code> and <code>NotificationHandler</code>
521          *  
522          *  @param propertiesFilePathname the <code>String</code> format of the propertiesFilePathname 
523          *  @param scheme the <code>NotificationScheme</code> of {@link org.openecomp.policy.api.NotificationScheme} which defines the Notification Scheme
524          *  @param handler the <code>NotificationHandler</code> of {@link org.openecomp.policy.api.NotificationHandler} which defines what should happen when a notification is received.
525          *  @throws PolicyEngineException 
526          */
527         public PolicyEngine(String propertiesFilePathname, NotificationScheme scheme, NotificationHandler handler) throws PolicyEngineException {
528                 this.propertyFilePath = propertiesFilePathname ;
529                 this.scheme = scheme;
530                 this.handler = handler;
531                 this.stdPolicyEngine= new StdPolicyEngine(this.propertyFilePath,this.scheme,this.handler);
532         }
533         
534         /**
535          * Creates a new Policy Service based on given Service Parameters. 
536          * 
537          * @param importParameters {@link org.openecomp.policy.api.ImportParameters} which represents the Service Parameters required to create a Policy Service. 
538          * @return {@link org.openecomp.policy.api.PolicyChangeResponse} which consists of the response related to create import Service. 
539          * @throws Exception
540          */
541         public PolicyChangeResponse policyEngineImport(ImportParameters importParameters) throws Exception {
542                 PolicyChangeResponse response = stdPolicyEngine.policyEngineImport(importParameters);
543                 return response;
544         }
545         
546         /**
547          * PolicyEngine Constructor with <code>String</code> format of PropertiesFilePathname and <code>NotificationScheme</code>
548          * 
549          * @param propertiesFilePathname the <code>String</code> format of the propertiesFilePathname
550          * @param scheme the <code>NotificationScheme</code> of {@link org.openecomp.policy.api.NotificationScheme} which defines the Notification Scheme
551          * @throws PolicyEngineException 
552          */
553         public PolicyEngine(String propertiesFilePathname, NotificationScheme scheme) throws PolicyEngineException{
554                 this.propertyFilePath = propertiesFilePathname;
555                 this.scheme = scheme;
556                 this.stdPolicyEngine = new StdPolicyEngine(this.propertyFilePath, this.scheme);
557         }
558         /**
559          * PolicyEngine Constructor with no parameters.
560          *//*
561         public PolicyEngine(){
562                 
563         }
564         public void createFirewallPolicy(String filterName, String termName, String preIPSource, String preIPDest, 
565                                                                                 String sourcePort, String destPort, String Port, String protocol, String direction, String action ) throws PolicyDecisionException {
566                 stdPolicyEngine.createFirewallPolicy(filterName, termName, preIPSource, preIPDest, sourcePort, destPort, Port,
567                                                                                                 protocol, direction, action);
568         }
569         
570         public void updateFirewallPolicy(String filterName, String termName, String preIPSource, String preIPDest, 
571                                                                                 String sourcePort, String destPort, String Port, String protocol, String direction, String action ) throws PolicyDecisionException {
572                         stdPolicyEngine.updateFirewallPolicy(filterName, termName, preIPSource, preIPDest, sourcePort, destPort, Port,
573                                                                                                         protocol, direction, action);
574         }*/
575 }