cae7456bc139b19614133176a5363a3e40fcf2a6
[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 import java.io.InputStream;
27 import java.util.Set;
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)
60             throws PAPException;
61
62     // copy the given policy file into the group's directory, but do not include the policy in the group's policy set
63     public void copyPolicy(PDPPolicy policy, OnapPDPGroup group) throws PAPException;
64
65     public void removePolicy(PDPPolicy policy, OnapPDPGroup group) throws PAPException;
66
67     public void updateGroup(OnapPDPGroup group, String userName) throws PAPException;
68
69 }