sonar blocker/critical fixes
[policy/engine.git] / ONAP-XACML / src / main / java / org / onap / policy / xacml / api / pap / PAPPolicyEngine.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-XACML
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 package org.onap.policy.xacml.api.pap;
21
22 import java.io.InputStream;
23 import java.util.Set;
24
25 import com.att.research.xacml.api.pap.PAPException;
26 import com.att.research.xacml.api.pap.PDPPolicy;
27 import com.att.research.xacml.api.pap.PDPStatus;
28
29 public interface PAPPolicyEngine{
30         
31         public OnapPDPGroup getDefaultGroup() throws PAPException;
32         
33         public void                                             setDefaultGroup(OnapPDPGroup group) throws PAPException;
34         
35         public void             newPDP(String id, OnapPDPGroup group, String name, String description, int jmxport) throws PAPException;
36         
37         public void                                             newGroup(String name, String description) throws PAPException;
38         
39         public OnapPDPGroup getGroup(String id) throws PAPException;
40         
41         public Set<OnapPDPGroup> getOnapPDPGroups() throws PAPException;
42         
43         public OnapPDPGroup getPDPGroup(OnapPDP pdp) throws PAPException;
44         
45         public PDPStatus getStatus(OnapPDP pdp) throws PAPException;
46         
47         public void movePDP(OnapPDP pdp, OnapPDPGroup newGroup) throws PAPException;
48         
49         public void updatePDP(OnapPDP pdp) throws PAPException;
50         
51         public void removePDP(OnapPDP pdp) throws PAPException; 
52         
53         public OnapPDP getPDP(String pdpId) throws PAPException;
54         
55         public void                                             updateGroup(OnapPDPGroup group) throws PAPException;
56         
57         public void                                             removeGroup(OnapPDPGroup group, OnapPDPGroup newGroup) throws PAPException;
58         
59 public void                                             publishPolicy(String id, String name, boolean isRoot, InputStream policy, OnapPDPGroup group) throws PAPException;
60         
61         // copy the given policy file into the group's directory, but do not include the policy in the group's policy set
62         public void                                             copyPolicy(PDPPolicy policy, OnapPDPGroup group) throws PAPException;
63         
64         public void                                             removePolicy(PDPPolicy policy, OnapPDPGroup group) throws PAPException;
65         
66 }