X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcontroller%2FDictionaryController.java;fp=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcontroller%2FDictionaryController.java;h=db6acc82c798150cf01a27c4247228fb8bc69734;hb=7925630b5edc79119f29392edc6ddc84cf7c3757;hp=d16de1f9c5c66315387357283423013981648994;hpb=c53fa990ea27ec074859eb94bcb7ec6deaa2157b;p=policy%2Fengine.git diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java index d16de1f9c..db6acc82c 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java @@ -20,7 +20,9 @@ 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.Date; import java.util.HashMap; @@ -122,7 +124,7 @@ public class DictionaryController { } @RequestMapping(value={"/attribute_dictionary/save_attribute"}, method={org.springframework.web.bind.annotation.RequestMethod.POST}) - public ModelAndView saveAttributeDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{ + public ModelAndView saveAttributeDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException{ try { boolean duplicateflag = false; boolean isFakeUpdate = false; @@ -248,7 +250,7 @@ public class DictionaryController { } @RequestMapping(value={"/attribute_dictionary/remove_attribute"}, method={org.springframework.web.bind.annotation.RequestMethod.POST}) - public ModelAndView removeAttributeDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception { + public ModelAndView removeAttributeDictionary(HttpServletRequest request, HttpServletResponse response)throws UnsupportedEncodingException, IOException { try{ ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -312,7 +314,7 @@ public class DictionaryController { } @RequestMapping(value={"/onap_dictionary/save_onapName"}, method={org.springframework.web.bind.annotation.RequestMethod.POST}) - public ModelAndView saveOnapDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{ + public ModelAndView saveOnapDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException{ try { boolean duplicateflag = false; boolean isFakeUpdate = false; @@ -402,7 +404,7 @@ public class DictionaryController { } @RequestMapping(value={"/onap_dictionary/remove_onap"}, method={org.springframework.web.bind.annotation.RequestMethod.POST}) - public ModelAndView removeOnapDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception { + public ModelAndView removeOnapDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException { try{ ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);