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;
@RequestMapping(value={"/get_SettingsDictionaryData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getSettingsDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
+ public void getSettingsDictionaryEntityData(HttpServletResponse response){
try{
Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
}
@RequestMapping(value={"/decision_dictionary/save_Settings"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView saveSettingsDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
+ public ModelAndView saveSettingsDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException{
try {
boolean duplicateflag = false;
boolean isFakeUpdate = false;
}
@RequestMapping(value={"/settings_dictionary/remove_settings"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView removeSettingsDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ public ModelAndView removeSettingsDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException {
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
@RequestMapping(value={"/get_RainyDayDictionaryData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getRainyDayDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
+ public void getRainyDayDictionaryEntityData(HttpServletResponse response){
try{
Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
}
@RequestMapping(value={"/decision_dictionary/save_RainyDay"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView saveRainyDayDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
+ public ModelAndView saveRainyDayDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException{
try {
boolean duplicateflag = false;
boolean isFakeUpdate = false;
counter ++;
}
}
+ decisionRainyDay.setTreatments(userValue);
}
- decisionRainyDay.setTreatments(userValue);
if(decisionRainyDay.getId() == 0){
List<Object> duplicateData = commonClassDao.checkDuplicateEntry(decisionRainyDay.getBbid()+":"+decisionRainyDay.getWorkstep(), "bbid:workstep", RainyDayTreatments.class);
}
@RequestMapping(value={"/decision_dictionary/remove_rainyDay"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView removeRainyDayDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ public ModelAndView removeRainyDayDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException {
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}
class TreatmentValues {
- private ArrayList<Object> userDataTypeValues;
+ private ArrayList<Object> userDataTypeValues = new ArrayList<>();
public ArrayList<Object> getUserDataTypeValues() {
return userDataTypeValues;