X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontroller%2FAutoPushController.java;h=e0388e5d6afd44a6459266b355744e599d42e6c4;hp=9ade81d1777b0c95cd91d0dd18cad10e24fbaa68;hb=1148834bc4b10d00c1b1830b087357e63af8293f;hpb=066fc4529f36d210a4a4700e8dbfd2cb42f4dc66 diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java index 9ade81d17..e0388e5d6 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java @@ -52,6 +52,7 @@ import org.onap.policy.rest.adapter.AutoPushTabAdapter; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.PolicyEntity; import org.onap.policy.rest.jpa.PolicyVersion; +import org.onap.policy.utils.PolicyUtils; import org.onap.policy.xacml.api.XACMLErrorConstants; import org.onap.policy.xacml.api.pap.OnapPDPGroup; import org.onap.policy.xacml.std.pap.StdPDPGroup; @@ -288,6 +289,7 @@ public class AutoPushController extends RestrictedBaseController{ updatedGroupObject.setOnapPdps(pdpGroup.getOnapPdps()); updatedGroupObject.setPipConfigs(pdpGroup.getPipConfigs()); updatedGroupObject.setStatus(pdpGroup.getStatus()); + updatedGroupObject.setOperation("push"); // replace the original set of Policies with the set from the // container (possibly modified by the user) @@ -334,7 +336,7 @@ public class AutoPushController extends RestrictedBaseController{ request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); logger.error(e); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION);; } return null; } @@ -369,6 +371,7 @@ public class AutoPushController extends RestrictedBaseController{ updatedGroupObject.setOnapPdps(group.getOnapPdps()); updatedGroupObject.setPipConfigs(group.getPipConfigs()); updatedGroupObject.setStatus(group.getStatus()); + updatedGroupObject.setOperation("delete"); this.container.updateGroup(updatedGroupObject); } @@ -390,7 +393,7 @@ public class AutoPushController extends RestrictedBaseController{ request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); logger.error(e); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION);; } return null; }