package org.onap.policy.pap.xacml.rest.controller;
+import java.io.IOException;
import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
catch (Exception e){
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.addHeader(ERROR, DICTIONARYDBQUERY);
- LOGGER.error(e.getMessage());
+ LOGGER.error(e);
}
}
@RequestMapping(value={"/ms_dictionary/save_dcaeUUID"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView saveDCAEUUIDDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
+ public ModelAndView saveDCAEUUIDDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException{
try {
boolean duplicateflag = false;
boolean isFakeUpdate = false;
request.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();
out.write(e.getMessage());
+ LOGGER.error(e);
}
return null;
}
@RequestMapping(value={"/ms_dictionary/remove_dcaeuuid"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView removeDCAEUUIDDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ public ModelAndView removeDCAEUUIDDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException {
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
catch (Exception e){
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.addHeader(ERROR, DICTIONARYDBQUERY);
- LOGGER.error(e.getMessage());
+ LOGGER.error(e);
}
}
@RequestMapping(value={"/ms_dictionary/save_configName"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView saveMicroServiceConfigNameDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
+ public ModelAndView saveMicroServiceConfigNameDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException{
try {
boolean duplicateflag = false;
boolean isFakeUpdate = false;
request.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();
out.write(e.getMessage());
+ LOGGER.error(e);
}
return null;
}
@RequestMapping(value={"/ms_dictionary/remove_msConfigName"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView removeMicroServiceConfigNameDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ public ModelAndView removeMicroServiceConfigNameDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException {
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
catch (Exception e){
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.addHeader(ERROR, DICTIONARYDBQUERY);
- LOGGER.error(e.getMessage());
+ LOGGER.error(e);
}
}
@RequestMapping(value={"/ms_dictionary/save_location"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView saveMicroServiceLocationDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
+ public ModelAndView saveMicroServiceLocationDictionary(HttpServletRequest request, HttpServletResponse response)throws UnsupportedEncodingException, IOException{
try {
boolean duplicateflag = false;
boolean isFakeUpdate = false;
request.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();
out.write(e.getMessage());
+ LOGGER.error(e);
}
return null;
}
@RequestMapping(value={"/ms_dictionary/remove_msLocation"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView removeMicroServiceLocationDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ public ModelAndView removeMicroServiceLocationDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException {
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
response.getWriter().write(j.toString());
}
catch (Exception e){
- LOGGER.error(e.getMessage());
+ LOGGER.error(e);
}
}
catch (Exception e){
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.addHeader(ERROR, DICTIONARYDBQUERY);
- LOGGER.error(e.getMessage());
+ LOGGER.error(e);
}
}
@RequestMapping(value={"/ms_dictionary/save_modelAttribute"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView saveMicroServiceAttributeDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
+ public ModelAndView saveMicroServiceAttributeDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException{
try {
boolean duplicateflag = false;
boolean fromAPI = false;
request.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();
out.write(e.getMessage());
+ LOGGER.error(e);
}
return null;
}
@RequestMapping(value={"/ms_dictionary/remove_modelAttribute"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView removeMicroServiceAttributeDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ public ModelAndView removeMicroServiceAttributeDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException{
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return null;
}
catch (Exception e){
- LOGGER.error(e.getMessage());
+ LOGGER.error(e);
response.setCharacterEncoding("UTF-8");
request.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();
response.getWriter().write(j.toString());
}
catch (Exception e){
- LOGGER.error(e.getMessage());
+ LOGGER.error(e);
}
}
response.getWriter().write(j.toString());
}
catch (Exception e){
- LOGGER.error(e.getMessage());
+ LOGGER.error(e);
}
}
catch (Exception e){
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.addHeader(ERROR, DICTIONARYDBQUERY);
- LOGGER.error(e.getMessage());
+ LOGGER.error(e);
}
}
catch (Exception e){
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.addHeader(ERROR, DICTIONARYDBQUERY);
- LOGGER.error(e.getMessage());
+ LOGGER.error(e);
}
}
@RequestMapping(value={"/ms_dictionary/save_model"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView saveMicroServiceModelsDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
+ public ModelAndView saveMicroServiceModelsDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException{
try {
boolean duplicateflag = false;
boolean fromAPI = false;
request.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();
out.write(e.getMessage());
+ LOGGER.error(e);
}
return null;
}
@RequestMapping(value={"/ms_dictionary/remove_msModel"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView removeMicroServiceModelsDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ public ModelAndView removeMicroServiceModelsDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException {
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);