Commit includes ControlLoopPolicy API and bugfixes
[policy/engine.git] / ECOMP-PAP-REST / src / main / java / org / openecomp / policy / pap / xacml / rest / controller / BRMSDictionaryController.java
index 09c995d..eb03aa9 100644 (file)
@@ -79,7 +79,7 @@ public class BRMSDictionaryController{
        @RequestMapping(value={"/get_BRMSParamDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
        public void getBRMSParamDictionaryByNameEntityData(HttpServletRequest request, HttpServletResponse response){
                try{
-                       Map<String, Object> model = new HashMap<String, Object>();
+                       Map<String, Object> model = new HashMap<>();
                        ObjectMapper mapper = new ObjectMapper();
                        model.put("brmsParamDictionaryDatas", mapper.writeValueAsString(commonClassDao.getDataByColumn(BRMSParamTemplate.class, "ruleName")));
                        JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
@@ -94,7 +94,7 @@ public class BRMSDictionaryController{
        @RequestMapping(value={"/get_BRMSParamData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
        public void getBRMSParamDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
                try{
-                       Map<String, Object> model = new HashMap<String, Object>();
+                       Map<String, Object> model = new HashMap<>();
                        ObjectMapper mapper = new ObjectMapper();
                        model.put("brmsParamDictionaryDatas", mapper.writeValueAsString(commonClassDao.getData(BRMSParamTemplate.class)));
                        JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
@@ -233,7 +233,7 @@ public class BRMSDictionaryController{
     @RequestMapping(value={"/get_BRMSDependencyDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
     public void getBRMSDependencyDictionaryByNameEntityData(HttpServletRequest request, HttpServletResponse response){
         try{
-            Map<String, Object> model = new HashMap<String, Object>();
+            Map<String, Object> model = new HashMap<>();
             ObjectMapper mapper = new ObjectMapper();
             model.put("brmsDependencyDictionaryDatas", mapper.writeValueAsString(commonClassDao.getDataByColumn(BRMSDependency.class, "dependencyName")));
             JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
@@ -242,14 +242,13 @@ public class BRMSDictionaryController{
         }
         catch (Exception e){
             LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e);
-            e.printStackTrace();
         }
     }
     
     @RequestMapping(value={"/get_BRMSDependencyData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
     public void getBRMSDependencyDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
         try{
-            Map<String, Object> model = new HashMap<String, Object>();
+            Map<String, Object> model = new HashMap<>();
             ObjectMapper mapper = new ObjectMapper();
             model.put("brmsDependencyDictionaryDatas", mapper.writeValueAsString(commonClassDao.getData(BRMSDependency.class)));
             JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
@@ -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();
         }
     }
     
@@ -393,7 +391,7 @@ public class BRMSDictionaryController{
     @RequestMapping(value={"/get_BRMSControllerDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
     public void getBRMSControllerDictionaryByNameEntityData(HttpServletRequest request, HttpServletResponse response){
         try{
-            Map<String, Object> model = new HashMap<String, Object>();
+            Map<String, Object> model = new HashMap<>();
             ObjectMapper mapper = new ObjectMapper();
             model.put("brmsControllerDictionaryDatas", mapper.writeValueAsString(commonClassDao.getDataByColumn(BRMSController.class, "controllerName")));
             JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
@@ -402,14 +400,13 @@ public class BRMSDictionaryController{
         }
         catch (Exception e){
             LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e);
-            e.printStackTrace();
         }
     }
     
     @RequestMapping(value={"/get_BRMSControllerData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
     public void getBRMSControllerDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
         try{
-            Map<String, Object> model = new HashMap<String, Object>();
+            Map<String, Object> model = new HashMap<>();
             ObjectMapper mapper = new ObjectMapper();
             model.put("brmsControllerDictionaryDatas", mapper.writeValueAsString(commonClassDao.getData(BRMSController.class)));
             JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
@@ -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();
         }
     }