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