2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.policy.pap.xacml.rest.controller;
23 import java.io.IOException;
24 import java.io.PrintWriter;
25 import java.net.UnknownHostException;
26 import java.util.Date;
27 import java.util.List;
29 import javax.servlet.http.HttpServletRequest;
30 import javax.servlet.http.HttpServletResponse;
32 import org.jboss.netty.handler.ipfilter.CIDR;
33 import org.json.JSONObject;
34 import org.onap.policy.common.logging.flexlogger.FlexLogger;
35 import org.onap.policy.common.logging.flexlogger.Logger;
36 import org.onap.policy.pap.xacml.rest.adapters.GridData;
37 import org.onap.policy.pap.xacml.rest.util.DictionaryUtils;
38 import org.onap.policy.rest.dao.CommonClassDao;
39 import org.onap.policy.rest.jpa.ActionList;
40 import org.onap.policy.rest.jpa.AddressGroup;
41 import org.onap.policy.rest.jpa.FWTag;
42 import org.onap.policy.rest.jpa.FWTagPicker;
43 import org.onap.policy.rest.jpa.FirewallDictionaryList;
44 import org.onap.policy.rest.jpa.GroupServiceList;
45 import org.onap.policy.rest.jpa.PortList;
46 import org.onap.policy.rest.jpa.PrefixList;
47 import org.onap.policy.rest.jpa.ProtocolList;
48 import org.onap.policy.rest.jpa.SecurityZone;
49 import org.onap.policy.rest.jpa.ServiceList;
50 import org.onap.policy.rest.jpa.TermList;
51 import org.onap.policy.rest.jpa.UserInfo;
52 import org.onap.policy.rest.jpa.Zone;
53 import org.springframework.beans.factory.annotation.Autowired;
54 import org.springframework.http.MediaType;
55 import org.springframework.stereotype.Controller;
56 import org.springframework.web.bind.annotation.RequestMapping;
57 import org.springframework.web.bind.annotation.RequestMethod;
58 import org.springframework.web.servlet.ModelAndView;
60 import com.fasterxml.jackson.databind.DeserializationFeature;
61 import com.fasterxml.jackson.databind.JsonNode;
62 import com.fasterxml.jackson.databind.ObjectMapper;
66 public class FirewallDictionaryController {
68 private static final Logger LOGGER = FlexLogger.getLogger(FirewallDictionaryController.class);
70 private static CommonClassDao commonClassDao;
71 private static String prefixListName = "prefixListName";
72 private static String successMessage = "success";
73 private static String operation = "operation";
74 private static String errorMsg = "error";
75 private static String dictionaryFields ="dictionaryFields";
76 private static String duplicateResponseString = "Duplicate";
77 private static String utf8 = "UTF-8";
78 private static String applicationJsonContentType = "application / json";
79 private static String protocolName = "protocolName";
80 private static String groupNameStart = "Group_";
81 private static String option = "option";
82 private static String zoneName = "zoneName";
83 private static String serviceName = "serviceName";
84 private static String termName = "termName";
85 private static String userid = "userid";
86 private static String tagPickerName = "tagPickerName";
87 private static String pfListDatas = "prefixListDictionaryDatas";
88 private static String portListDatas = "portListDictionaryDatas";
89 private static String protocolListDatas = "protocolListDictionaryDatas";
90 private static String addressGroupDatas = "addressGroupDictionaryDatas";
91 private static String actionListDatas = "actionListDictionaryDatas";
92 private static String serviceGroupDatas = "serviceGroupDictionaryDatas";
93 private static String securityZoneDatas = "securityZoneDictionaryDatas";
94 private static String serviceListDatas = "serviceListDictionaryDatas";
95 private static String zoneDatas = "zoneDictionaryDatas";
96 private static String termListDictDatas = "termListDictionaryDatas";
97 private static String fwDictListDatas = "fwDictListDictionaryDatas";
98 private static String fwTagPickerDatas = "fwTagPickerDictionaryDatas";
99 private static String fwTagDatas = "fwTagDictionaryDatas";
103 public FirewallDictionaryController(CommonClassDao commonClassDao){
104 FirewallDictionaryController.commonClassDao = commonClassDao;
107 public static void setCommonClassDao(CommonClassDao clDao){
108 commonClassDao = clDao;
111 public FirewallDictionaryController(){
115 private DictionaryUtils getDictionaryUtilsInstance(){
116 return DictionaryUtils.getDictionaryUtils();
119 @RequestMapping(value={"/get_PrefixListDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
120 public void getPrefixListDictionaryEntityDataByName(HttpServletResponse response){
121 DictionaryUtils utils = getDictionaryUtilsInstance();
122 utils.getDataByEntity(response, pfListDatas, prefixListName, PrefixList.class);
125 @RequestMapping(value={"/get_PrefixListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
126 public void getPrefixListDictionaryEntityData(HttpServletResponse response){
127 DictionaryUtils utils = getDictionaryUtilsInstance();
128 utils.getData(response, pfListDatas, PrefixList.class);
131 @RequestMapping(value={"/fw_dictionary/save_prefixList"}, method={RequestMethod.POST})
132 public ModelAndView savePrefixListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
133 DictionaryUtils utils = getDictionaryUtilsInstance();
135 boolean fromAPI = utils.isRequestFromAPI(request);
136 ObjectMapper mapper = new ObjectMapper();
137 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
138 JsonNode root = mapper.readTree(request.getReader());
139 PrefixList prefixList;
141 prefixList = mapper.readValue(root.get(dictionaryFields).toString(), PrefixList.class);
143 prefixList = mapper.readValue(root.get("prefixListDictionaryData").toString(), PrefixList.class);
146 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(prefixList.getPrefixListName(), prefixListName, PrefixList.class);
147 boolean duplicateflag = false;
148 if(!duplicateData.isEmpty()){
149 PrefixList data = (PrefixList) duplicateData.get(0);
150 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
151 prefixList.setId(data.getId());
152 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
153 (request.getParameter(operation) == null && (data.getId() != prefixList.getId()))){
154 duplicateflag = true;
157 String responseString = null;
159 if(prefixList.getId() == 0){
160 commonClassDao.save(prefixList);
162 commonClassDao.update(prefixList);
164 responseString = mapper.writeValueAsString(commonClassDao.getData(PrefixList.class));
166 responseString = duplicateResponseString;
169 return utils.getResultForApi(responseString);
171 utils.setResponseData(response, pfListDatas, responseString);
173 }catch (Exception e){
174 utils.setErrorResponseData(response, e);
179 @RequestMapping(value={"/fw_dictionary/remove_PrefixList"}, method={RequestMethod.POST})
180 public void removePrefixListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
181 DictionaryUtils utils = getDictionaryUtilsInstance();
182 utils.removeData(request, response, pfListDatas, PrefixList.class);
185 @RequestMapping(value={"/fw_dictionary/validate_prefixList"}, method={RequestMethod.POST})
186 public void validatePrefixListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
187 DictionaryUtils utils = getDictionaryUtilsInstance();
189 ObjectMapper mapper = new ObjectMapper();
190 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
191 JsonNode root = mapper.readTree(request.getReader());
192 PrefixList prefixList = mapper.readValue(root.get("prefixListDictionaryData").toString(), PrefixList.class);
193 String responseValidation = successMessage;
195 CIDR.newCIDR(prefixList.getPrefixListValue());
196 }catch(UnknownHostException e){
198 responseValidation = errorMsg;
200 response.setCharacterEncoding(utf8);
201 response.setContentType(applicationJsonContentType);
202 request.setCharacterEncoding(utf8);
204 PrintWriter out = response.getWriter();
205 JSONObject j = new JSONObject("{result: " + responseValidation + "}");
206 out.write(j.toString());
209 utils.setErrorResponseData(response, e);
213 @RequestMapping(value={"/get_PortListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
214 public void getPortListDictionaryEntityData(HttpServletResponse response){
215 DictionaryUtils utils = getDictionaryUtilsInstance();
216 utils.getData(response, portListDatas, PortList.class);
219 @RequestMapping(value={"/fw_dictionary/save_portName"}, method={RequestMethod.POST})
220 public ModelAndView savePortListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
221 DictionaryUtils utils = getDictionaryUtilsInstance();
223 boolean fromAPI = utils.isRequestFromAPI(request);
224 ObjectMapper mapper = new ObjectMapper();
225 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
226 JsonNode root = mapper.readTree(request.getReader());
229 portList = mapper.readValue(root.get(dictionaryFields).toString(), PortList.class);
231 portList = mapper.readValue(root.get("portListDictionaryData").toString(), PortList.class);
233 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(portList.getPortName(), "portName", PortList.class);
234 boolean duplicateflag = false;
235 if(!duplicateData.isEmpty()){
236 PortList data = (PortList) duplicateData.get(0);
237 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
238 portList.setId(data.getId());
239 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
240 (request.getParameter(operation) == null && (data.getId() != portList.getId()))){
241 duplicateflag = true;
244 String responseString = null;
246 if(portList.getId() == 0){
247 commonClassDao.save(portList);
249 commonClassDao.update(portList);
251 responseString = mapper.writeValueAsString(commonClassDao.getData(PortList.class));
253 responseString = duplicateResponseString;
256 return utils.getResultForApi(responseString);
258 utils.setResponseData(response, portListDatas, responseString);
260 }catch (Exception e){
261 utils.setErrorResponseData(response, e);
266 @RequestMapping(value={"/fw_dictionary/remove_PortList"}, method={RequestMethod.POST})
267 public void removePortListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
268 DictionaryUtils utils = getDictionaryUtilsInstance();
269 utils.removeData(request, response, portListDatas, PortList.class);
272 @RequestMapping(value={"/get_ProtocolListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
273 public void getProtocolListDictionaryEntityData(HttpServletResponse response){
274 DictionaryUtils utils = getDictionaryUtilsInstance();
275 utils.getData(response, protocolListDatas, ProtocolList.class);
278 @RequestMapping(value={"/get_ProtocolListDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
279 public void getProtocolListDictionaryEntityDataByName(HttpServletResponse response){
280 DictionaryUtils utils = getDictionaryUtilsInstance();
281 utils.getDataByEntity(response, protocolListDatas, protocolName, ProtocolList.class);
284 @RequestMapping(value={"/fw_dictionary/save_protocolList"}, method={RequestMethod.POST})
285 public ModelAndView saveProtocolListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
286 DictionaryUtils utils = getDictionaryUtilsInstance();
288 boolean fromAPI = utils.isRequestFromAPI(request);
289 ObjectMapper mapper = new ObjectMapper();
290 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
291 JsonNode root = mapper.readTree(request.getReader());
292 ProtocolList protocolList;
294 protocolList = mapper.readValue(root.get(dictionaryFields).toString(), ProtocolList.class);
296 protocolList = mapper.readValue(root.get("protocolListDictionaryData").toString(), ProtocolList.class);
298 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(protocolList.getProtocolName(), protocolName, ProtocolList.class);
299 boolean duplicateflag = false;
300 if(!duplicateData.isEmpty()){
301 ProtocolList data = (ProtocolList) duplicateData.get(0);
302 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
303 protocolList.setId(data.getId());
304 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
305 (request.getParameter(operation) == null && (data.getId() != protocolList.getId()))){
306 duplicateflag = true;
309 String responseString = null;
311 if(protocolList.getId() == 0){
312 commonClassDao.save(protocolList);
314 commonClassDao.update(protocolList);
316 responseString = mapper.writeValueAsString(commonClassDao.getData(ProtocolList.class));
318 responseString = duplicateResponseString;
321 return utils.getResultForApi(responseString);
323 utils.setResponseData(response, protocolListDatas, responseString);
325 }catch (Exception e){
326 utils.setErrorResponseData(response, e);
331 @RequestMapping(value={"/fw_dictionary/remove_protocol"}, method={RequestMethod.POST})
332 public void removeProtocolListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
333 DictionaryUtils utils = getDictionaryUtilsInstance();
334 utils.removeData(request, response, protocolListDatas, ProtocolList.class);
337 @RequestMapping(value={"/get_AddressGroupDictionaryDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
338 public void getAddressGroupDictionaryEntityDataByName(HttpServletResponse response){
339 DictionaryUtils utils = getDictionaryUtilsInstance();
340 utils.getDataByEntity(response, addressGroupDatas, "name", AddressGroup.class);
343 @RequestMapping(value={"/get_AddressGroupData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
344 public void getAddressGroupDictionaryEntityData(HttpServletResponse response){
345 DictionaryUtils utils = getDictionaryUtilsInstance();
346 utils.getData(response, addressGroupDatas, AddressGroup.class);
349 @RequestMapping(value={"/fw_dictionary/save_addressGroup"}, method={RequestMethod.POST})
350 public ModelAndView saveAddressGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
351 DictionaryUtils utils = getDictionaryUtilsInstance();
353 boolean fromAPI = utils.isRequestFromAPI(request);
354 ObjectMapper mapper = new ObjectMapper();
355 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
356 JsonNode root = mapper.readTree(request.getReader());
357 AddressGroup addressGroup;
360 addressGroup = mapper.readValue(root.get(dictionaryFields).toString(), AddressGroup.class);
361 gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
363 addressGroup = mapper.readValue(root.get("addressGroupDictionaryData").toString(), AddressGroup.class);
364 gridData = mapper.readValue(root.get("addressGroupDictionaryData").toString(), GridData.class);
366 if(!addressGroup.getGroupName().startsWith(groupNameStart)){
367 String groupName = groupNameStart+addressGroup.getGroupName();
368 addressGroup.setGroupName(groupName);
370 addressGroup.setServiceList(utils.appendKey(gridData.getAttributes(), option, ","));
371 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(addressGroup.getGroupName(), "name", AddressGroup.class);
372 boolean duplicateflag = false;
373 if(!duplicateData.isEmpty()){
374 AddressGroup data = (AddressGroup) duplicateData.get(0);
375 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
376 addressGroup.setId(data.getId());
377 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
378 (request.getParameter(operation) == null && (data.getId() != addressGroup.getId()))){
379 duplicateflag = true;
382 String responseString = null;
384 if(addressGroup.getId() == 0){
385 commonClassDao.save(addressGroup);
387 commonClassDao.update(addressGroup);
389 responseString = mapper.writeValueAsString(commonClassDao.getData(AddressGroup.class));
391 responseString = duplicateResponseString;
394 return utils.getResultForApi(responseString);
396 utils.setResponseData(response, addressGroupDatas, responseString);
398 }catch (Exception e){
399 utils.setErrorResponseData(response, e);
404 @RequestMapping(value={"/fw_dictionary/remove_AddressGroup"}, method={RequestMethod.POST})
405 public void removeAddressGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
406 DictionaryUtils utils = getDictionaryUtilsInstance();
407 utils.removeData(request, response, addressGroupDatas, AddressGroup.class);
410 @RequestMapping(value={"/get_ActionListDictionaryDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
411 public void getActionListDictionaryEntityDataByName(HttpServletResponse response){
412 DictionaryUtils utils = getDictionaryUtilsInstance();
413 utils.getDataByEntity(response, actionListDatas, "actionName", ActionList.class);
416 @RequestMapping(value={"/get_ActionListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
417 public void getActionListDictionaryEntityData(HttpServletResponse response){
418 DictionaryUtils utils = getDictionaryUtilsInstance();
419 utils.getData(response, actionListDatas, ActionList.class);
422 @RequestMapping(value={"/fw_dictionary/save_ActionList"}, method={RequestMethod.POST})
423 public ModelAndView saveActionListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
424 DictionaryUtils utils = getDictionaryUtilsInstance();
426 boolean fromAPI = utils.isRequestFromAPI(request);
427 ObjectMapper mapper = new ObjectMapper();
428 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
429 JsonNode root = mapper.readTree(request.getReader());
430 ActionList actionList;
432 actionList = mapper.readValue(root.get(dictionaryFields).toString(), ActionList.class);
434 actionList = mapper.readValue(root.get("actionListDictionaryData").toString(), ActionList.class);
436 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(actionList.getActionName(), "actionName", ActionList.class);
437 boolean duplicateflag = false;
438 if(!duplicateData.isEmpty()){
439 ActionList data = (ActionList) duplicateData.get(0);
440 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
441 actionList.setId(data.getId());
442 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
443 (request.getParameter(operation) == null && (data.getId() != actionList.getId()))){
444 duplicateflag = true;
447 String responseString = null;
449 if(actionList.getId() == 0){
450 commonClassDao.save(actionList);
452 commonClassDao.update(actionList);
454 responseString = mapper.writeValueAsString(commonClassDao.getData(ActionList.class));
456 responseString = duplicateResponseString;
459 return utils.getResultForApi(responseString);
461 utils.setResponseData(response, actionListDatas, responseString);
463 }catch (Exception e){
464 utils.setErrorResponseData(response, e);
469 @RequestMapping(value={"/fw_dictionary/remove_ActionList"}, method={RequestMethod.POST})
470 public void removeActionListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
471 DictionaryUtils utils = getDictionaryUtilsInstance();
472 utils.removeData(request, response, actionListDatas, ActionList.class);
475 @RequestMapping(value={"/get_ServiceGroupData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
476 public void getServiceGroupDictionaryEntityData(HttpServletResponse response){
477 DictionaryUtils utils = getDictionaryUtilsInstance();
478 utils.getData(response, serviceGroupDatas, GroupServiceList.class);
481 @RequestMapping(value={"/get_ServiceGroupDictionaryDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
482 public void getServiceGroupDictionaryEntityDataByName(HttpServletResponse response){
483 DictionaryUtils utils = getDictionaryUtilsInstance();
484 utils.getDataByEntity(response, serviceGroupDatas, "name", GroupServiceList.class);
487 @RequestMapping(value={"/fw_dictionary/save_serviceGroup"}, method={RequestMethod.POST})
488 public ModelAndView saveServiceGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
489 DictionaryUtils utils = getDictionaryUtilsInstance();
491 boolean fromAPI = utils.isRequestFromAPI(request);
492 ObjectMapper mapper = new ObjectMapper();
493 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
494 JsonNode root = mapper.readTree(request.getReader());
495 GroupServiceList groupServiceList;
498 groupServiceList = mapper.readValue(root.get(dictionaryFields).toString(), GroupServiceList.class);
499 gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
501 groupServiceList = mapper.readValue(root.get("serviceGroupDictionaryData").toString(), GroupServiceList.class);
502 gridData = mapper.readValue(root.get("serviceGroupDictionaryData").toString(), GridData.class);
504 if(!groupServiceList.getGroupName().startsWith(groupNameStart)){
505 String groupName = groupNameStart+groupServiceList.getGroupName();
506 groupServiceList.setGroupName(groupName);
508 groupServiceList.setServiceList(utils.appendKey(gridData.getAttributes(), option, ","));
509 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(groupServiceList.getGroupName(), "name", GroupServiceList.class);
510 boolean duplicateflag = false;
511 if(!duplicateData.isEmpty()){
512 GroupServiceList data = (GroupServiceList) duplicateData.get(0);
513 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
514 groupServiceList.setId(data.getId());
515 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
516 (request.getParameter(operation) == null && (data.getId() != groupServiceList.getId()))){
517 duplicateflag = true;
520 String responseString = null;
522 if(groupServiceList.getId() == 0){
523 commonClassDao.save(groupServiceList);
525 commonClassDao.update(groupServiceList);
527 responseString = mapper.writeValueAsString(commonClassDao.getData(GroupServiceList.class));
529 responseString = duplicateResponseString;
532 return utils.getResultForApi(responseString);
534 utils.setResponseData(response, serviceGroupDatas, responseString);
536 }catch (Exception e){
537 utils.setErrorResponseData(response, e);
542 @RequestMapping(value={"/fw_dictionary/remove_serviceGroup"}, method={RequestMethod.POST})
543 public void removeServiceGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
544 DictionaryUtils utils = getDictionaryUtilsInstance();
545 utils.removeData(request, response, serviceGroupDatas, GroupServiceList.class);
548 @RequestMapping(value={"/get_SecurityZoneDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
549 public void getSecurityZoneDictionaryEntityDataByName(HttpServletResponse response){
550 DictionaryUtils utils = getDictionaryUtilsInstance();
551 utils.getDataByEntity(response, securityZoneDatas, zoneName, SecurityZone.class);
554 @RequestMapping(value={"/get_SecurityZoneData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
555 public void getSecurityZoneDictionaryEntityData(HttpServletResponse response){
556 DictionaryUtils utils = getDictionaryUtilsInstance();
557 utils.getData(response, securityZoneDatas, SecurityZone.class);
560 @RequestMapping(value={"/fw_dictionary/save_securityZone"}, method={RequestMethod.POST})
561 public ModelAndView saveSecurityZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
562 DictionaryUtils utils = getDictionaryUtilsInstance();
564 boolean fromAPI = utils.isRequestFromAPI(request);
565 ObjectMapper mapper = new ObjectMapper();
566 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
567 JsonNode root = mapper.readTree(request.getReader());
568 SecurityZone securityZone;
570 securityZone = mapper.readValue(root.get(dictionaryFields).toString(), SecurityZone.class);
572 securityZone = mapper.readValue(root.get("securityZoneDictionaryData").toString(), SecurityZone.class);
574 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(securityZone.getZoneName(), zoneName, SecurityZone.class);
575 boolean duplicateflag = false;
576 if(!duplicateData.isEmpty()){
577 SecurityZone data = (SecurityZone) duplicateData.get(0);
578 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
579 securityZone.setId(data.getId());
580 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
581 (request.getParameter(operation) == null && (data.getId() != securityZone.getId()))){
582 duplicateflag = true;
585 String responseString = null;
587 if(securityZone.getId() == 0){
588 commonClassDao.save(securityZone);
590 commonClassDao.update(securityZone);
592 responseString = mapper.writeValueAsString(commonClassDao.getData(SecurityZone.class));
594 responseString = duplicateResponseString;
597 return utils.getResultForApi(responseString);
599 utils.setResponseData(response, securityZoneDatas, responseString);
601 }catch (Exception e){
602 utils.setErrorResponseData(response, e);
607 @RequestMapping(value={"/fw_dictionary/remove_securityZone"}, method={RequestMethod.POST})
608 public void removeSecurityZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
609 DictionaryUtils utils = getDictionaryUtilsInstance();
610 utils.removeData(request, response, securityZoneDatas, SecurityZone.class);
614 @RequestMapping(value={"/get_ServiceListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
615 public void getServiceListDictionaryEntityData(HttpServletResponse response){
616 DictionaryUtils utils = getDictionaryUtilsInstance();
617 utils.getData(response, serviceListDatas, ServiceList.class);
620 @RequestMapping(value={"/get_ServiceListDictionaryDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
621 public void getServiceListDictionaryEntityDataByName(HttpServletResponse response){
622 DictionaryUtils utils = getDictionaryUtilsInstance();
623 utils.getDataByEntity(response, serviceListDatas, serviceName, ServiceList.class);
626 @RequestMapping(value={"/fw_dictionary/save_serviceList"}, method={RequestMethod.POST})
627 public ModelAndView saveServiceListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
628 DictionaryUtils utils = getDictionaryUtilsInstance();
630 boolean fromAPI = utils.isRequestFromAPI(request);
631 ObjectMapper mapper = new ObjectMapper();
632 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
633 JsonNode root = mapper.readTree(request.getReader());
634 ServiceList serviceList;
635 GridData serviceListGridData;
637 serviceList = mapper.readValue(root.get(dictionaryFields).toString(), ServiceList.class);
638 serviceListGridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
640 serviceList = mapper.readValue(root.get("serviceListDictionaryData").toString(), ServiceList.class);
641 serviceListGridData = mapper.readValue(root.get("serviceListDictionaryData").toString(), GridData.class);
643 serviceList.setServiceTransProtocol(utils.appendKey(serviceListGridData.getTransportProtocols(), option, ","));
644 serviceList.setServiceAppProtocol(utils.appendKey(serviceListGridData.getAppProtocols(), option, ","));
645 serviceList.setServiceType("SERVICE");
646 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(serviceList.getServiceName(), serviceName, ServiceList.class);
647 boolean duplicateflag = false;
648 if(!duplicateData.isEmpty()){
649 ServiceList data = (ServiceList) duplicateData.get(0);
650 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
651 serviceList.setId(data.getId());
652 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
653 (request.getParameter(operation) == null && (data.getId() != serviceList.getId()))){
654 duplicateflag = true;
657 String responseString = null;
659 if(serviceList.getId() == 0){
660 commonClassDao.save(serviceList);
662 commonClassDao.update(serviceList);
664 responseString = mapper.writeValueAsString(commonClassDao.getData(ServiceList.class));
666 responseString = duplicateResponseString;
669 return utils.getResultForApi(responseString);
671 utils.setResponseData(response, serviceListDatas, responseString);
673 }catch (Exception e){
674 utils.setErrorResponseData(response, e);
679 @RequestMapping(value={"/fw_dictionary/remove_serviceList"}, method={RequestMethod.POST})
680 public void removeServiceListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
681 DictionaryUtils utils = getDictionaryUtilsInstance();
682 utils.removeData(request, response, serviceListDatas, ServiceList.class);
685 @RequestMapping(value={"/get_ZoneData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
686 public void getZoneDictionaryEntityData(HttpServletResponse response){
687 DictionaryUtils utils = getDictionaryUtilsInstance();
688 utils.getData(response, zoneDatas, Zone.class);
691 @RequestMapping(value={"/get_ZoneDictionaryDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
692 public void getZoneDictionaryEntityDataByName(HttpServletResponse response){
693 DictionaryUtils utils = getDictionaryUtilsInstance();
694 utils.getDataByEntity(response, zoneDatas, zoneName, Zone.class);
697 @RequestMapping(value={"/fw_dictionary/save_zoneName"}, method={RequestMethod.POST})
698 public ModelAndView saveZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
699 DictionaryUtils utils = getDictionaryUtilsInstance();
701 boolean fromAPI = utils.isRequestFromAPI(request);
702 ObjectMapper mapper = new ObjectMapper();
703 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
704 JsonNode root = mapper.readTree(request.getReader());
707 zone = mapper.readValue(root.get(dictionaryFields).toString(), Zone.class);
709 zone = mapper.readValue(root.get("zoneDictionaryData").toString(), Zone.class);
711 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(zone.getZoneName(), zoneName, Zone.class);
712 boolean duplicateflag = false;
713 if(!duplicateData.isEmpty()){
714 Zone data = (Zone) duplicateData.get(0);
715 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
716 zone.setId(data.getId());
717 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
718 (request.getParameter(operation) == null && (data.getId() != zone.getId()))){
719 duplicateflag = true;
722 String responseString = null;
724 if(zone.getId() == 0){
725 commonClassDao.save(zone);
727 commonClassDao.update(zone);
729 responseString = mapper.writeValueAsString(commonClassDao.getData(Zone.class));
731 responseString = duplicateResponseString;
734 return utils.getResultForApi(responseString);
736 utils.setResponseData(response, zoneDatas, responseString);
738 }catch (Exception e){
739 utils.setErrorResponseData(response, e);
744 @RequestMapping(value={"/fw_dictionary/remove_zone"}, method={RequestMethod.POST})
745 public void removeZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
746 DictionaryUtils utils = getDictionaryUtilsInstance();
747 utils.removeData(request, response, zoneDatas, Zone.class);
750 @RequestMapping(value={"/get_TermListDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
751 public void getTermListDictionaryEntityDataByName(HttpServletResponse response){
752 DictionaryUtils utils = getDictionaryUtilsInstance();
753 utils.getDataByEntity(response, termListDictDatas, termName, TermList.class);
756 @RequestMapping(value={"/get_TermListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
757 public void getTermListDictionaryEntityData(HttpServletResponse response){
758 DictionaryUtils utils = getDictionaryUtilsInstance();
759 utils.getData(response, termListDictDatas, TermList.class);
762 @RequestMapping(value={"/fw_dictionary/save_termList"}, method={RequestMethod.POST})
763 public ModelAndView saveTermListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
764 DictionaryUtils utils = getDictionaryUtilsInstance();
766 boolean fromAPI = utils.isRequestFromAPI(request);
767 ObjectMapper mapper = new ObjectMapper();
768 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
769 JsonNode root = mapper.readTree(request.getReader());
771 TermListData termListDatas;
772 String userId = null;
774 termList = mapper.readValue(root.get(dictionaryFields).toString(), TermList.class);
775 termListDatas = mapper.readValue(root.get(dictionaryFields).toString(), TermListData.class);
778 termList = mapper.readValue(root.get("termListDictionaryData").toString(), TermList.class);
779 termListDatas = mapper.readValue(root.get("termListDictionaryData").toString(), TermListData.class);
780 userId = root.get(userid).textValue();
783 termList.setFromZones(utils.appendKey(termListDatas.getFromZoneDatas(), option, ","));
784 termList.setToZones(utils.appendKey(termListDatas.getToZoneDatas(), option, ","));
785 termList.setSrcIPList(utils.appendKey(termListDatas.getSourceListDatas(), option, ","));
786 termList.setDestIPList(utils.appendKey(termListDatas.getDestinationListDatas(), option, ","));
787 termList.setSrcPortList(utils.appendKey(termListDatas.getSourceServiceDatas(), option, ","));
788 termList.setDestPortList(utils.appendKey(termListDatas.getDestinationServiceDatas(), option, ","));
789 termList.setAction(utils.appendKey(termListDatas.getActionListDatas(), option, ","));
791 UserInfo userInfo = utils.getUserInfo(userId);
792 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(termList.getTermName(), termName, TermList.class);
793 boolean duplicateflag = false;
794 if(!duplicateData.isEmpty()){
795 TermList data = (TermList) duplicateData.get(0);
796 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
797 termList.setId(data.getId());
798 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
799 (request.getParameter(operation) == null && (data.getId() != termList.getId()))){
800 duplicateflag = true;
803 String responseString = null;
805 termList.setUserModifiedBy(userInfo);
806 if(termList.getId() == 0){
807 termList.setUserCreatedBy(userInfo);
808 commonClassDao.save(termList);
810 termList.setModifiedDate(new Date());
811 commonClassDao.update(termList);
813 responseString = mapper.writeValueAsString(commonClassDao.getData(TermList.class));
815 responseString = duplicateResponseString;
818 return utils.getResultForApi(responseString);
820 utils.setResponseData(response, termListDictDatas, responseString);
822 }catch (Exception e){
823 utils.setErrorResponseData(response, e);
828 @RequestMapping(value={"/fw_dictionary/remove_termList"}, method={RequestMethod.POST})
829 public void removeTermListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
830 DictionaryUtils utils = getDictionaryUtilsInstance();
831 utils.removeData(request, response, termListDictDatas, TermList.class);
834 //ParentList Dictionary Data
835 @RequestMapping(value={"/get_FWDictionaryListDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
836 public void getFWDictListDictionaryEntityDataByName(HttpServletResponse response){
837 DictionaryUtils utils = getDictionaryUtilsInstance();
838 utils.getDataByEntity(response, fwDictListDatas, "parentItemName", FirewallDictionaryList.class);
841 @RequestMapping(value={"/get_FWDictionaryListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
842 public void getFWDictionaryListEntityData(HttpServletResponse response){
843 DictionaryUtils utils = getDictionaryUtilsInstance();
844 utils.getData(response, fwDictListDatas, FirewallDictionaryList.class);
847 @RequestMapping(value={"/fw_dictionary/save_FWDictionaryList"}, method={RequestMethod.POST})
848 public ModelAndView saveFWDictionaryList(HttpServletRequest request, HttpServletResponse response) throws IOException{
849 DictionaryUtils utils = getDictionaryUtilsInstance();
851 boolean fromAPI = utils.isRequestFromAPI(request);
852 ObjectMapper mapper = new ObjectMapper();
853 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
854 JsonNode root = mapper.readTree(request.getReader());
855 FirewallDictionaryList fwDictList;
858 fwDictList = mapper.readValue(root.get(dictionaryFields).toString(), FirewallDictionaryList.class);
859 gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
861 fwDictList = mapper.readValue(root.get("fwDictListDictionaryData").toString(), FirewallDictionaryList.class);
862 gridData = mapper.readValue(root.get("fwDictListDictionaryData").toString(), GridData.class);
865 fwDictList.setServiceList(utils.appendKey(gridData.getAttributes(), option, ","));
866 fwDictList.setAddressList(utils.appendKey(gridData.getAlAttributes(), option, ","));
868 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(fwDictList.getParentItemName(), "parentItemName", FirewallDictionaryList.class);
869 boolean duplicateflag = false;
870 if(!duplicateData.isEmpty()){
871 FirewallDictionaryList data = (FirewallDictionaryList) duplicateData.get(0);
872 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
873 fwDictList.setId(data.getId());
874 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
875 (request.getParameter(operation) == null && (data.getId() != fwDictList.getId()))){
876 duplicateflag = true;
879 String responseString = null;
881 if(fwDictList.getId() == 0){
882 commonClassDao.save(fwDictList);
884 commonClassDao.update(fwDictList);
886 responseString = mapper.writeValueAsString(commonClassDao.getData(FirewallDictionaryList.class));
888 responseString = duplicateResponseString;
891 return utils.getResultForApi(responseString);
893 utils.setResponseData(response, fwDictListDatas, responseString);
897 utils.setErrorResponseData(response, e);
902 @RequestMapping(value={"/fw_dictionary/remove_FWDictionaryList"}, method={RequestMethod.POST})
903 public void removeFWDictionaryList(HttpServletRequest request, HttpServletResponse response) throws IOException {
904 DictionaryUtils utils = getDictionaryUtilsInstance();
905 utils.removeData(request, response, fwDictListDatas, FirewallDictionaryList.class);
909 @RequestMapping(value={"/get_TagPickerNameByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
910 public void getTagPickerNameEntityDataByName(HttpServletResponse response){
911 DictionaryUtils utils = getDictionaryUtilsInstance();
912 utils.getDataByEntity(response, fwTagPickerDatas, tagPickerName, FWTagPicker.class);
915 @RequestMapping(value={"/get_TagPickerListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
916 public void getTagPickerDictionaryEntityData(HttpServletResponse response){
917 DictionaryUtils utils = getDictionaryUtilsInstance();
918 utils.getData(response, fwTagPickerDatas, FWTagPicker.class);
921 @RequestMapping(value={"/fw_dictionary/save_fwTagPicker"}, method={RequestMethod.POST})
922 public ModelAndView saveFirewallTagPickerDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
923 DictionaryUtils utils = getDictionaryUtilsInstance();
925 boolean fromAPI = utils.isRequestFromAPI(request);
926 ObjectMapper mapper = new ObjectMapper();
927 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
928 JsonNode root = mapper.readTree(request.getReader());
929 FWTagPicker fwTagPicker;
933 fwTagPicker = mapper.readValue(root.get(dictionaryFields).toString(), FWTagPicker.class);
934 data = mapper.readValue(root.get(dictionaryFields).toString(), TagGridValues.class);
937 fwTagPicker = mapper.readValue(root.get("fwTagPickerDictionaryData").toString(), FWTagPicker.class);
938 data = mapper.readValue(root.get("fwTagPickerDictionaryData").toString(), TagGridValues.class);
939 userId = root.get(userid).textValue();
941 fwTagPicker.setTagValues(utils.appendKeyValue(data.getTags(), "#", ":"));
943 UserInfo userInfo = utils.getUserInfo(userId);
945 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(fwTagPicker.getTagPickerName(), tagPickerName, FWTagPicker.class);
946 boolean duplicateflag = false;
947 if(!duplicateData.isEmpty()){
948 FWTagPicker data1 = (FWTagPicker) duplicateData.get(0);
949 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
950 fwTagPicker.setId(data1.getId());
951 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
952 (request.getParameter(operation) == null && (data1.getId() != fwTagPicker.getId()))){
953 duplicateflag = true;
956 String responseString = null;
958 fwTagPicker.setUserModifiedBy(userInfo);
959 if(fwTagPicker.getId() == 0){
960 fwTagPicker.setUserCreatedBy(userInfo);
961 commonClassDao.save(fwTagPicker);
963 fwTagPicker.setModifiedDate(new Date());
964 commonClassDao.update(fwTagPicker);
966 responseString = mapper.writeValueAsString(commonClassDao.getData(FWTagPicker.class));
968 responseString = duplicateResponseString;
971 return utils.getResultForApi(responseString);
973 utils.setResponseData(response, fwTagPickerDatas, responseString);
977 utils.setErrorResponseData(response, e);
982 @RequestMapping(value={"/fw_dictionary/remove_tagPicker"}, method={RequestMethod.POST})
983 public void removeFirewallTagPickerDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
984 DictionaryUtils utils = getDictionaryUtilsInstance();
985 utils.removeData(request, response, fwTagPickerDatas, FWTagPicker.class);
988 @RequestMapping(value={"/get_TagListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
989 public void getTagDictionaryEntityData(HttpServletResponse response){
990 DictionaryUtils utils = getDictionaryUtilsInstance();
991 utils.getData(response, fwTagDatas, FWTag.class);
994 @RequestMapping(value={"/get_TagNameByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
995 public void getTagNameEntityDataByName(HttpServletResponse response){
996 DictionaryUtils utils = getDictionaryUtilsInstance();
997 utils.getDataByEntity(response, fwTagDatas, "fwTagName", FWTag.class);
1001 @RequestMapping(value={"/fw_dictionary/save_fwTag"}, method={RequestMethod.POST})
1002 public ModelAndView saveFirewallTagDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
1003 DictionaryUtils utils = getDictionaryUtilsInstance();
1005 boolean fromAPI = utils.isRequestFromAPI(request);
1006 ObjectMapper mapper = new ObjectMapper();
1007 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
1008 JsonNode root = mapper.readTree(request.getReader());
1010 TagGridValues tagGridValues;
1013 fwTag = mapper.readValue(root.get(dictionaryFields).toString(), FWTag.class);
1014 tagGridValues = mapper.readValue(root.get(dictionaryFields).toString(), TagGridValues.class);
1017 fwTag = mapper.readValue(root.get("fwTagDictionaryData").toString(), FWTag.class);
1018 tagGridValues = mapper.readValue(root.get("fwTagDictionaryData").toString(), TagGridValues.class);
1019 userId = root.get(userid).textValue();
1021 fwTag.setTagValues(utils.appendKey(tagGridValues.getTags(), "tags", ","));
1023 UserInfo userInfo = utils.getUserInfo(userId);
1024 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(fwTag.getFwTagName(), "fwTagName", FWTag.class);
1025 boolean duplicateflag = false;
1026 if(!duplicateData.isEmpty()){
1027 FWTag data = (FWTag) duplicateData.get(0);
1028 if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
1029 fwTag.setId(data.getId());
1030 }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
1031 (request.getParameter(operation) == null && (data.getId() != fwTag.getId()))){
1032 duplicateflag = true;
1035 String responseString = null;
1037 fwTag.setUserModifiedBy(userInfo);
1038 if(fwTag.getId() == 0){
1039 fwTag.setUserCreatedBy(userInfo);
1040 commonClassDao.save(fwTag);
1042 fwTag.setModifiedDate(new Date());
1043 commonClassDao.update(fwTag);
1045 responseString = mapper.writeValueAsString(commonClassDao.getData(FWTag.class));
1047 responseString = duplicateResponseString;
1050 return utils.getResultForApi(responseString);
1052 utils.setResponseData(response, fwTagDatas, responseString);
1055 catch (Exception e){
1056 utils.setErrorResponseData(response, e);
1061 @RequestMapping(value={"/fw_dictionary/remove_tagList"}, method={RequestMethod.POST})
1062 public void removeFirewallTagDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
1063 DictionaryUtils utils = getDictionaryUtilsInstance();
1064 utils.removeData(request, response, fwTagDatas, FWTag.class);
1068 class TagGridValues{
1069 private List<Object> tags;
1071 public List<Object> getTags() {
1075 public void setTags(List<Object> tags) {
1081 private List<Object> attributes;
1083 public List<Object> getAttributes() {
1087 public void setAttributes(List<Object> attributes) {
1088 this.attributes = attributes;
1093 private List<Object> fromZoneDatas;
1094 private List<Object> toZoneDatas;
1095 private List<Object> sourceListDatas;
1096 private List<Object> destinationListDatas;
1097 private List<Object> sourceServiceDatas;
1098 private List<Object> destinationServiceDatas;
1099 private List<Object> actionListDatas;
1100 public List<Object> getFromZoneDatas() {
1101 return fromZoneDatas;
1103 public void setFromZoneDatas(List<Object> fromZoneDatas) {
1104 this.fromZoneDatas = fromZoneDatas;
1106 public List<Object> getToZoneDatas() {
1109 public void setToZoneDatas(List<Object> toZoneDatas) {
1110 this.toZoneDatas = toZoneDatas;
1112 public List<Object> getSourceListDatas() {
1113 return sourceListDatas;
1115 public void setSourceListDatas(List<Object> sourceListDatas) {
1116 this.sourceListDatas = sourceListDatas;
1118 public List<Object> getDestinationListDatas() {
1119 return destinationListDatas;
1121 public void setDestinationListDatas(List<Object> destinationListDatas) {
1122 this.destinationListDatas = destinationListDatas;
1124 public List<Object> getSourceServiceDatas() {
1125 return sourceServiceDatas;
1127 public void setSourceServiceDatas(List<Object> sourceServiceDatas) {
1128 this.sourceServiceDatas = sourceServiceDatas;
1130 public List<Object> getDestinationServiceDatas() {
1131 return destinationServiceDatas;
1133 public void setDestinationServiceDatas(List<Object> destinationServiceDatas) {
1134 this.destinationServiceDatas = destinationServiceDatas;
1136 public List<Object> getActionListDatas() {
1137 return actionListDatas;
1139 public void setActionListDatas(List<Object> actionListDatas) {
1140 this.actionListDatas = actionListDatas;