X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ECOMP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcontroller%2FPushPolicyController.java;h=3f86378abbf1fa001d69484c132486755c71b8d6;hb=fc5c07705edc4dcb7083b39116a43844bb6a1490;hp=046bb3cfbceef2692c534e43f51ba52fe040ccd0;hpb=a330af579866dacbe595e2e4ad1dd29cd3c96945;p=policy%2Fengine.git diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/PushPolicyController.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/PushPolicyController.java index 046bb3cfb..3f86378ab 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/PushPolicyController.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/PushPolicyController.java @@ -109,30 +109,6 @@ public class PushPolicyController { } } - /*private void safetyChecker(String policyName) { - if (XACMLProperties.getProperty("xacml.rest.pap.safetychecker").equals("on")) { - if (policyName.contains("Config_MS_") || policyName.contains("BRMS_Param")) { - SafetyCheckerService service = new SafetyCheckerService(); - PolicySafetyChecker safetyChecker = new PolicySafetyChecker(); - boolean isEntered = false; - try { - JSONObject policyDataObj = service.getConfigByPolicyName(policyName, XACMLPapServlet.getConfigHome()); - isEntered = safetyChecker.addItem(policyDataObj); - } catch (Exception e) { - PolicyLogger.warn(MessageCodes.ERROR_PROCESS_FLOW, "XACMLPapServlet", e, "Error while adding ClosedLoop in the database: " - + "This is a PolicySafetyChecker warning, the push execution may proceed normally."); - } - if (isEntered) { - LOGGER.info("SafetyChecker successfully added the closedLoop to the DB table."); - } else { - LOGGER.info("SafetyChecker failed to add the closedLoop to the DB table."); - } - } - } else { - LOGGER.info("PolicySafetyChecker is turned off."); - } - }*/ - private void addPolicyToGroup(String policyScope, String policyID, String policyName, String pdpGroup, HttpServletResponse response) { StdPDPGroup selectedPDPGroup = null; StdPDPPolicy selectedPolicy = null; @@ -241,7 +217,7 @@ public class PushPolicyController { XACMLPapServlet.getPAPEngine().updateGroup(selectedPDPGroup); } catch (PAPException e) { // TODO Auto-generated catch block - e.printStackTrace(); + logger.error("Exception Occured"+e); } // policy file copied ok and the Group was updated on the PDP response.setStatus(HttpServletResponse.SC_NO_CONTENT);