2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.policy.xacml.api.pap;
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;
27 import java.io.InputStream;
30 public interface PAPPolicyEngine {
32 public OnapPDPGroup getDefaultGroup() throws PAPException;
34 public void setDefaultGroup(OnapPDPGroup group) throws PAPException;
36 public void newPDP(String id, OnapPDPGroup group, String name, String description, int jmxport) throws PAPException;
38 public void newGroup(String name, String description) throws PAPException;
40 public OnapPDPGroup getGroup(String id) throws PAPException;
42 public Set<OnapPDPGroup> getOnapPDPGroups() throws PAPException;
44 public OnapPDPGroup getPDPGroup(OnapPDP pdp) throws PAPException;
46 public PDPStatus getStatus(OnapPDP pdp) throws PAPException;
48 public void movePDP(OnapPDP pdp, OnapPDPGroup newGroup) throws PAPException;
50 public void updatePDP(OnapPDP pdp) throws PAPException;
52 public void removePDP(OnapPDP pdp) throws PAPException;
54 public OnapPDP getPDP(String pdpId) throws PAPException;
56 public void updateGroup(OnapPDPGroup group) throws PAPException;
58 public void removeGroup(OnapPDPGroup group, OnapPDPGroup newGroup) throws PAPException;
60 public void publishPolicy(String id, String name, boolean isRoot, InputStream policy, OnapPDPGroup group)
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) throws PAPException;
66 public void removePolicy(PDPPolicy policy, OnapPDPGroup group) throws PAPException;
68 public void updateGroup(OnapPDPGroup group, String userName) throws PAPException;