Initial OpenECOMP policy/engine commit
[policy/engine.git] / ECOMP-PAP-REST / src / main / java / org / openecomp / policy / pap / xacml / rest / controller / FirewallDictionaryController.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ECOMP-PAP-REST
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.policy.pap.xacml.rest.controller;
22
23 import java.io.PrintWriter;
24 import java.net.UnknownHostException;
25 import java.util.ArrayList;
26 import java.util.HashMap;
27 import java.util.LinkedHashMap;
28 import java.util.List;
29 import java.util.Map;
30
31 import javax.servlet.http.HttpServletRequest;
32 import javax.servlet.http.HttpServletResponse;
33
34 import org.jboss.netty.handler.ipfilter.CIDR;
35 import org.json.JSONObject;
36 import org.openecomp.policy.pap.xacml.rest.adapters.GridData;
37 import org.openecomp.policy.pap.xacml.rest.util.JsonMessage;
38 import org.openecomp.policy.rest.dao.ActionListDao;
39 import org.openecomp.policy.rest.dao.AddressGroupDao;
40 import org.openecomp.policy.rest.dao.FirewallDictionaryListDao;
41 import org.openecomp.policy.rest.dao.PortListDao;
42 import org.openecomp.policy.rest.dao.PrefixListDao;
43 import org.openecomp.policy.rest.dao.ProtocolListDao;
44 import org.openecomp.policy.rest.dao.SecurityZoneDao;
45 import org.openecomp.policy.rest.dao.ServiceGroupDao;
46 import org.openecomp.policy.rest.dao.ServiceListDao;
47 import org.openecomp.policy.rest.dao.TermListDao;
48 import org.openecomp.policy.rest.dao.UserInfoDao;
49 import org.openecomp.policy.rest.dao.ZoneDao;
50 import org.openecomp.policy.rest.jpa.ActionList;
51 import org.openecomp.policy.rest.jpa.AddressGroup;
52 import org.openecomp.policy.rest.jpa.FirewallDictionaryList;
53 import org.openecomp.policy.rest.jpa.GroupServiceList;
54 import org.openecomp.policy.rest.jpa.PREFIXLIST;
55 import org.openecomp.policy.rest.jpa.PortList;
56 import org.openecomp.policy.rest.jpa.ProtocolList;
57 import org.openecomp.policy.rest.jpa.SecurityZone;
58 import org.openecomp.policy.rest.jpa.ServiceList;
59 import org.openecomp.policy.rest.jpa.TermList;
60 import org.openecomp.policy.rest.jpa.UserInfo;
61 import org.openecomp.policy.rest.jpa.Zone;
62 import org.springframework.beans.factory.annotation.Autowired;
63 import org.springframework.http.MediaType;
64 import org.springframework.stereotype.Controller;
65 import org.springframework.web.bind.annotation.RequestMapping;
66 import org.springframework.web.servlet.ModelAndView;
67
68 import com.fasterxml.jackson.databind.DeserializationFeature;
69 import com.fasterxml.jackson.databind.JsonNode;
70 import com.fasterxml.jackson.databind.ObjectMapper;
71
72
73 @Controller
74 public class FirewallDictionaryController {
75
76         @Autowired
77         PrefixListDao prefixListDao;
78         
79         @Autowired
80         PortListDao portListDao;
81         
82         @Autowired
83         ProtocolListDao protocolListDao;
84         
85         @Autowired
86         AddressGroupDao addressGroupDao;
87         
88         @Autowired
89         ActionListDao actionListDao;
90         
91         @Autowired
92         SecurityZoneDao securityZoneDao;
93         
94         @Autowired
95         ServiceGroupDao serviceGroupDao;
96         
97         @Autowired
98         ServiceListDao serviceListDao;
99         
100         @Autowired
101         TermListDao termListDao;
102         
103         @Autowired
104         ZoneDao zoneDao;
105         
106         @Autowired
107         UserInfoDao userInfoDao;
108         
109         @Autowired
110         FirewallDictionaryListDao fwDictionaryListDao;
111         
112
113         
114         public UserInfo getUserInfo(String loginId){
115                 UserInfo name = userInfoDao.getUserInfoByLoginId(loginId);
116                 return name;            
117         }
118
119         @RequestMapping(value={"/get_PrefixListDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
120         public void getPrefixListDictionaryEntityDataByName(HttpServletRequest request, HttpServletResponse response){
121                 try{
122                         Map<String, Object> model = new HashMap<String, Object>();
123                         ObjectMapper mapper = new ObjectMapper();
124                         model.put("prefixListDictionaryDatas", mapper.writeValueAsString(prefixListDao.getPrefixListDataByName()));
125                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
126                         JSONObject j = new JSONObject(msg);
127                         response.getWriter().write(j.toString());
128                 }
129                 catch (Exception e){
130                         e.printStackTrace();
131                 }
132         }
133         
134         @RequestMapping(value={"/get_PrefixListData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
135         public void getPrefixListDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
136                 try{
137                         Map<String, Object> model = new HashMap<String, Object>();
138                         ObjectMapper mapper = new ObjectMapper();
139                         model.put("prefixListDictionaryDatas", mapper.writeValueAsString(prefixListDao.getPREFIXLISTData()));
140                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
141                         JSONObject j = new JSONObject(msg);
142                         response.getWriter().write(j.toString());
143                 }
144                 catch (Exception e){
145                         e.printStackTrace();
146                 }
147         }
148         
149         @RequestMapping(value={"/fw_dictionary/save_prefixList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
150         public ModelAndView savePrefixListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
151                 try {
152                         boolean duplicateflag = false;
153                         ObjectMapper mapper = new ObjectMapper();
154                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
155                         JsonNode root = mapper.readTree(request.getReader());
156                         PREFIXLIST prefixList = (PREFIXLIST)mapper.readValue(root.get("prefixListDictionaryData").toString(), PREFIXLIST.class);
157                         if(prefixList.getId() == 0){
158                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
159                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(prefixList.getPrefixListName(), "prefixListName", PREFIXLIST.class);
160                                 if(!duplicateData.isEmpty()){
161                                         duplicateflag = true;
162                                 }else{
163                                         prefixListDao.Save(prefixList);
164                                 }               
165                         }else{
166                                 prefixListDao.update(prefixList); 
167                         } 
168                         response.setCharacterEncoding("UTF-8");
169                         response.setContentType("application / json");
170                         request.setCharacterEncoding("UTF-8");
171
172                         PrintWriter out = response.getWriter();
173                         String responseString = "";
174                         if(duplicateflag){
175                                 responseString = "Duplicate";
176                         }else{
177                                 responseString = mapper.writeValueAsString(this.prefixListDao.getPREFIXLISTData());
178                         }
179                         JSONObject j = new JSONObject("{prefixListDictionaryDatas: " + responseString + "}");
180
181                         out.write(j.toString());
182
183                         return null;
184                 }
185                 catch (Exception e){
186                         response.setCharacterEncoding("UTF-8");
187                         request.setCharacterEncoding("UTF-8");
188                         PrintWriter out = response.getWriter();
189                         out.write(e.getMessage());
190                 }
191                 return null;
192         }
193
194         @RequestMapping(value={"/fw_dictionary/remove_PrefixList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
195         public ModelAndView removePrefixListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
196                 try{
197                         ObjectMapper mapper = new ObjectMapper();
198                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
199                         JsonNode root = mapper.readTree(request.getReader());
200                         PREFIXLIST prefixList = (PREFIXLIST)mapper.readValue(root.get("data").toString(), PREFIXLIST.class);
201                         prefixListDao.delete(prefixList);
202                         response.setCharacterEncoding("UTF-8");
203                         response.setContentType("application / json");
204                         request.setCharacterEncoding("UTF-8");
205
206                         PrintWriter out = response.getWriter();
207
208                         String responseString = mapper.writeValueAsString(this.prefixListDao.getPREFIXLISTData());
209                         JSONObject j = new JSONObject("{prefixListDictionaryDatas: " + responseString + "}");
210                         out.write(j.toString());
211
212                         return null;
213                 }
214                 catch (Exception e){
215                         System.out.println(e);
216                         response.setCharacterEncoding("UTF-8");
217                         request.setCharacterEncoding("UTF-8");
218                         PrintWriter out = response.getWriter();
219                         out.write(e.getMessage());
220                 }
221                 return null;
222         }
223         
224         @RequestMapping(value={"/fw_dictionary/validate_prefixList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
225         public ModelAndView validatePrefixListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
226                 try {
227                         ObjectMapper mapper = new ObjectMapper();
228                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
229                         JsonNode root = mapper.readTree(request.getReader());
230                         PREFIXLIST prefixList = (PREFIXLIST)mapper.readValue(root.get("prefixListDictionaryData").toString(), PREFIXLIST.class);
231                         String responseValidation = "success";
232                          try{
233                                  CIDR.newCIDR(prefixList.getPrefixListValue());
234                          }catch(UnknownHostException e){
235                                  responseValidation = "error";
236                                  //AdminNotification.warn("IP not according to CIDR notation");
237                          }              
238                         response.setCharacterEncoding("UTF-8");
239                         response.setContentType("application / json");
240                         request.setCharacterEncoding("UTF-8");
241
242                         PrintWriter out = response.getWriter();
243                         JSONObject j = new JSONObject("{result: " + responseValidation + "}");
244                         out.write(j.toString());
245
246                         return null;
247                 }
248                 catch (Exception e){
249                         response.setCharacterEncoding("UTF-8");
250                         request.setCharacterEncoding("UTF-8");
251                         PrintWriter out = response.getWriter();
252                         out.write(e.getMessage());
253                 }
254                 return null;
255         }
256         
257         @RequestMapping(value={"/get_PortListData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
258         public void getPortListDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
259                 try{
260                         Map<String, Object> model = new HashMap<String, Object>();
261                         ObjectMapper mapper = new ObjectMapper();
262                         model.put("portListDictionaryDatas", mapper.writeValueAsString(portListDao.getPortListData()));
263                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
264                         JSONObject j = new JSONObject(msg);
265                         response.getWriter().write(j.toString());
266                 }
267                 catch (Exception e){
268                         e.printStackTrace();
269                 }
270         }
271         
272         @RequestMapping(value={"/fw_dictionary/save_portName.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
273         public ModelAndView savePortListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
274                 try {
275                         boolean duplicateflag = false;
276                         ObjectMapper mapper = new ObjectMapper();
277                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
278                         JsonNode root = mapper.readTree(request.getReader());
279                         PortList portList = (PortList)mapper.readValue(root.get("portListDictionaryData").toString(), PortList.class);
280                         if(portList.getId() == 0){
281                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
282                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(portList.getPortName(), "portName", PortList.class);
283                                 if(!duplicateData.isEmpty()){
284                                         duplicateflag = true;
285                                 }else{
286                                         portListDao.Save(portList);
287                                 }
288                         }else{
289                                 portListDao.update(portList); 
290                         } 
291                         response.setCharacterEncoding("UTF-8");
292                         response.setContentType("application / json");
293                         request.setCharacterEncoding("UTF-8");
294
295                         PrintWriter out = response.getWriter();
296                         String responseString = "";
297                         if(duplicateflag){
298                                 responseString = "Duplicate";
299                         }else{
300                                 responseString = mapper.writeValueAsString(this.portListDao.getPortListData());
301                         }
302                         JSONObject j = new JSONObject("{portListDictionaryDatas: " + responseString + "}");
303
304                         out.write(j.toString());
305
306                         return null;
307                 }
308                 catch (Exception e){
309                         response.setCharacterEncoding("UTF-8");
310                         request.setCharacterEncoding("UTF-8");
311                         PrintWriter out = response.getWriter();
312                         out.write(e.getMessage());
313                 }
314                 return null;
315         }
316
317         @RequestMapping(value={"/fw_dictionary/remove_PortList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
318         public ModelAndView removePortListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
319                 try{
320                         ObjectMapper mapper = new ObjectMapper();
321                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
322                         JsonNode root = mapper.readTree(request.getReader());
323                         PortList portList = (PortList)mapper.readValue(root.get("data").toString(), PortList.class);
324                         portListDao.delete(portList);
325                         response.setCharacterEncoding("UTF-8");
326                         response.setContentType("application / json");
327                         request.setCharacterEncoding("UTF-8");
328
329                         PrintWriter out = response.getWriter();
330
331                         String responseString = mapper.writeValueAsString(this.portListDao.getPortListData());
332                         JSONObject j = new JSONObject("{portListDictionaryDatas: " + responseString + "}");
333                         out.write(j.toString());
334
335                         return null;
336                 }
337                 catch (Exception e){
338                         System.out.println(e);
339                         response.setCharacterEncoding("UTF-8");
340                         request.setCharacterEncoding("UTF-8");
341                         PrintWriter out = response.getWriter();
342                         out.write(e.getMessage());
343                 }
344                 return null;
345         }
346         
347         @RequestMapping(value={"/get_ProtocolListData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
348         public void getProtocolListDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
349                 try{
350                         Map<String, Object> model = new HashMap<String, Object>();
351                         ObjectMapper mapper = new ObjectMapper();
352                         model.put("protocolListDictionaryDatas", mapper.writeValueAsString(protocolListDao.getProtocolListData()));
353                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
354                         JSONObject j = new JSONObject(msg);
355                         response.getWriter().write(j.toString());
356                 }
357                 catch (Exception e){
358                         e.printStackTrace();
359                 }
360         }
361         
362         @RequestMapping(value={"/get_ProtocolListDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
363         public void getProtocolListDictionaryEntityDataByName(HttpServletRequest request, HttpServletResponse response){
364                 try{
365                         Map<String, Object> model = new HashMap<String, Object>();
366                         ObjectMapper mapper = new ObjectMapper();
367                         model.put("protocolListDictionaryDatas", mapper.writeValueAsString(protocolListDao.getProtocolListDataByName()));
368                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
369                         JSONObject j = new JSONObject(msg);
370                         response.getWriter().write(j.toString());
371                 }
372                 catch (Exception e){
373                         e.printStackTrace();
374                 }
375         }
376         
377         @RequestMapping(value={"/fw_dictionary/save_protocolList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
378         public ModelAndView saveProtocolListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
379                 try {
380                         boolean duplicateflag = false;
381                         ObjectMapper mapper = new ObjectMapper();
382                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
383                         JsonNode root = mapper.readTree(request.getReader());
384                         ProtocolList protocolList = (ProtocolList)mapper.readValue(root.get("protocolListDictionaryData").toString(), ProtocolList.class);
385                         if(protocolList.getId() == 0){
386                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
387                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(protocolList.getProtocolName(), "protocolName", ProtocolList.class);
388                                 if(!duplicateData.isEmpty()){
389                                         duplicateflag = true;
390                                 }else{
391                                         protocolListDao.Save(protocolList);
392                                 }
393                         }else{
394                                 protocolListDao.update(protocolList); 
395                         } 
396                         response.setCharacterEncoding("UTF-8");
397                         response.setContentType("application / json");
398                         request.setCharacterEncoding("UTF-8");
399
400                         PrintWriter out = response.getWriter();
401                         String responseString = "";
402                         if(duplicateflag){
403                                 responseString = "Duplicate";
404                         }else{
405                                 responseString = mapper.writeValueAsString(this.protocolListDao.getProtocolListData());
406                         }
407                         JSONObject j = new JSONObject("{protocolListDictionaryDatas: " + responseString + "}");
408
409                         out.write(j.toString());
410
411                         return null;
412                 }
413                 catch (Exception e){
414                         response.setCharacterEncoding("UTF-8");
415                         request.setCharacterEncoding("UTF-8");
416                         PrintWriter out = response.getWriter();
417                         out.write(e.getMessage());
418                 }
419                 return null;
420         }
421
422         @RequestMapping(value={"/fw_dictionary/remove_protocol.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
423         public ModelAndView removeProtocolListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
424                 try{
425                         ObjectMapper mapper = new ObjectMapper();
426                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
427                         JsonNode root = mapper.readTree(request.getReader());
428                         ProtocolList protocolList = (ProtocolList)mapper.readValue(root.get("data").toString(), ProtocolList.class);
429                         protocolListDao.delete(protocolList);
430                         response.setCharacterEncoding("UTF-8");
431                         response.setContentType("application / json");
432                         request.setCharacterEncoding("UTF-8");
433
434                         PrintWriter out = response.getWriter();
435
436                         String responseString = mapper.writeValueAsString(this.protocolListDao.getProtocolListData());
437                         JSONObject j = new JSONObject("{protocolListDictionaryDatas: " + responseString + "}");
438                         out.write(j.toString());
439
440                         return null;
441                 }
442                 catch (Exception e){
443                         System.out.println(e);
444                         response.setCharacterEncoding("UTF-8");
445                         request.setCharacterEncoding("UTF-8");
446                         PrintWriter out = response.getWriter();
447                         out.write(e.getMessage());
448                 }
449                 return null;
450         }
451         
452         @RequestMapping(value={"/get_AddressGroupDictionaryDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
453         public void getAddressGroupDictionaryEntityDataByName(HttpServletRequest request, HttpServletResponse response){
454                 try{
455                         Map<String, Object> model = new HashMap<String, Object>();
456                         ObjectMapper mapper = new ObjectMapper();
457                         model.put("addressGroupDictionaryDatas", mapper.writeValueAsString(addressGroupDao.getAddressGroupDataByName()));
458                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
459                         JSONObject j = new JSONObject(msg);
460                         response.getWriter().write(j.toString());
461                 }
462                 catch (Exception e){
463                         e.printStackTrace();
464                 }
465         }
466         
467         @RequestMapping(value={"/get_AddressGroupData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
468         public void getAddressGroupDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
469                 try{
470                         Map<String, Object> model = new HashMap<String, Object>();
471                         ObjectMapper mapper = new ObjectMapper();
472                         model.put("addressGroupDictionaryDatas", mapper.writeValueAsString(addressGroupDao.getAddressGroupData()));
473                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
474                         JSONObject j = new JSONObject(msg);
475                         response.getWriter().write(j.toString());
476                 }
477                 catch (Exception e){
478                         e.printStackTrace();
479                 }
480         }
481         
482         @RequestMapping(value={"/fw_dictionary/save_addressGroup.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
483         public ModelAndView saveAddressGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
484                 try {
485                         boolean duplicateflag = false;
486                         ObjectMapper mapper = new ObjectMapper();
487                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
488                         JsonNode root = mapper.readTree(request.getReader());
489                         AddressGroup addressGroup = (AddressGroup)mapper.readValue(root.get("addressGroupDictionaryData").toString(), AddressGroup.class);
490                         GridData gridData = (GridData)mapper.readValue(root.get("addressGroupDictionaryData").toString(), GridData.class);
491                         if(!addressGroup.getGroupName().startsWith("Group_")){
492                                 String groupName = "Group_"+addressGroup.getGroupName();
493                                 addressGroup.setGroupName(groupName);
494                         }
495                         String userValue = "";
496                         int counter = 0;
497                         if(gridData.getAttributes().size() > 0){
498                                 for(Object attribute : gridData.getAttributes()){
499                                         if(attribute instanceof LinkedHashMap<?, ?>){
500                                                 String key = ((LinkedHashMap<?, ?>) attribute).get("option").toString();
501                                                 if(counter>0){
502                                                         userValue = userValue + ",";
503                                                 }
504                                                 userValue = userValue + key ;
505                                                 counter ++;
506                                         }
507                                 }
508                         }
509                         addressGroup.setServiceList(userValue);
510                         if(addressGroup.getId() == 0){
511                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
512                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(addressGroup.getGroupName(), "name", AddressGroup.class);
513                                 if(!duplicateData.isEmpty()){
514                                         duplicateflag = true;
515                                 }else{
516                                         addressGroupDao.Save(addressGroup);
517                                 }
518                         }else{
519                                 addressGroupDao.update(addressGroup); 
520                         } 
521                         response.setCharacterEncoding("UTF-8");
522                         response.setContentType("application / json");
523                         request.setCharacterEncoding("UTF-8");
524
525                         PrintWriter out = response.getWriter();
526                         String responseString = "";
527                         if(duplicateflag){
528                                 responseString = "Duplicate";
529                         }else{
530                                 responseString = mapper.writeValueAsString(this.addressGroupDao.getAddressGroupData());
531                         }
532                         JSONObject j = new JSONObject("{addressGroupDictionaryDatas: " + responseString + "}");
533
534                         out.write(j.toString());
535
536                         return null;
537                 }
538                 catch (Exception e){
539                         response.setCharacterEncoding("UTF-8");
540                         request.setCharacterEncoding("UTF-8");
541                         PrintWriter out = response.getWriter();
542                         out.write(e.getMessage());
543                 }
544                 return null;
545         }
546
547         @RequestMapping(value={"/fw_dictionary/remove_AddressGroup.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
548         public ModelAndView removeAddressGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
549                 try{
550                         ObjectMapper mapper = new ObjectMapper();
551                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
552                         JsonNode root = mapper.readTree(request.getReader());
553                         AddressGroup addressGroup = (AddressGroup)mapper.readValue(root.get("data").toString(), AddressGroup.class);
554                         addressGroupDao.delete(addressGroup);
555                         response.setCharacterEncoding("UTF-8");
556                         response.setContentType("application / json");
557                         request.setCharacterEncoding("UTF-8");
558
559                         PrintWriter out = response.getWriter();
560
561                         String responseString = mapper.writeValueAsString(this.addressGroupDao.getAddressGroupData());
562                         JSONObject j = new JSONObject("{addressGroupDictionaryDatas: " + responseString + "}");
563                         out.write(j.toString());
564
565                         return null;
566                 }
567                 catch (Exception e){
568                         System.out.println(e);
569                         response.setCharacterEncoding("UTF-8");
570                         request.setCharacterEncoding("UTF-8");
571                         PrintWriter out = response.getWriter();
572                         out.write(e.getMessage());
573                 }
574                 return null;
575         }
576         
577         @RequestMapping(value={"/get_ActionListDictionaryDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
578         public void getActionListDictionaryEntityDataByName(HttpServletRequest request, HttpServletResponse response){
579                 try{
580                         Map<String, Object> model = new HashMap<String, Object>();
581                         ObjectMapper mapper = new ObjectMapper();
582                         model.put("actionListDictionaryDatas", mapper.writeValueAsString(actionListDao.getActionListDataByName()));
583                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
584                         JSONObject j = new JSONObject(msg);
585                         response.getWriter().write(j.toString());
586                 }
587                 catch (Exception e){
588                         e.printStackTrace();
589                 }
590         }
591         
592         @RequestMapping(value={"/get_ActionListData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
593         public void getActionListDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
594                 try{
595                         Map<String, Object> model = new HashMap<String, Object>();
596                         ObjectMapper mapper = new ObjectMapper();
597                         model.put("actionListDictionaryDatas", mapper.writeValueAsString(actionListDao.getActionListData()));
598                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
599                         JSONObject j = new JSONObject(msg);
600                         response.getWriter().write(j.toString());
601                 }
602                 catch (Exception e){
603                         e.printStackTrace();
604                 }
605         }
606         
607         @RequestMapping(value={"/fw_dictionary/save_ActionList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
608         public ModelAndView saveActionListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
609                 try {
610                         boolean duplicateflag = false;
611                         ObjectMapper mapper = new ObjectMapper();
612                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
613                         JsonNode root = mapper.readTree(request.getReader());
614                         ActionList actionList = (ActionList)mapper.readValue(root.get("actionListDictionaryData").toString(), ActionList.class);
615                         if(actionList.getId() == 0){
616                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
617                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(actionList.getActionName(), "actionName", ActionList.class);
618                                 if(!duplicateData.isEmpty()){
619                                         duplicateflag = true;
620                                 }else{
621                                         actionListDao.Save(actionList);
622                                 }
623                         }else{
624                                 actionListDao.update(actionList); 
625                         } 
626                         response.setCharacterEncoding("UTF-8");
627                         response.setContentType("application / json");
628                         request.setCharacterEncoding("UTF-8");
629
630                         PrintWriter out = response.getWriter();
631                         String responseString = "";
632                         if(duplicateflag){
633                                 responseString = "Duplicate";
634                         }else{
635                                 responseString = mapper.writeValueAsString(this.actionListDao.getActionListData());
636                         }
637                         JSONObject j = new JSONObject("{actionListDictionaryDatas: " + responseString + "}");
638
639                         out.write(j.toString());
640
641                         return null;
642                 }
643                 catch (Exception e){
644                         response.setCharacterEncoding("UTF-8");
645                         request.setCharacterEncoding("UTF-8");
646                         PrintWriter out = response.getWriter();
647                         out.write(e.getMessage());
648                 }
649                 return null;
650         }
651
652         @RequestMapping(value={"/fw_dictionary/remove_ActionList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
653         public ModelAndView removeActionListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
654                 try{
655                         ObjectMapper mapper = new ObjectMapper();
656                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
657                         JsonNode root = mapper.readTree(request.getReader());
658                         ActionList actionList = (ActionList)mapper.readValue(root.get("data").toString(), ActionList.class);
659                         actionListDao.delete(actionList);
660                         response.setCharacterEncoding("UTF-8");
661                         response.setContentType("application / json");
662                         request.setCharacterEncoding("UTF-8");
663
664                         PrintWriter out = response.getWriter();
665
666                         String responseString = mapper.writeValueAsString(this.actionListDao.getActionListData());
667                         JSONObject j = new JSONObject("{actionListDictionaryDatas: " + responseString + "}");
668                         out.write(j.toString());
669
670                         return null;
671                 }
672                 catch (Exception e){
673                         System.out.println(e);
674                         response.setCharacterEncoding("UTF-8");
675                         request.setCharacterEncoding("UTF-8");
676                         PrintWriter out = response.getWriter();
677                         out.write(e.getMessage());
678                 }
679                 return null;
680         }
681         
682         @RequestMapping(value={"/get_ServiceGroupData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
683         public void getServiceGroupDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
684                 try{
685                         Map<String, Object> model = new HashMap<String, Object>();
686                         ObjectMapper mapper = new ObjectMapper();
687                         model.put("serviceGroupDictionaryDatas", mapper.writeValueAsString(serviceGroupDao.getGroupServiceListData()));
688                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
689                         JSONObject j = new JSONObject(msg);
690                         response.getWriter().write(j.toString());
691                 }
692                 catch (Exception e){
693                         e.printStackTrace();
694                 }
695         }
696         
697         @RequestMapping(value={"/get_ServiceGroupDictionaryDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
698         public void getServiceGroupDictionaryEntityDataByName(HttpServletRequest request, HttpServletResponse response){
699                 try{
700                         Map<String, Object> model = new HashMap<String, Object>();
701                         ObjectMapper mapper = new ObjectMapper();
702                         model.put("serviceGroupDictionaryDatas", mapper.writeValueAsString(serviceGroupDao.getGroupServiceDataByName()));
703                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
704                         JSONObject j = new JSONObject(msg);
705                         response.getWriter().write(j.toString());
706                 }
707                 catch (Exception e){
708                         e.printStackTrace();
709                 }
710         }
711         
712         @RequestMapping(value={"/fw_dictionary/save_serviceGroup.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
713         public ModelAndView saveServiceGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
714                 try {
715                         boolean duplicateflag = false;
716                         ObjectMapper mapper = new ObjectMapper();
717                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
718                         JsonNode root = mapper.readTree(request.getReader());
719                         GroupServiceList groupServiceList = (GroupServiceList)mapper.readValue(root.get("serviceGroupDictionaryData").toString(), GroupServiceList.class);
720                         GridData gridData = (GridData)mapper.readValue(root.get("serviceGroupDictionaryData").toString(), GridData.class);
721                         if(!groupServiceList.getGroupName().startsWith("Group_")){
722                                 String groupName = "Group_"+groupServiceList.getGroupName();
723                                 groupServiceList.setGroupName(groupName);
724                         }
725                         String userValue = "";
726                         int counter = 0;
727                         if(gridData.getAttributes().size() > 0){
728                                 for(Object attribute : gridData.getAttributes()){
729                                         if(attribute instanceof LinkedHashMap<?, ?>){
730                                                 String key = ((LinkedHashMap<?, ?>) attribute).get("option").toString();
731                                                 if(counter>0){
732                                                         userValue = userValue + ",";
733                                                 }
734                                                 userValue = userValue + key ;
735                                                 counter ++;
736                                         }
737                                 }
738                         }
739                         groupServiceList.setServiceList(userValue);
740                         if(groupServiceList.getId() == 0){
741                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
742                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(groupServiceList.getGroupName(), "name", GroupServiceList.class);
743                                 if(!duplicateData.isEmpty()){
744                                         duplicateflag = true;
745                                 }else{
746                                         serviceGroupDao.Save(groupServiceList);
747                                 }
748                         }else{
749                                 serviceGroupDao.update(groupServiceList); 
750                         } 
751                         response.setCharacterEncoding("UTF-8");
752                         response.setContentType("application / json");
753                         request.setCharacterEncoding("UTF-8");
754
755                         PrintWriter out = response.getWriter();
756                         String responseString = "";
757                         if(duplicateflag){
758                                 responseString = "Duplicate";
759                         }else{
760                                 responseString = mapper.writeValueAsString(this.serviceGroupDao.getGroupServiceListData());
761                         }
762                         JSONObject j = new JSONObject("{serviceGroupDictionaryDatas: " + responseString + "}");
763
764                         out.write(j.toString());
765
766                         return null;
767                 }
768                 catch (Exception e){
769                         response.setCharacterEncoding("UTF-8");
770                         request.setCharacterEncoding("UTF-8");
771                         PrintWriter out = response.getWriter();
772                         out.write(e.getMessage());
773                 }
774                 return null;
775         }
776
777         @RequestMapping(value={"/fw_dictionary/remove_serviceGroup.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
778         public ModelAndView removeServiceGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
779                 try{
780                         ObjectMapper mapper = new ObjectMapper();
781                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
782                         JsonNode root = mapper.readTree(request.getReader());
783                         GroupServiceList groupServiceList = (GroupServiceList)mapper.readValue(root.get("data").toString(), GroupServiceList.class);
784                         serviceGroupDao.delete(groupServiceList);
785                         response.setCharacterEncoding("UTF-8");
786                         response.setContentType("application / json");
787                         request.setCharacterEncoding("UTF-8");
788
789                         PrintWriter out = response.getWriter();
790
791                         String responseString = mapper.writeValueAsString(this.serviceGroupDao.getGroupServiceListData());
792                         JSONObject j = new JSONObject("{serviceGroupDictionaryDatas: " + responseString + "}");
793                         out.write(j.toString());
794
795                         return null;
796                 }
797                 catch (Exception e){
798                         System.out.println(e);
799                         response.setCharacterEncoding("UTF-8");
800                         request.setCharacterEncoding("UTF-8");
801                         PrintWriter out = response.getWriter();
802                         out.write(e.getMessage());
803                 }
804                 return null;
805         }
806         
807         @RequestMapping(value={"/get_SecurityZoneDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
808         public void getSecurityZoneDictionaryEntityDataByName(HttpServletRequest request, HttpServletResponse response){
809                 try{
810                         Map<String, Object> model = new HashMap<String, Object>();
811                         ObjectMapper mapper = new ObjectMapper();
812                         model.put("securityZoneDictionaryDatas", mapper.writeValueAsString(securityZoneDao.getSecurityZoneDataByName()));
813                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
814                         JSONObject j = new JSONObject(msg);
815                         response.getWriter().write(j.toString());
816                 }
817                 catch (Exception e){
818                         e.printStackTrace();
819                 }
820         }
821         
822         @RequestMapping(value={"/get_SecurityZoneData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
823         public void getSecurityZoneDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
824                 try{
825                         Map<String, Object> model = new HashMap<String, Object>();
826                         ObjectMapper mapper = new ObjectMapper();
827                         model.put("securityZoneDictionaryDatas", mapper.writeValueAsString(securityZoneDao.getSecurityZoneData()));
828                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
829                         JSONObject j = new JSONObject(msg);
830                         response.getWriter().write(j.toString());
831                 }
832                 catch (Exception e){
833                         e.printStackTrace();
834                 }
835         }
836         
837         @RequestMapping(value={"/fw_dictionary/save_securityZone.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
838         public ModelAndView saveSecurityZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
839                 try {
840                         boolean duplicateflag = false;
841                         ObjectMapper mapper = new ObjectMapper();
842                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
843                         JsonNode root = mapper.readTree(request.getReader());
844                         SecurityZone securityZone = (SecurityZone)mapper.readValue(root.get("securityZoneDictionaryData").toString(), SecurityZone.class);
845                         if(securityZone.getId() == 0){
846                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
847                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(securityZone.getZoneName(), "zoneName", SecurityZone.class);
848                                 if(!duplicateData.isEmpty()){
849                                         duplicateflag = true;
850                                 }else{
851                                         securityZoneDao.Save(securityZone);
852                                 }                       
853                         }else{
854                                 securityZoneDao.update(securityZone); 
855                         } 
856                         response.setCharacterEncoding("UTF-8");
857                         response.setContentType("application / json");
858                         request.setCharacterEncoding("UTF-8");
859
860                         PrintWriter out = response.getWriter();
861                         String responseString = "";
862                         if(duplicateflag){
863                                 responseString = "Duplicate";
864                         }else{
865                                 responseString = mapper.writeValueAsString(this.securityZoneDao.getSecurityZoneData());
866                         }
867                         JSONObject j = new JSONObject("{securityZoneDictionaryDatas: " + responseString + "}");
868
869                         out.write(j.toString());
870
871                         return null;
872                 }
873                 catch (Exception e){
874                         response.setCharacterEncoding("UTF-8");
875                         request.setCharacterEncoding("UTF-8");
876                         PrintWriter out = response.getWriter();
877                         out.write(e.getMessage());
878                 }
879                 return null;
880         }
881
882         @RequestMapping(value={"/fw_dictionary/remove_securityZone.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
883         public ModelAndView removeSecurityZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
884                 try{
885                         ObjectMapper mapper = new ObjectMapper();
886                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
887                         JsonNode root = mapper.readTree(request.getReader());
888                         SecurityZone securityZone = (SecurityZone)mapper.readValue(root.get("data").toString(), SecurityZone.class);
889                         securityZoneDao.delete(securityZone);
890                         response.setCharacterEncoding("UTF-8");
891                         response.setContentType("application / json");
892                         request.setCharacterEncoding("UTF-8");
893
894                         PrintWriter out = response.getWriter();
895
896                         String responseString = mapper.writeValueAsString(this.securityZoneDao.getSecurityZoneData());
897                         JSONObject j = new JSONObject("{securityZoneDictionaryDatas: " + responseString + "}");
898                         out.write(j.toString());
899
900                         return null;
901                 }
902                 catch (Exception e){
903                         System.out.println(e);
904                         response.setCharacterEncoding("UTF-8");
905                         request.setCharacterEncoding("UTF-8");
906                         PrintWriter out = response.getWriter();
907                         out.write(e.getMessage());
908                 }
909                 return null;
910         }
911         
912         
913         @RequestMapping(value={"/get_ServiceListData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
914         public void getServiceListDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
915                 try{
916                         Map<String, Object> model = new HashMap<String, Object>();
917                         ObjectMapper mapper = new ObjectMapper();
918                         model.put("serviceListDictionaryDatas", mapper.writeValueAsString(serviceListDao.getServiceListData()));
919                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
920                         JSONObject j = new JSONObject(msg);
921                         response.getWriter().write(j.toString());
922                 }
923                 catch (Exception e){
924                         e.printStackTrace();
925                 }
926         }
927         
928         @RequestMapping(value={"/get_ServiceListDictionaryDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
929         public void getServiceListDictionaryEntityDataByName(HttpServletRequest request, HttpServletResponse response){
930                 try{
931                         Map<String, Object> model = new HashMap<String, Object>();
932                         ObjectMapper mapper = new ObjectMapper();
933                         model.put("serviceListDictionaryDatas", mapper.writeValueAsString(serviceListDao.getServiceListDataByName()));
934                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
935                         JSONObject j = new JSONObject(msg);
936                         response.getWriter().write(j.toString());
937                 }
938                 catch (Exception e){
939                         e.printStackTrace();
940                 }
941         }
942         
943         @RequestMapping(value={"/fw_dictionary/save_serviceList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
944         public ModelAndView saveServiceListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
945                 try {
946                         boolean duplicateflag = false;
947                         ObjectMapper mapper = new ObjectMapper();
948                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
949                         JsonNode root = mapper.readTree(request.getReader());
950                         ServiceList serviceList = (ServiceList)mapper.readValue(root.get("serviceListDictionaryData").toString(), ServiceList.class);
951                         GridData serviceListGridData = (GridData)mapper.readValue(root.get("serviceListDictionaryData").toString(), GridData.class);
952                         String tcpValue = "";
953                         int counter = 0;
954                         if(serviceListGridData.getTransportProtocols().size() > 0){
955                                 for(Object attribute : serviceListGridData.getTransportProtocols()){
956                                         if(attribute instanceof LinkedHashMap<?, ?>){
957                                                 String key = ((LinkedHashMap<?, ?>) attribute).get("option").toString();
958                                                 if(counter>0){
959                                                         tcpValue = tcpValue + ",";
960                                                 }
961                                                 tcpValue = tcpValue + key ;
962                                                 counter ++;
963                                         }
964                                 }
965                         }
966                         serviceList.setServiceTransProtocol(tcpValue);
967                         String appValue = "";
968                         int counter1 = 0;
969                         if(serviceListGridData.getAppProtocols().size() > 0){
970                                 for(Object attribute : serviceListGridData.getAppProtocols()){
971                                         if(attribute instanceof LinkedHashMap<?, ?>){
972                                                 String key = ((LinkedHashMap<?, ?>) attribute).get("option").toString();
973                                                 if(counter1>0){
974                                                         appValue = appValue + ",";
975                                                 }
976                                                 appValue = appValue + key ;
977                                                 counter1 ++;
978                                         }
979                                 }
980                         }
981                         serviceList.setServiceAppProtocol(appValue);
982                         serviceList.setServiceType("SERVICE");
983                         if(serviceList.getId() == 0){
984                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
985                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(serviceList.getServiceName(), "serviceName", ServiceList.class);
986                                 if(!duplicateData.isEmpty()){
987                                         duplicateflag = true;
988                                 }else{
989                                         serviceListDao.Save(serviceList);
990                                 }
991                                 
992                         }else{
993                                 serviceListDao.update(serviceList); 
994                         } 
995                         response.setCharacterEncoding("UTF-8");
996                         response.setContentType("application / json");
997                         request.setCharacterEncoding("UTF-8");
998
999                         PrintWriter out = response.getWriter();
1000                         String responseString = "";
1001                         if(duplicateflag){
1002                                 responseString = "Duplicate";
1003                         }else{
1004                                 responseString = mapper.writeValueAsString(this.serviceListDao.getServiceListData());
1005                         } 
1006                         JSONObject j = new JSONObject("{serviceListDictionaryDatas: " + responseString + "}");
1007
1008                         out.write(j.toString());
1009
1010                         return null;
1011                 }
1012                 catch (Exception e){
1013                         response.setCharacterEncoding("UTF-8");
1014                         request.setCharacterEncoding("UTF-8");
1015                         PrintWriter out = response.getWriter();
1016                         out.write(e.getMessage());
1017                 }
1018                 return null;
1019         }
1020
1021         @RequestMapping(value={"/fw_dictionary/remove_serviceList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
1022         public ModelAndView removeServiceListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
1023                 try{
1024                         ObjectMapper mapper = new ObjectMapper();
1025                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
1026                         JsonNode root = mapper.readTree(request.getReader());
1027                         ServiceList serviceList = (ServiceList)mapper.readValue(root.get("data").toString(), ServiceList.class);
1028                         serviceListDao.delete(serviceList);
1029                         response.setCharacterEncoding("UTF-8");
1030                         response.setContentType("application / json");
1031                         request.setCharacterEncoding("UTF-8");
1032
1033                         PrintWriter out = response.getWriter();
1034
1035                         String responseString = mapper.writeValueAsString(this.serviceListDao.getServiceListData());
1036                         JSONObject j = new JSONObject("{serviceListDictionaryDatas: " + responseString + "}");
1037                         out.write(j.toString());
1038
1039                         return null;
1040                 }
1041                 catch (Exception e){
1042                         System.out.println(e);
1043                         response.setCharacterEncoding("UTF-8");
1044                         request.setCharacterEncoding("UTF-8");
1045                         PrintWriter out = response.getWriter();
1046                         out.write(e.getMessage());
1047                 }
1048                 return null;
1049         }
1050         
1051         @RequestMapping(value={"/get_ZoneData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
1052         public void getZoneDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
1053                 try{
1054                         Map<String, Object> model = new HashMap<String, Object>();
1055                         ObjectMapper mapper = new ObjectMapper();
1056                         model.put("zoneDictionaryDatas", mapper.writeValueAsString(zoneDao.getZoneData()));
1057                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
1058                         JSONObject j = new JSONObject(msg);
1059                         response.getWriter().write(j.toString());
1060                 }
1061                 catch (Exception e){
1062                         e.printStackTrace();
1063                 }
1064         }
1065         
1066         @RequestMapping(value={"/get_ZoneDictionaryDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
1067         public void getZoneDictionaryEntityDataByName(HttpServletRequest request, HttpServletResponse response){
1068                 try{
1069                         Map<String, Object> model = new HashMap<String, Object>();
1070                         ObjectMapper mapper = new ObjectMapper();
1071                         model.put("zoneDictionaryDatas", mapper.writeValueAsString(zoneDao.getZoneDataByName()));
1072                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
1073                         JSONObject j = new JSONObject(msg);
1074                         response.getWriter().write(j.toString());
1075                 }
1076                 catch (Exception e){
1077                         e.printStackTrace();
1078                 }
1079         }
1080         
1081         @RequestMapping(value={"/fw_dictionary/save_zoneName.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
1082         public ModelAndView saveZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
1083                 try {
1084                         boolean duplicateflag = false;
1085                         ObjectMapper mapper = new ObjectMapper();
1086                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
1087                         JsonNode root = mapper.readTree(request.getReader());
1088                         Zone zone = (Zone)mapper.readValue(root.get("zoneDictionaryData").toString(), Zone.class);
1089                         if(zone.getId() == 0){
1090                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
1091                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(zone.getZoneName(), "zoneName", Zone.class);
1092                                 if(!duplicateData.isEmpty()){
1093                                         duplicateflag = true;
1094                                 }else{
1095                                         zoneDao.Save(zone);
1096                                 }       
1097                         }else{
1098                                 zoneDao.update(zone); 
1099                         } 
1100                         response.setCharacterEncoding("UTF-8");
1101                         response.setContentType("application / json");
1102                         request.setCharacterEncoding("UTF-8");
1103
1104                         PrintWriter out = response.getWriter();
1105                         String responseString = "";
1106                         if(duplicateflag){
1107                                 responseString = "Duplicate";
1108                         }else{
1109                                 responseString = mapper.writeValueAsString(this.zoneDao.getZoneData());
1110                         }
1111                         JSONObject j = new JSONObject("{zoneDictionaryDatas: " + responseString + "}");
1112
1113                         out.write(j.toString());
1114
1115                         return null;
1116                 }
1117                 catch (Exception e){
1118                         response.setCharacterEncoding("UTF-8");
1119                         request.setCharacterEncoding("UTF-8");
1120                         PrintWriter out = response.getWriter();
1121                         out.write(e.getMessage());
1122                 }
1123                 return null;
1124         }
1125
1126         @RequestMapping(value={"/fw_dictionary/remove_zone.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
1127         public ModelAndView removeZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
1128                 try{
1129                         ObjectMapper mapper = new ObjectMapper();
1130                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
1131                         JsonNode root = mapper.readTree(request.getReader());
1132                         Zone zone = (Zone)mapper.readValue(root.get("data").toString(), Zone.class);
1133                         zoneDao.delete(zone);
1134                         response.setCharacterEncoding("UTF-8");
1135                         response.setContentType("application / json");
1136                         request.setCharacterEncoding("UTF-8");
1137
1138                         PrintWriter out = response.getWriter();
1139
1140                         String responseString = mapper.writeValueAsString(this.zoneDao.getZoneData());
1141                         JSONObject j = new JSONObject("{zoneDictionaryDatas: " + responseString + "}");
1142                         out.write(j.toString());
1143
1144                         return null;
1145                 }
1146                 catch (Exception e){
1147                         System.out.println(e);
1148                         response.setCharacterEncoding("UTF-8");
1149                         request.setCharacterEncoding("UTF-8");
1150                         PrintWriter out = response.getWriter();
1151                         out.write(e.getMessage());
1152                 }
1153                 return null;
1154         }
1155         
1156         @RequestMapping(value={"/get_TermListDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
1157         public void getTermListDictionaryEntityDataByName(HttpServletRequest request, HttpServletResponse response){
1158                 try{
1159                         Map<String, Object> model = new HashMap<String, Object>();
1160                         ObjectMapper mapper = new ObjectMapper();
1161                         model.put("termListDictionaryDatas", mapper.writeValueAsString(termListDao.getTermListDataByName()));
1162                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
1163                         JSONObject j = new JSONObject(msg);
1164                         response.getWriter().write(j.toString());
1165                 }
1166                 catch (Exception e){
1167                         e.printStackTrace();
1168                 }
1169         }
1170         
1171         @RequestMapping(value={"/get_TermListData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
1172         public void getTermListDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){
1173                 try{
1174                         Map<String, Object> model = new HashMap<String, Object>();
1175                         ObjectMapper mapper = new ObjectMapper();
1176                         model.put("termListDictionaryDatas", mapper.writeValueAsString(termListDao.getTermListData()));
1177                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
1178                         JSONObject j = new JSONObject(msg);
1179                         response.getWriter().write(j.toString());
1180                 }
1181                 catch (Exception e){
1182                         e.printStackTrace();
1183                 }
1184         }
1185         
1186         @RequestMapping(value={"/fw_dictionary/save_termList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
1187         public ModelAndView saveTermListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
1188                 try {
1189                         boolean duplicateflag = false;
1190                         ObjectMapper mapper = new ObjectMapper();
1191                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
1192                         JsonNode root = mapper.readTree(request.getReader());
1193                         TermList termList = (TermList)mapper.readValue(root.get("termListDictionaryData").toString(), TermList.class);
1194                         TermListData termListDatas = (TermListData)mapper.readValue(root.get("termListDictionaryData").toString(), TermListData.class);
1195                         String userId = root.get("loginId").textValue();
1196                         String fromZoneValue = "";
1197                         int counter = 0;
1198                         if(termListDatas.getFromZoneDatas().size() > 0){
1199                                 for(Object fromZone : termListDatas.getFromZoneDatas()){
1200                                         if(fromZone instanceof LinkedHashMap<?, ?>){
1201                                                 String key = ((LinkedHashMap<?, ?>) fromZone).get("option").toString();
1202                                                 if(counter>0){
1203                                                         fromZoneValue = fromZoneValue + ",";
1204                                                 }
1205                                                 fromZoneValue = fromZoneValue + key ;
1206                                                 counter ++;
1207                                         }
1208                                 }
1209                         }
1210                         termList.setFromZones(fromZoneValue);
1211                         
1212                         String toZoneValue = "";
1213                         int toZonecounter = 0;
1214                         if(termListDatas.getToZoneDatas().size() > 0){
1215                                 for(Object toZone : termListDatas.getToZoneDatas()){
1216                                         if(toZone instanceof LinkedHashMap<?, ?>){
1217                                                 String key = ((LinkedHashMap<?, ?>) toZone).get("option").toString();
1218                                                 if(toZonecounter>0){
1219                                                         toZoneValue = toZoneValue + ",";
1220                                                 }
1221                                                 toZoneValue = toZoneValue + key ;
1222                                                 toZonecounter ++;
1223                                         }
1224                                 }
1225                         }
1226                         termList.setToZones(toZoneValue);
1227                         
1228                         String srcListValues = "";
1229                         int srcListcounter = 0;
1230                         if(termListDatas.getSourceListDatas().size() > 0){
1231                                 for(Object srcList : termListDatas.getSourceListDatas()){
1232                                         if(srcList instanceof LinkedHashMap<?, ?>){
1233                                                 String key = ((LinkedHashMap<?, ?>) srcList).get("option").toString();
1234                                                 if(srcListcounter>0){
1235                                                         srcListValues = srcListValues + ",";
1236                                                 }
1237                                                 srcListValues = srcListValues + key ;
1238                                                 srcListcounter ++;
1239                                         }
1240                                 }
1241                         }
1242                         termList.setSrcIPList(srcListValues);
1243                         
1244                         String desListValues = "";
1245                         int destListcounter = 0;
1246                         if(termListDatas.getDestinationListDatas().size() > 0){
1247                                 for(Object desList : termListDatas.getDestinationListDatas()){
1248                                         if(desList instanceof LinkedHashMap<?, ?>){
1249                                                 String key = ((LinkedHashMap<?, ?>) desList).get("option").toString();
1250                                                 if(destListcounter>0){
1251                                                         desListValues = desListValues + ",";
1252                                                 }
1253                                                 desListValues = desListValues + key ;
1254                                                 destListcounter ++;
1255                                         }
1256                                 }
1257                         }
1258                         termList.setDestIPList(desListValues);
1259                         
1260                         String srcSerValue = "";
1261                         int srcSercounter = 0;
1262                         if(termListDatas.getSourceServiceDatas().size() > 0){
1263                                 for(Object srcSrc : termListDatas.getSourceServiceDatas()){
1264                                         if(srcSrc instanceof LinkedHashMap<?, ?>){
1265                                                 String key = ((LinkedHashMap<?, ?>) srcSrc).get("option").toString();
1266                                                 if(srcSercounter>0){
1267                                                         srcSerValue = srcSerValue + ",";
1268                                                 }
1269                                                 srcSerValue = srcSerValue + key ;
1270                                                 srcSercounter ++;
1271                                         }
1272                                 }
1273                         }
1274                         termList.setSrcPortList(srcSerValue);
1275                         
1276                         String desSrcValue = "";
1277                         int desSrccounter = 0;
1278                         if(termListDatas.getDestinationServiceDatas().size() > 0){
1279                                 for(Object desSrc : termListDatas.getDestinationServiceDatas()){
1280                                         if(desSrc instanceof LinkedHashMap<?, ?>){
1281                                                 String key = ((LinkedHashMap<?, ?>) desSrc).get("option").toString();
1282                                                 if(desSrccounter>0){
1283                                                         desSrcValue = desSrcValue + ",";
1284                                                 }
1285                                                 desSrcValue = desSrcValue + key ;
1286                                                 desSrccounter ++;
1287                                         }
1288                                 }
1289                         }
1290                         termList.setDestPortList(desSrcValue);
1291                         
1292                         String actionValue = "";
1293                         int actioncounter = 0;
1294                         if(termListDatas.getActionListDatas().size() > 0){
1295                                 for(Object actionList : termListDatas.getActionListDatas()){
1296                                         if(actionList instanceof LinkedHashMap<?, ?>){
1297                                                 String key = ((LinkedHashMap<?, ?>) actionList).get("option").toString();
1298                                                 if(actioncounter>0){
1299                                                         actionValue = actionValue + ",";
1300                                                 }
1301                                                 actionValue = actionValue + key ;
1302                                                 actioncounter ++;
1303                                         }
1304                                 }
1305                         }
1306                         termList.setAction(actionValue);
1307                         
1308                         if(termList.getId() == 0){
1309                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
1310                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(termList.getTermName(), "termName", TermList.class);
1311                                 if(!duplicateData.isEmpty()){
1312                                         duplicateflag = true;
1313                                 }else{
1314                                         termList.setUserCreatedBy(this.getUserInfo(userId));
1315                                         termList.setUserModifiedBy(this.getUserInfo(userId));
1316                                         termListDao.Save(termList);
1317                                 }
1318                         }else{
1319                                 termList.setUserModifiedBy(this.getUserInfo(userId));
1320                                 termListDao.update(termList); 
1321                         } 
1322                         response.setCharacterEncoding("UTF-8");
1323                         response.setContentType("application / json");
1324                         request.setCharacterEncoding("UTF-8");
1325
1326                         PrintWriter out = response.getWriter();
1327                         
1328                         String responseString = "";
1329                         if(duplicateflag){
1330                                 responseString = "Duplicate";
1331                         }else{
1332                                 responseString = mapper.writeValueAsString(this.termListDao.getTermListData());
1333                         }
1334                         JSONObject j = new JSONObject("{termListDictionaryDatas: " + responseString + "}");
1335
1336                         out.write(j.toString());
1337
1338                         return null;
1339                 }
1340                 catch (Exception e){
1341                         response.setCharacterEncoding("UTF-8");
1342                         request.setCharacterEncoding("UTF-8");
1343                         PrintWriter out = response.getWriter();
1344                         out.write(e.getMessage());
1345                 }
1346                 return null;
1347         }
1348
1349         @RequestMapping(value={"/fw_dictionary/remove_termList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
1350         public ModelAndView removeTermListDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
1351                 try{
1352                         ObjectMapper mapper = new ObjectMapper();
1353                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
1354                         JsonNode root = mapper.readTree(request.getReader());
1355                         TermList termList = (TermList)mapper.readValue(root.get("data").toString(), TermList.class);
1356                         termListDao.delete(termList);
1357                         response.setCharacterEncoding("UTF-8");
1358                         response.setContentType("application / json");
1359                         request.setCharacterEncoding("UTF-8");
1360
1361                         PrintWriter out = response.getWriter();
1362
1363                         String responseString = mapper.writeValueAsString(this.termListDao.getTermListData());
1364                         JSONObject j = new JSONObject("{termListDictionaryDatas: " + responseString + "}");
1365                         out.write(j.toString());
1366
1367                         return null;
1368                 }
1369                 catch (Exception e){
1370                         System.out.println(e);
1371                         response.setCharacterEncoding("UTF-8");
1372                         request.setCharacterEncoding("UTF-8");
1373                         PrintWriter out = response.getWriter();
1374                         out.write(e.getMessage());
1375                 }
1376                 return null;
1377         }
1378         //ParentList Dictionary Data
1379         @RequestMapping(value={"/get_FWDictionaryListDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
1380         public void getFWDictListDictionaryEntityDataByName(HttpServletRequest request, HttpServletResponse response){
1381                 try{
1382                         Map<String, Object> model = new HashMap<String, Object>();
1383                         ObjectMapper mapper = new ObjectMapper();
1384                         model.put("fwDictListDictionaryDatas", mapper.writeValueAsString(fwDictionaryListDao.getFWDictionaryListDataByName()));
1385                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
1386                         JSONObject j = new JSONObject(msg);
1387                         response.getWriter().write(j.toString());
1388                 }
1389                 catch (Exception e){
1390                         e.printStackTrace();
1391                 }
1392         }
1393         
1394         @RequestMapping(value={"/get_FWDictionaryListData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
1395         public void getFWDictionaryListEntityData(HttpServletRequest request, HttpServletResponse response){
1396                 try{
1397                         Map<String, Object> model = new HashMap<String, Object>();
1398                         ObjectMapper mapper = new ObjectMapper();
1399                         model.put("fwDictListDictionaryDatas", mapper.writeValueAsString(fwDictionaryListDao.getFWDictionaryListData()));
1400                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
1401                         JSONObject j = new JSONObject(msg);
1402                         response.getWriter().write(j.toString());
1403                 }
1404                 catch (Exception e){
1405                         e.printStackTrace();
1406                 }
1407         }
1408         
1409         @RequestMapping(value={"/fw_dictionary/save_FWDictionaryList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
1410         public ModelAndView saveFWDictionaryList(HttpServletRequest request, HttpServletResponse response) throws Exception{
1411                 try {
1412                         boolean duplicateflag = false;
1413                         ObjectMapper mapper = new ObjectMapper();
1414                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
1415                         JsonNode root = mapper.readTree(request.getReader());
1416                         FirewallDictionaryList fwDictList = (FirewallDictionaryList)mapper.readValue(root.get("fwDictListDictionaryData").toString(), FirewallDictionaryList.class);
1417                         GridData gridData = (GridData)mapper.readValue(root.get("fwDictListDictionaryData").toString(), GridData.class);
1418                         String userSLValue = "";
1419                         int slcounter = 0;
1420                         if(gridData.getAttributes().size() > 0){
1421                                 for(Object attribute : gridData.getAttributes()){
1422                                         if(attribute instanceof LinkedHashMap<?, ?>){
1423                                                 String key = ((LinkedHashMap<?, ?>) attribute).get("option").toString();
1424                                                 if(slcounter>0){
1425                                                         userSLValue = userSLValue + ",";
1426                                                 }
1427                                                 userSLValue = userSLValue + key ;
1428                                                 slcounter ++;
1429                                         }
1430                                 }
1431                         }
1432                         fwDictList.setServiceList(userSLValue);
1433                         String userALValue = "";
1434                         int alcounter = 0;
1435                         if(gridData.getAlAttributes().size() > 0){
1436                                 for(Object attribute : gridData.getAlAttributes()){
1437                                         if(attribute instanceof LinkedHashMap<?, ?>){
1438                                                 String key = ((LinkedHashMap<?, ?>) attribute).get("option").toString();
1439                                                 if(alcounter>0){
1440                                                         userALValue = userALValue + ",";
1441                                                 }
1442                                                 userALValue = userALValue + key ;
1443                                                 alcounter ++;
1444                                         }
1445                                 }
1446                         }
1447                         fwDictList.setAddressList(userALValue);
1448                         if(fwDictList.getId() == 0){
1449                                 CheckDictionaryDuplicateEntries entry = new CheckDictionaryDuplicateEntries();
1450                                 List<Object> duplicateData =  entry.CheckDuplicateEntry(fwDictList.getParentItemName(), "parentItemName", FirewallDictionaryList.class);
1451                                 if(!duplicateData.isEmpty()){
1452                                         duplicateflag = true;
1453                                 }else{
1454                                         fwDictionaryListDao.Save(fwDictList);
1455                                 }
1456                         }else{
1457                                 fwDictionaryListDao.update(fwDictList); 
1458                         } 
1459                         response.setCharacterEncoding("UTF-8");
1460                         response.setContentType("application / json");
1461                         request.setCharacterEncoding("UTF-8");
1462
1463                         PrintWriter out = response.getWriter();
1464                         String responseString = "";
1465                         if(duplicateflag){
1466                                 responseString = "Duplicate";
1467                         }else{
1468                                 responseString = mapper.writeValueAsString(this.fwDictionaryListDao.getFWDictionaryListData());
1469                         }
1470                         JSONObject j = new JSONObject("{fwDictListDictionaryDatas: " + responseString + "}");
1471
1472                         out.write(j.toString());
1473
1474                         return null;
1475                 }
1476                 catch (Exception e){
1477                         response.setCharacterEncoding("UTF-8");
1478                         request.setCharacterEncoding("UTF-8");
1479                         PrintWriter out = response.getWriter();
1480                         out.write(e.getMessage());
1481                 }
1482                 return null;
1483         }
1484
1485         @RequestMapping(value={"/fw_dictionary/remove_FWDictionaryList.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
1486         public ModelAndView removeFWDictionaryListy(HttpServletRequest request, HttpServletResponse response) throws Exception {
1487                 try{
1488                         ObjectMapper mapper = new ObjectMapper();
1489                         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
1490                         JsonNode root = mapper.readTree(request.getReader());
1491                         FirewallDictionaryList fwDictList = (FirewallDictionaryList)mapper.readValue(root.get("data").toString(), FirewallDictionaryList.class);
1492                         fwDictionaryListDao.delete(fwDictList);
1493                         response.setCharacterEncoding("UTF-8");
1494                         response.setContentType("application / json");
1495                         request.setCharacterEncoding("UTF-8");
1496
1497                         PrintWriter out = response.getWriter();
1498
1499                         String responseString = mapper.writeValueAsString(this.fwDictionaryListDao.getFWDictionaryListData());
1500                         JSONObject j = new JSONObject("{fwDictListDictionaryDatas: " + responseString + "}");
1501                         out.write(j.toString());
1502
1503                         return null;
1504                 }
1505                 catch (Exception e){
1506                         System.out.println(e);
1507                         response.setCharacterEncoding("UTF-8");
1508                         request.setCharacterEncoding("UTF-8");
1509                         PrintWriter out = response.getWriter();
1510                         out.write(e.getMessage());
1511                 }
1512                 return null;
1513         }
1514 }
1515
1516 class AGGridData{
1517         private ArrayList<Object> attributes;
1518
1519         public ArrayList<Object> getAttributes() {
1520                 return attributes;
1521         }
1522
1523         public void setAttributes(ArrayList<Object> attributes) {
1524                 this.attributes = attributes;
1525         }
1526 }
1527
1528 class TermListData{
1529         private ArrayList<Object> fromZoneDatas;
1530         private ArrayList<Object> toZoneDatas;
1531         private ArrayList<Object> sourceListDatas;
1532         private ArrayList<Object> destinationListDatas;
1533         private ArrayList<Object> sourceServiceDatas;
1534         private ArrayList<Object> destinationServiceDatas;
1535         private ArrayList<Object> actionListDatas;
1536         public ArrayList<Object> getFromZoneDatas() {
1537                 return fromZoneDatas;
1538         }
1539         public void setFromZoneDatas(ArrayList<Object> fromZoneDatas) {
1540                 this.fromZoneDatas = fromZoneDatas;
1541         }
1542         public ArrayList<Object> getToZoneDatas() {
1543                 return toZoneDatas;
1544         }
1545         public void setToZoneDatas(ArrayList<Object> toZoneDatas) {
1546                 this.toZoneDatas = toZoneDatas;
1547         }
1548         public ArrayList<Object> getSourceListDatas() {
1549                 return sourceListDatas;
1550         }
1551         public void setSourceListDatas(ArrayList<Object> sourceListDatas) {
1552                 this.sourceListDatas = sourceListDatas;
1553         }
1554         public ArrayList<Object> getDestinationListDatas() {
1555                 return destinationListDatas;
1556         }
1557         public void setDestinationListDatas(ArrayList<Object> destinationListDatas) {
1558                 this.destinationListDatas = destinationListDatas;
1559         }
1560         public ArrayList<Object> getSourceServiceDatas() {
1561                 return sourceServiceDatas;
1562         }
1563         public void setSourceServiceDatas(ArrayList<Object> sourceServiceDatas) {
1564                 this.sourceServiceDatas = sourceServiceDatas;
1565         }
1566         public ArrayList<Object> getDestinationServiceDatas() {
1567                 return destinationServiceDatas;
1568         }
1569         public void setDestinationServiceDatas(ArrayList<Object> destinationServiceDatas) {
1570                 this.destinationServiceDatas = destinationServiceDatas;
1571         }
1572         public ArrayList<Object> getActionListDatas() {
1573                 return actionListDatas;
1574         }
1575         public void setActionListDatas(ArrayList<Object> actionListDatas) {
1576                 this.actionListDatas = actionListDatas;
1577         }
1578 }