Added Junits for Policy PAP-REST
[policy/engine.git] / ONAP-PAP-REST / src / main / java / org / onap / policy / pap / xacml / rest / components / PolicyDBDaoTransaction.java
index dfe5c70..8bfcab9 100644 (file)
@@ -29,6 +29,7 @@ import org.onap.policy.rest.jpa.GroupEntity;
 import org.onap.policy.rest.jpa.PdpEntity;
 import org.onap.policy.xacml.api.pap.OnapPDP;
 import org.onap.policy.xacml.api.pap.OnapPDPGroup;
+import org.onap.policy.xacml.std.pap.StdPDPGroup;
 
 import com.att.research.xacml.api.pap.PAPException;
 
@@ -57,17 +58,6 @@ public interface PolicyDBDaoTransaction {
         */
        public boolean isTransactionOpen();
        
-       
-       
-       /**
-        * Delete an existing policy
-        * @param policyToDelete The file path of the policy to delete
-        * @throws IllegalArgumentException If the file path given can not be parsed
-        * @throws IllegalStateException If a transaction is open that has not yet been committed
-        * @throws PolicyDBException If a database error occurs
-        */
-       public void deletePolicy(String policyToDelete) throws PolicyDBException;
-       
        /**
         * Rollback (undo) the current transaction.
         */
@@ -150,12 +140,13 @@ public interface PolicyDBDaoTransaction {
         * Add an existing policy to an existing group
         * @param group The ID of the existing group to add the policy to
         * @param policyID The ID of an existing policy
+        * @return 
         * @throws IllegalArgumentException If non-optional parameters are null or empty strings
         * @throws IllegalStateException If a transaction is already open
         * @throws PersistenceException If a database error occurs
         * @throws PolicyDBException 
         */
-       public void addPolicyToGroup(String group, String policyID, String username) throws PolicyDBException;
+       public StdPDPGroup addPolicyToGroup(String group, String policyID, String username) throws PolicyDBException;
        
        
        /**
@@ -182,9 +173,4 @@ public interface PolicyDBDaoTransaction {
        public GroupEntity getGroup(String groupId);
        public List<?> getPdpsInGroup(long groupKey);
        public PdpEntity getPdp(long pdpKey);
-
-       void renamePolicy(String oldPath, String newPath,String username);
-
-       void clonePolicy(String oldPolicyPath, String newPolicyPath, String username);
-               
 }