From 7e547eaa55920dfbc9691eab33bb728395b50cf2 Mon Sep 17 00:00:00 2001 From: Ravindra Bakkamanthala Date: Mon, 15 May 2017 12:53:18 -0400 Subject: Policy TestSuite Enabled Change-Id: I9f98c7dcdcf98713d73544956d873a84fc82adf7 Signed-off-by: Ravindra Bakkamanthala --- .../pap/xacml/rest/controller/BRMSDictionaryController.java | 4 ---- .../xacml/rest/controller/EnforcerDictionaryController.java | 6 +++++- .../xacml/rest/controller/FirewallDictionaryController.java | 6 +----- .../xacml/rest/controller/PolicyScopeDictionaryController.java | 10 +++++----- .../policy/pap/xacml/rest/controller/PushPolicyController.java | 2 +- .../policy/pap/xacml/rest/controller/SafePolicyController.java | 4 ++-- 6 files changed, 14 insertions(+), 18 deletions(-) (limited to 'ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller') diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/BRMSDictionaryController.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/BRMSDictionaryController.java index 09c995dbe..31f2e73db 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/BRMSDictionaryController.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/BRMSDictionaryController.java @@ -242,7 +242,6 @@ public class BRMSDictionaryController{ } catch (Exception e){ LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e); - e.printStackTrace(); } } @@ -262,7 +261,6 @@ public class BRMSDictionaryController{ LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e); response.setStatus(HttpServletResponse.SC_BAD_REQUEST); response.addHeader("error", "dictionaryDBQuery"); - e.printStackTrace(); } } @@ -402,7 +400,6 @@ public class BRMSDictionaryController{ } catch (Exception e){ LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e); - e.printStackTrace(); } } @@ -422,7 +419,6 @@ public class BRMSDictionaryController{ LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e); response.setStatus(HttpServletResponse.SC_BAD_REQUEST); response.addHeader("error", "dictionaryDBQuery"); - e.printStackTrace(); } } diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/EnforcerDictionaryController.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/EnforcerDictionaryController.java index 7bf0a03e0..b04020270 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/EnforcerDictionaryController.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/EnforcerDictionaryController.java @@ -30,6 +30,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; +import org.openecomp.policy.common.logging.flexlogger.FlexLogger; +import org.openecomp.policy.common.logging.flexlogger.Logger; import org.openecomp.policy.pap.xacml.rest.util.JsonMessage; import org.openecomp.policy.rest.dao.CommonClassDao; import org.openecomp.policy.rest.jpa.EnforcingType; @@ -46,6 +48,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; @Controller public class EnforcerDictionaryController { + private static final Logger LOGGER = FlexLogger.getLogger(EnforcerDictionaryController.class); + @Autowired CommonClassDao commonClassDao; @@ -66,7 +70,7 @@ public class EnforcerDictionaryController { response.getWriter().write(j.toString()); } catch (Exception e){ - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/FirewallDictionaryController.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/FirewallDictionaryController.java index 2c0d3de7f..a553d61db 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/FirewallDictionaryController.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/FirewallDictionaryController.java @@ -1333,7 +1333,7 @@ public class FirewallDictionaryController { response.getWriter().write(j.toString()); } catch (Exception e){ - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } @@ -1885,7 +1885,6 @@ public class FirewallDictionaryController { } catch (Exception e){ LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e); - e.printStackTrace(); } } @@ -1901,7 +1900,6 @@ public class FirewallDictionaryController { } catch (Exception e){ LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e); - e.printStackTrace(); } } @@ -2050,7 +2048,6 @@ public class FirewallDictionaryController { } catch (Exception e){ LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e); - e.printStackTrace(); } } @@ -2066,7 +2063,6 @@ public class FirewallDictionaryController { } catch (Exception e){ LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e); - e.printStackTrace(); } } diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/PolicyScopeDictionaryController.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/PolicyScopeDictionaryController.java index ab86ce2a8..bfab03fa5 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/PolicyScopeDictionaryController.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/PolicyScopeDictionaryController.java @@ -83,7 +83,7 @@ public class PolicyScopeDictionaryController { response.getWriter().write(j.toString()); } catch (Exception e){ - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } @@ -296,7 +296,7 @@ public class PolicyScopeDictionaryController { response.getWriter().write(j.toString()); } catch (Exception e){ - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } @@ -448,7 +448,7 @@ public class PolicyScopeDictionaryController { response.getWriter().write(j.toString()); } catch (Exception e){ - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } @@ -597,7 +597,7 @@ public class PolicyScopeDictionaryController { response.getWriter().write(j.toString()); } catch (Exception e){ - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } @@ -752,7 +752,7 @@ public class PolicyScopeDictionaryController { response.getWriter().write(j.toString()); } catch (Exception e){ - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } 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..f468b374d 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 @@ -241,7 +241,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); diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/SafePolicyController.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/SafePolicyController.java index 1f84ae09a..6f8f3db8b 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/SafePolicyController.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/SafePolicyController.java @@ -78,7 +78,7 @@ public class SafePolicyController { JSONObject j = new JSONObject(msg); response.getWriter().write(j.toString()); } catch (Exception e) { - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } @@ -237,7 +237,7 @@ public class SafePolicyController { JSONObject j = new JSONObject(msg); response.getWriter().write(j.toString()); } catch (Exception e) { - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } -- cgit 1.2.3-korg