* ============LICENSE_START=======================================================
* ONAP-PAP-REST
* ================================================================================
* ============LICENSE_START=======================================================
* ONAP-PAP-REST
* ================================================================================
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import java.io.IOException;
import java.io.PrintWriter;
import java.net.UnknownHostException;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.UnknownHostException;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
private static CommonClassDao commonClassDao;
private static String prefixListName = "prefixListName";
private static String successMessage = "success";
private static String operation = "operation";
private static CommonClassDao commonClassDao;
private static String prefixListName = "prefixListName";
private static String successMessage = "success";
private static String operation = "operation";
- private static String errorMsg = "error";
- private static String dictionaryFields ="dictionaryFields";
+ private static String errorMsg = "error";
+ private static String dictionaryFields = "dictionaryFields";
private static String duplicateResponseString = "Duplicate";
private static String utf8 = "UTF-8";
private static String applicationJsonContentType = "application / json";
private static String protocolName = "protocolName";
private static String groupNameStart = "Group_";
private static String option = "option";
private static String duplicateResponseString = "Duplicate";
private static String utf8 = "UTF-8";
private static String applicationJsonContentType = "application / json";
private static String protocolName = "protocolName";
private static String groupNameStart = "Group_";
private static String option = "option";
private static String serviceName = "serviceName";
private static String termName = "termName";
private static String userid = "userid";
private static String serviceName = "serviceName";
private static String termName = "termName";
private static String userid = "userid";
private static String fwTagPickerDatas = "fwTagPickerDictionaryDatas";
private static String fwTagDatas = "fwTagDictionaryDatas";
private static String fwTagPickerDatas = "fwTagPickerDictionaryDatas";
private static String fwTagDatas = "fwTagDictionaryDatas";
- @RequestMapping(value={"/get_PrefixListDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getPrefixListDictionaryEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_PrefixListDataByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getPrefixListDictionaryEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, pfListDatas, prefixListName, PrefixList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, pfListDatas, prefixListName, PrefixList.class);
}
- @RequestMapping(value={"/get_PrefixListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getPrefixListDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_PrefixListData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getPrefixListDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, pfListDatas, PrefixList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, pfListDatas, PrefixList.class);
}
- @RequestMapping(value={"/fw_dictionary/save_prefixList"}, method={RequestMethod.POST})
- public ModelAndView savePrefixListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_prefixList"}, method = {RequestMethod.POST})
+ public ModelAndView savePrefixListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(prefixList.getPrefixListName(), prefixListName, PrefixList.class);
+ List<Object> duplicateData = commonClassDao.checkDuplicateEntry(prefixList.getPrefixListName(),
+ prefixListName, PrefixList.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != prefixList.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != prefixList.getId()))) {
commonClassDao.update(prefixList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(PrefixList.class));
commonClassDao.update(prefixList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(PrefixList.class));
- @RequestMapping(value={"/fw_dictionary/remove_PrefixList"}, method={RequestMethod.POST})
- public void removePrefixListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/remove_PrefixList"}, method = {RequestMethod.POST})
+ public void removePrefixListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, pfListDatas, PrefixList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, pfListDatas, PrefixList.class);
}
- @RequestMapping(value={"/fw_dictionary/validate_prefixList"}, method={RequestMethod.POST})
- public void validatePrefixListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/validate_prefixList"}, method = {RequestMethod.POST})
+ public void validatePrefixListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
JsonNode root = mapper.readTree(request.getReader());
PrefixList prefixList = mapper.readValue(root.get("prefixListDictionaryData").toString(), PrefixList.class);
String responseValidation = successMessage;
JsonNode root = mapper.readTree(request.getReader());
PrefixList prefixList = mapper.readValue(root.get("prefixListDictionaryData").toString(), PrefixList.class);
String responseValidation = successMessage;
PrintWriter out = response.getWriter();
JSONObject j = new JSONObject("{result: " + responseValidation + "}");
out.write(j.toString());
PrintWriter out = response.getWriter();
JSONObject j = new JSONObject("{result: " + responseValidation + "}");
out.write(j.toString());
- @RequestMapping(value={"/get_PortListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getPortListDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_PortListData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getPortListDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, portListDatas, PortList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, portListDatas, PortList.class);
}
- @RequestMapping(value={"/fw_dictionary/save_portName"}, method={RequestMethod.POST})
- public ModelAndView savePortListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_portName"}, method = {RequestMethod.POST})
+ public ModelAndView savePortListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNode root = mapper.readTree(request.getReader());
PortList portList;
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNode root = mapper.readTree(request.getReader());
PortList portList;
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(portList.getPortName(), "portName", PortList.class);
+ List<Object> duplicateData =
+ commonClassDao.checkDuplicateEntry(portList.getPortName(), "portName", PortList.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != portList.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != portList.getId()))) {
commonClassDao.update(portList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(PortList.class));
commonClassDao.update(portList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(PortList.class));
- @RequestMapping(value={"/fw_dictionary/remove_PortList"}, method={RequestMethod.POST})
- public void removePortListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/remove_PortList"}, method = {RequestMethod.POST})
+ public void removePortListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, portListDatas, PortList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, portListDatas, PortList.class);
}
- @RequestMapping(value={"/get_ProtocolListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getProtocolListDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_ProtocolListData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getProtocolListDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, protocolListDatas, ProtocolList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, protocolListDatas, ProtocolList.class);
}
- @RequestMapping(value={"/get_ProtocolListDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getProtocolListDictionaryEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_ProtocolListDataByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getProtocolListDictionaryEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, protocolListDatas, protocolName, ProtocolList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, protocolListDatas, protocolName, ProtocolList.class);
}
- @RequestMapping(value={"/fw_dictionary/save_protocolList"}, method={RequestMethod.POST})
- public ModelAndView saveProtocolListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_protocolList"}, method = {RequestMethod.POST})
+ public ModelAndView saveProtocolListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNode root = mapper.readTree(request.getReader());
ProtocolList protocolList;
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNode root = mapper.readTree(request.getReader());
ProtocolList protocolList;
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(protocolList.getProtocolName(), protocolName, ProtocolList.class);
+ List<Object> duplicateData = commonClassDao.checkDuplicateEntry(protocolList.getProtocolName(),
+ protocolName, ProtocolList.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != protocolList.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != protocolList.getId()))) {
commonClassDao.update(protocolList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(ProtocolList.class));
commonClassDao.update(protocolList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(ProtocolList.class));
- @RequestMapping(value={"/fw_dictionary/remove_protocol"}, method={RequestMethod.POST})
- public void removeProtocolListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/remove_protocol"}, method = {RequestMethod.POST})
+ public void removeProtocolListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, protocolListDatas, ProtocolList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, protocolListDatas, ProtocolList.class);
}
- @RequestMapping(value={"/get_AddressGroupDictionaryDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getAddressGroupDictionaryEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_AddressGroupDictionaryDataByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getAddressGroupDictionaryEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, addressGroupDatas, "name", AddressGroup.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, addressGroupDatas, "name", AddressGroup.class);
}
- @RequestMapping(value={"/get_AddressGroupData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getAddressGroupDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_AddressGroupData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getAddressGroupDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, addressGroupDatas, AddressGroup.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, addressGroupDatas, AddressGroup.class);
}
- @RequestMapping(value={"/fw_dictionary/save_addressGroup"}, method={RequestMethod.POST})
- public ModelAndView saveAddressGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_addressGroup"}, method = {RequestMethod.POST})
+ public ModelAndView saveAddressGroupDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
addressGroup = mapper.readValue(root.get(dictionaryFields).toString(), AddressGroup.class);
gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
addressGroup = mapper.readValue(root.get(dictionaryFields).toString(), AddressGroup.class);
gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
addressGroup = mapper.readValue(root.get("addressGroupDictionaryData").toString(), AddressGroup.class);
gridData = mapper.readValue(root.get("addressGroupDictionaryData").toString(), GridData.class);
}
addressGroup = mapper.readValue(root.get("addressGroupDictionaryData").toString(), AddressGroup.class);
gridData = mapper.readValue(root.get("addressGroupDictionaryData").toString(), GridData.class);
}
- if(!addressGroup.getGroupName().startsWith(groupNameStart)){
- String groupName = groupNameStart+addressGroup.getGroupName();
+ if (!addressGroup.getGroupName().startsWith(groupNameStart)) {
+ String groupName = groupNameStart + addressGroup.getGroupName();
addressGroup.setGroupName(groupName);
}
addressGroup.setServiceList(utils.appendKey(gridData.getAttributes(), option, ","));
addressGroup.setGroupName(groupName);
}
addressGroup.setServiceList(utils.appendKey(gridData.getAttributes(), option, ","));
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(addressGroup.getGroupName(), "name", AddressGroup.class);
+ List<Object> duplicateData =
+ commonClassDao.checkDuplicateEntry(addressGroup.getGroupName(), "name", AddressGroup.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != addressGroup.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != addressGroup.getId()))) {
commonClassDao.update(addressGroup);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(AddressGroup.class));
commonClassDao.update(addressGroup);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(AddressGroup.class));
- @RequestMapping(value={"/fw_dictionary/remove_AddressGroup"}, method={RequestMethod.POST})
- public void removeAddressGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/remove_AddressGroup"}, method = {RequestMethod.POST})
+ public void removeAddressGroupDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, addressGroupDatas, AddressGroup.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, addressGroupDatas, AddressGroup.class);
}
- @RequestMapping(value={"/get_ActionListDictionaryDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getActionListDictionaryEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_ActionListDictionaryDataByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getActionListDictionaryEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, actionListDatas, "actionName", ActionList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, actionListDatas, "actionName", ActionList.class);
}
- @RequestMapping(value={"/get_ActionListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getActionListDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_ActionListData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getActionListDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, actionListDatas, ActionList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, actionListDatas, ActionList.class);
}
- @RequestMapping(value={"/fw_dictionary/save_ActionList"}, method={RequestMethod.POST})
- public ModelAndView saveActionListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_ActionList"}, method = {RequestMethod.POST})
+ public ModelAndView saveActionListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(actionList.getActionName(), "actionName", ActionList.class);
+ List<Object> duplicateData =
+ commonClassDao.checkDuplicateEntry(actionList.getActionName(), "actionName", ActionList.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != actionList.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != actionList.getId()))) {
commonClassDao.update(actionList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(ActionList.class));
commonClassDao.update(actionList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(ActionList.class));
- @RequestMapping(value={"/fw_dictionary/remove_ActionList"}, method={RequestMethod.POST})
- public void removeActionListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/remove_ActionList"}, method = {RequestMethod.POST})
+ public void removeActionListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, actionListDatas, ActionList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, actionListDatas, ActionList.class);
}
- @RequestMapping(value={"/get_ServiceGroupData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getServiceGroupDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_ServiceGroupData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getServiceGroupDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, serviceGroupDatas, GroupServiceList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, serviceGroupDatas, GroupServiceList.class);
}
- @RequestMapping(value={"/get_ServiceGroupDictionaryDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getServiceGroupDictionaryEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_ServiceGroupDictionaryDataByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getServiceGroupDictionaryEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, serviceGroupDatas, "name", GroupServiceList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, serviceGroupDatas, "name", GroupServiceList.class);
}
- @RequestMapping(value={"/fw_dictionary/save_serviceGroup"}, method={RequestMethod.POST})
- public ModelAndView saveServiceGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_serviceGroup"}, method = {RequestMethod.POST})
+ public ModelAndView saveServiceGroupDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
groupServiceList = mapper.readValue(root.get(dictionaryFields).toString(), GroupServiceList.class);
gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
groupServiceList = mapper.readValue(root.get(dictionaryFields).toString(), GroupServiceList.class);
gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
- if(!groupServiceList.getGroupName().startsWith(groupNameStart)){
- String groupName = groupNameStart+groupServiceList.getGroupName();
+ if (!groupServiceList.getGroupName().startsWith(groupNameStart)) {
+ String groupName = groupNameStart + groupServiceList.getGroupName();
groupServiceList.setGroupName(groupName);
}
groupServiceList.setServiceList(utils.appendKey(gridData.getAttributes(), option, ","));
groupServiceList.setGroupName(groupName);
}
groupServiceList.setServiceList(utils.appendKey(gridData.getAttributes(), option, ","));
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(groupServiceList.getGroupName(), "name", GroupServiceList.class);
+ List<Object> duplicateData =
+ commonClassDao.checkDuplicateEntry(groupServiceList.getGroupName(), "name", GroupServiceList.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != groupServiceList.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != groupServiceList.getId()))) {
commonClassDao.update(groupServiceList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(GroupServiceList.class));
commonClassDao.update(groupServiceList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(GroupServiceList.class));
- @RequestMapping(value={"/fw_dictionary/remove_serviceGroup"}, method={RequestMethod.POST})
- public void removeServiceGroupDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/remove_serviceGroup"}, method = {RequestMethod.POST})
+ public void removeServiceGroupDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, serviceGroupDatas, GroupServiceList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, serviceGroupDatas, GroupServiceList.class);
}
- @RequestMapping(value={"/get_SecurityZoneDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getSecurityZoneDictionaryEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_SecurityZoneDataByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getSecurityZoneDictionaryEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, securityZoneDatas, zoneName, SecurityZone.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, securityZoneDatas, zoneName, SecurityZone.class);
}
- @RequestMapping(value={"/get_SecurityZoneData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getSecurityZoneDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_SecurityZoneData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getSecurityZoneDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, securityZoneDatas, SecurityZone.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, securityZoneDatas, SecurityZone.class);
}
- @RequestMapping(value={"/fw_dictionary/save_securityZone"}, method={RequestMethod.POST})
- public ModelAndView saveSecurityZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_securityZone"}, method = {RequestMethod.POST})
+ public ModelAndView saveSecurityZoneDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNode root = mapper.readTree(request.getReader());
SecurityZone securityZone;
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNode root = mapper.readTree(request.getReader());
SecurityZone securityZone;
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(securityZone.getZoneName(), zoneName, SecurityZone.class);
+ List<Object> duplicateData =
+ commonClassDao.checkDuplicateEntry(securityZone.getZoneName(), zoneName, SecurityZone.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != securityZone.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != securityZone.getId()))) {
commonClassDao.update(securityZone);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(SecurityZone.class));
commonClassDao.update(securityZone);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(SecurityZone.class));
- @RequestMapping(value={"/fw_dictionary/remove_securityZone"}, method={RequestMethod.POST})
- public void removeSecurityZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
+ @RequestMapping(value = {"/fw_dictionary/remove_securityZone"}, method = {RequestMethod.POST})
+ public void removeSecurityZoneDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, securityZoneDatas, SecurityZone.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, securityZoneDatas, SecurityZone.class);
}
-
- @RequestMapping(value={"/get_ServiceListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getServiceListDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_ServiceListData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getServiceListDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, serviceListDatas, ServiceList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, serviceListDatas, ServiceList.class);
}
- @RequestMapping(value={"/get_ServiceListDictionaryDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getServiceListDictionaryEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_ServiceListDictionaryDataByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getServiceListDictionaryEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, serviceListDatas, serviceName, ServiceList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, serviceListDatas, serviceName, ServiceList.class);
}
- @RequestMapping(value={"/fw_dictionary/save_serviceList"}, method={RequestMethod.POST})
- public ModelAndView saveServiceListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_serviceList"}, method = {RequestMethod.POST})
+ public ModelAndView saveServiceListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
serviceList = mapper.readValue(root.get(dictionaryFields).toString(), ServiceList.class);
serviceListGridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
serviceList = mapper.readValue(root.get(dictionaryFields).toString(), ServiceList.class);
serviceListGridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
- serviceList.setServiceTransProtocol(utils.appendKey(serviceListGridData.getTransportProtocols(), option, ","));
+ serviceList
+ .setServiceTransProtocol(utils.appendKey(serviceListGridData.getTransportProtocols(), option, ","));
serviceList.setServiceAppProtocol(utils.appendKey(serviceListGridData.getAppProtocols(), option, ","));
serviceList.setServiceType("SERVICE");
serviceList.setServiceAppProtocol(utils.appendKey(serviceListGridData.getAppProtocols(), option, ","));
serviceList.setServiceType("SERVICE");
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(serviceList.getServiceName(), serviceName, ServiceList.class);
+ List<Object> duplicateData =
+ commonClassDao.checkDuplicateEntry(serviceList.getServiceName(), serviceName, ServiceList.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != serviceList.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != serviceList.getId()))) {
commonClassDao.update(serviceList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(ServiceList.class));
commonClassDao.update(serviceList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(ServiceList.class));
- @RequestMapping(value={"/fw_dictionary/remove_serviceList"}, method={RequestMethod.POST})
- public void removeServiceListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
+ @RequestMapping(value = {"/fw_dictionary/remove_serviceList"}, method = {RequestMethod.POST})
+ public void removeServiceListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, serviceListDatas, ServiceList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, serviceListDatas, ServiceList.class);
}
- @RequestMapping(value={"/get_ZoneData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getZoneDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_ZoneData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getZoneDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, zoneDatas, Zone.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, zoneDatas, Zone.class);
}
- @RequestMapping(value={"/get_ZoneDictionaryDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getZoneDictionaryEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_ZoneDictionaryDataByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getZoneDictionaryEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, zoneDatas, zoneName, Zone.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, zoneDatas, zoneName, Zone.class);
}
- @RequestMapping(value={"/fw_dictionary/save_zoneName"}, method={RequestMethod.POST})
- public ModelAndView saveZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_zoneName"}, method = {RequestMethod.POST})
+ public ModelAndView saveZoneDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(zone.getZoneName(), zoneName, Zone.class);
+ List<Object> duplicateData = commonClassDao.checkDuplicateEntry(zone.getZoneName(), zoneName, Zone.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != zone.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != zone.getId()))) {
commonClassDao.update(zone);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(Zone.class));
commonClassDao.update(zone);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(Zone.class));
- @RequestMapping(value={"/fw_dictionary/remove_zone"}, method={RequestMethod.POST})
- public void removeZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/remove_zone"}, method = {RequestMethod.POST})
+ public void removeZoneDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, zoneDatas, Zone.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, zoneDatas, Zone.class);
}
- @RequestMapping(value={"/get_TermListDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getTermListDictionaryEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_TermListDataByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getTermListDictionaryEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, termListDictDatas, termName, TermList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, termListDictDatas, termName, TermList.class);
}
- @RequestMapping(value={"/get_TermListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getTermListDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_TermListData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getTermListDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, termListDictDatas, TermList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, termListDictDatas, TermList.class);
}
- @RequestMapping(value={"/fw_dictionary/save_termList"}, method={RequestMethod.POST})
- public ModelAndView saveTermListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_termList"}, method = {RequestMethod.POST})
+ public ModelAndView saveTermListDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
termList = mapper.readValue(root.get(dictionaryFields).toString(), TermList.class);
termListDatas = mapper.readValue(root.get(dictionaryFields).toString(), TermListData.class);
userId = "API";
termList = mapper.readValue(root.get(dictionaryFields).toString(), TermList.class);
termListDatas = mapper.readValue(root.get(dictionaryFields).toString(), TermListData.class);
userId = "API";
termList = mapper.readValue(root.get("termListDictionaryData").toString(), TermList.class);
termListDatas = mapper.readValue(root.get("termListDictionaryData").toString(), TermListData.class);
userId = root.get(userid).textValue();
termList = mapper.readValue(root.get("termListDictionaryData").toString(), TermList.class);
termListDatas = mapper.readValue(root.get("termListDictionaryData").toString(), TermListData.class);
userId = root.get(userid).textValue();
termList.setAction(utils.appendKey(termListDatas.getActionListDatas(), option, ","));
UserInfo userInfo = utils.getUserInfo(userId);
termList.setAction(utils.appendKey(termListDatas.getActionListDatas(), option, ","));
UserInfo userInfo = utils.getUserInfo(userId);
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(termList.getTermName(), termName, TermList.class);
+ List<Object> duplicateData =
+ commonClassDao.checkDuplicateEntry(termList.getTermName(), termName, TermList.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != termList.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != termList.getId()))) {
termList.setModifiedDate(new Date());
commonClassDao.update(termList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(TermList.class));
termList.setModifiedDate(new Date());
commonClassDao.update(termList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(TermList.class));
- @RequestMapping(value={"/fw_dictionary/remove_termList"}, method={RequestMethod.POST})
- public void removeTermListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/remove_termList"}, method = {RequestMethod.POST})
+ public void removeTermListDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, termListDictDatas, TermList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, termListDictDatas, TermList.class);
}
- //ParentList Dictionary Data
- @RequestMapping(value={"/get_FWDictionaryListDataByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getFWDictListDictionaryEntityDataByName(HttpServletResponse response){
+ // ParentList Dictionary Data
+ @RequestMapping(
+ value = {"/get_FWDictionaryListDataByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getFWDictListDictionaryEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, fwDictListDatas, "parentItemName", FirewallDictionaryList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, fwDictListDatas, "parentItemName", FirewallDictionaryList.class);
}
- @RequestMapping(value={"/get_FWDictionaryListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getFWDictionaryListEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_FWDictionaryListData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getFWDictionaryListEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, fwDictListDatas, FirewallDictionaryList.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, fwDictListDatas, FirewallDictionaryList.class);
}
- @RequestMapping(value={"/fw_dictionary/save_FWDictionaryList"}, method={RequestMethod.POST})
- public ModelAndView saveFWDictionaryList(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_FWDictionaryList"}, method = {RequestMethod.POST})
+ public ModelAndView saveFWDictionaryList(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
fwDictList = mapper.readValue(root.get(dictionaryFields).toString(), FirewallDictionaryList.class);
gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
} else {
fwDictList = mapper.readValue(root.get(dictionaryFields).toString(), FirewallDictionaryList.class);
gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
} else {
gridData = mapper.readValue(root.get("fwDictListDictionaryData").toString(), GridData.class);
}
fwDictList.setServiceList(utils.appendKey(gridData.getAttributes(), option, ","));
fwDictList.setAddressList(utils.appendKey(gridData.getAlAttributes(), option, ","));
gridData = mapper.readValue(root.get("fwDictListDictionaryData").toString(), GridData.class);
}
fwDictList.setServiceList(utils.appendKey(gridData.getAttributes(), option, ","));
fwDictList.setAddressList(utils.appendKey(gridData.getAlAttributes(), option, ","));
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(fwDictList.getParentItemName(), "parentItemName", FirewallDictionaryList.class);
+ List<Object> duplicateData = commonClassDao.checkDuplicateEntry(fwDictList.getParentItemName(),
+ "parentItemName", FirewallDictionaryList.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != fwDictList.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != fwDictList.getId()))) {
commonClassDao.update(fwDictList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(FirewallDictionaryList.class));
commonClassDao.update(fwDictList);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(FirewallDictionaryList.class));
public void removeFWDictionaryList(HttpServletRequest request, HttpServletResponse response) throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, fwDictListDatas, FirewallDictionaryList.class);
}
public void removeFWDictionaryList(HttpServletRequest request, HttpServletResponse response) throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, fwDictListDatas, FirewallDictionaryList.class);
}
-
- @RequestMapping(value={"/get_TagPickerNameByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getTagPickerNameEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_TagPickerNameByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getTagPickerNameEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, fwTagPickerDatas, tagPickerName, FWTagPicker.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, fwTagPickerDatas, tagPickerName, FWTagPicker.class);
}
- @RequestMapping(value={"/get_TagPickerListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getTagPickerDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_TagPickerListData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getTagPickerDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, fwTagPickerDatas, FWTagPicker.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, fwTagPickerDatas, FWTagPicker.class);
}
- @RequestMapping(value={"/fw_dictionary/save_fwTagPicker"}, method={RequestMethod.POST})
- public ModelAndView saveFirewallTagPickerDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_fwTagPicker"}, method = {RequestMethod.POST})
+ public ModelAndView saveFirewallTagPickerDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(fwTagPicker.getTagPickerName(), tagPickerName, FWTagPicker.class);
+ List<Object> duplicateData = commonClassDao.checkDuplicateEntry(fwTagPicker.getTagPickerName(),
+ tagPickerName, FWTagPicker.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data1.getId() != fwTagPicker.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data1.getId() != fwTagPicker.getId()))) {
fwTagPicker.setModifiedDate(new Date());
commonClassDao.update(fwTagPicker);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(FWTagPicker.class));
fwTagPicker.setModifiedDate(new Date());
commonClassDao.update(fwTagPicker);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(FWTagPicker.class));
- @RequestMapping(value={"/fw_dictionary/remove_tagPicker"}, method={RequestMethod.POST})
- public void removeFirewallTagPickerDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
+ @RequestMapping(value = {"/fw_dictionary/remove_tagPicker"}, method = {RequestMethod.POST})
+ public void removeFirewallTagPickerDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, fwTagPickerDatas, FWTagPicker.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, fwTagPickerDatas, FWTagPicker.class);
}
- @RequestMapping(value={"/get_TagListData"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getTagDictionaryEntityData(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_TagListData"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getTagDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, fwTagDatas, FWTag.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getData(response, fwTagDatas, FWTag.class);
}
- @RequestMapping(value={"/get_TagNameByName"}, method={RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
- public void getTagNameEntityDataByName(HttpServletResponse response){
+ @RequestMapping(
+ value = {"/get_TagNameByName"},
+ method = {RequestMethod.GET},
+ produces = MediaType.APPLICATION_JSON_VALUE)
+ public void getTagNameEntityDataByName(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, fwTagDatas, "fwTagName", FWTag.class);
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.getDataByEntity(response, fwTagDatas, "fwTagName", FWTag.class);
}
-
- @RequestMapping(value={"/fw_dictionary/save_fwTag"}, method={RequestMethod.POST})
- public ModelAndView saveFirewallTagDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/save_fwTag"}, method = {RequestMethod.POST})
+ public ModelAndView saveFirewallTagDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
DictionaryUtils utils = getDictionaryUtilsInstance();
try {
boolean fromAPI = utils.isRequestFromAPI(request);
fwTag = mapper.readValue(root.get(dictionaryFields).toString(), FWTag.class);
tagGridValues = mapper.readValue(root.get(dictionaryFields).toString(), TagGridValues.class);
userId = "API";
fwTag = mapper.readValue(root.get(dictionaryFields).toString(), FWTag.class);
tagGridValues = mapper.readValue(root.get(dictionaryFields).toString(), TagGridValues.class);
userId = "API";
fwTag = mapper.readValue(root.get("fwTagDictionaryData").toString(), FWTag.class);
tagGridValues = mapper.readValue(root.get("fwTagDictionaryData").toString(), TagGridValues.class);
userId = root.get(userid).textValue();
fwTag = mapper.readValue(root.get("fwTagDictionaryData").toString(), FWTag.class);
tagGridValues = mapper.readValue(root.get("fwTagDictionaryData").toString(), TagGridValues.class);
userId = root.get(userid).textValue();
fwTag.setTagValues(utils.appendKey(tagGridValues.getTags(), "tags", ","));
UserInfo userInfo = utils.getUserInfo(userId);
fwTag.setTagValues(utils.appendKey(tagGridValues.getTags(), "tags", ","));
UserInfo userInfo = utils.getUserInfo(userId);
- List<Object> duplicateData = commonClassDao.checkDuplicateEntry(fwTag.getFwTagName(), "fwTagName", FWTag.class);
+ List<Object> duplicateData =
+ commonClassDao.checkDuplicateEntry(fwTag.getFwTagName(), "fwTagName", FWTag.class);
- }else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) ||
- (request.getParameter(operation) == null && (data.getId() != fwTag.getId()))){
+ } else if ((request.getParameter(operation) != null
+ && !"update".equals(request.getParameter(operation)))
+ || (request.getParameter(operation) == null && (data.getId() != fwTag.getId()))) {
fwTag.setModifiedDate(new Date());
commonClassDao.update(fwTag);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(FWTag.class));
fwTag.setModifiedDate(new Date());
commonClassDao.update(fwTag);
}
responseString = mapper.writeValueAsString(commonClassDao.getData(FWTag.class));
- @RequestMapping(value={"/fw_dictionary/remove_tagList"}, method={RequestMethod.POST})
- public void removeFirewallTagDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+ @RequestMapping(value = {"/fw_dictionary/remove_tagList"}, method = {RequestMethod.POST})
+ public void removeFirewallTagDictionary(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, fwTagDatas, FWTag.class);
}
}
DictionaryUtils utils = getDictionaryUtilsInstance();
utils.removeData(request, response, fwTagDatas, FWTag.class);
}
}
private List<Object> fromZoneDatas;
private List<Object> toZoneDatas;
private List<Object> sourceListDatas;
private List<Object> fromZoneDatas;
private List<Object> toZoneDatas;
private List<Object> sourceListDatas;
private List<Object> sourceServiceDatas;
private List<Object> destinationServiceDatas;
private List<Object> actionListDatas;
private List<Object> sourceServiceDatas;
private List<Object> destinationServiceDatas;
private List<Object> actionListDatas;
public void setSourceListDatas(List<Object> sourceListDatas) {
this.sourceListDatas = sourceListDatas;
}
public void setSourceListDatas(List<Object> sourceListDatas) {
this.sourceListDatas = sourceListDatas;
}
public void setDestinationListDatas(List<Object> destinationListDatas) {
this.destinationListDatas = destinationListDatas;
}
public void setDestinationListDatas(List<Object> destinationListDatas) {
this.destinationListDatas = destinationListDatas;
}
public void setSourceServiceDatas(List<Object> sourceServiceDatas) {
this.sourceServiceDatas = sourceServiceDatas;
}
public void setSourceServiceDatas(List<Object> sourceServiceDatas) {
this.sourceServiceDatas = sourceServiceDatas;
}
public void setDestinationServiceDatas(List<Object> destinationServiceDatas) {
this.destinationServiceDatas = destinationServiceDatas;
}
public void setDestinationServiceDatas(List<Object> destinationServiceDatas) {
this.destinationServiceDatas = destinationServiceDatas;
}
public void setActionListDatas(List<Object> actionListDatas) {
this.actionListDatas = actionListDatas;
}
public void setActionListDatas(List<Object> actionListDatas) {
this.actionListDatas = actionListDatas;
}