2 * ============LICENSE_START=======================================================
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
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=========================================================
20 package org.onap.policy.xacml.api.pap;
22 import java.io.InputStream;
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;
29 public interface PAPPolicyEngine{
31 public OnapPDPGroup getDefaultGroup() throws PAPException;
33 public void setDefaultGroup(OnapPDPGroup group) throws PAPException;
35 public void newPDP(String id, OnapPDPGroup group, String name, String description, int jmxport) throws PAPException;
37 public void newGroup(String name, String description) throws PAPException;
39 public OnapPDPGroup getGroup(String id) throws PAPException;
41 public Set<OnapPDPGroup> getOnapPDPGroups() throws PAPException;
43 public OnapPDPGroup getPDPGroup(OnapPDP pdp) throws PAPException;
45 public PDPStatus getStatus(OnapPDP pdp) throws PAPException;
47 public void movePDP(OnapPDP pdp, OnapPDPGroup newGroup) throws PAPException;
49 public void updatePDP(OnapPDP pdp) throws PAPException;
51 public void removePDP(OnapPDP pdp) throws PAPException;
53 public OnapPDP getPDP(String pdpId) throws PAPException;
55 public void updateGroup(OnapPDPGroup group) throws PAPException;
57 public void removeGroup(OnapPDPGroup group, OnapPDPGroup newGroup) throws PAPException;
59 public void publishPolicy(String id, String name, boolean isRoot, InputStream policy, OnapPDPGroup group) throws PAPException;
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;
64 public void removePolicy(PDPPolicy policy, OnapPDPGroup group) throws PAPException;