Index: standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/AdminMenuController.java =================================================================== diff -u -rea3855e268c8ddec2ae620e3ae931f2940ff63dc -r23d3d53f9cdbbce89052b18d5fce8c076b9c02f7 --- standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/AdminMenuController.java (.../AdminMenuController.java) (revision ea3855e268c8ddec2ae620e3ae931f2940ff63dc) +++ standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/AdminMenuController.java (.../AdminMenuController.java) (revision 23d3d53f9cdbbce89052b18d5fce8c076b9c02f7) @@ -36,39 +36,147 @@ private final Logger logger = LoggerFactory.getLogger(this.getClass()); /** - * 자식노드를 요청한다. + * 노드를 추가한다. * * @param jsTreeHibernateDTO * @param model - * @param request - * @return String + * @param bindingResult + * @return * @throws JsonProcessingException + * @throws IllegalAccessException + * @throws InstantiationException */ - @IncludedInfo(name = "RivalWar Admin Menu", listUrl = "/api/rivalWar/ROLE_ADMIN/menu/getJsTreeView.do", order = 7000, gid = 7313) - @RequestMapping("/getJsTreeView.do") - public String jsTreeSpringHibernate() { - return "egovframework/rivalWar/api/menu/admin/JsTreeView"; + @ResponseBody + @RequestMapping(value = "/addMenu.do", method = RequestMethod.POST) + public ModelAndView addMenu(@Validated(value = AddNode.class) MenuDTO jsTreeHibernateDTO, + BindingResult bindingResult, ModelMap model) throws Exception { + if (bindingResult.hasErrors()) + throw new RuntimeException(); + + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", menuService.addMenu(jsTreeHibernateDTO)); + return modelAndView; } + /** + * 노드를 삭제한다. + * + * @param jsTreeHibernateDTO + * @param model + * @param bindingResult + * @return + * @throws JsonProcessingException + */ @ResponseBody - @RequestMapping(value = "/getChildMenu.do", method = RequestMethod.GET) - public ModelAndView getChildMenu(MenuDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request) - throws Exception { + @RequestMapping(value = "/removeMenu.do", method = RequestMethod.POST) + public ModelAndView removeNode(@Validated(value = RemoveNode.class) MenuDTO jsTreeHibernateDTO, + BindingResult bindingResult, ModelMap model) throws Exception { + if (bindingResult.hasErrors()) + throw new RuntimeException(); - ParameterParser parser = new ParameterParser(request); + jsTreeHibernateDTO.setStatus(menuService.removeMenu(jsTreeHibernateDTO)); + setJsonDefaultSetting(jsTreeHibernateDTO); - logger.info("jrebel reload test"); + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", jsTreeHibernateDTO); + return modelAndView; + } - if (parser.getInt("c_id") <= 0) { + private void setJsonDefaultSetting(MenuDTO jsTreeHibernateDTO) { + long defaultSettingValue = 0; + jsTreeHibernateDTO.setC_parentid(defaultSettingValue); + jsTreeHibernateDTO.setC_position(defaultSettingValue); + jsTreeHibernateDTO.setC_left(defaultSettingValue); + jsTreeHibernateDTO.setC_right(defaultSettingValue); + jsTreeHibernateDTO.setC_level(defaultSettingValue); + jsTreeHibernateDTO.setRef(defaultSettingValue); + } + + /** + * 노드를 변경한다. + * + * @param jsTreeHibernateDTO + * @param model + * @param bindingResult + * @return + * @throws JsonProcessingException + */ + @ResponseBody + @RequestMapping(value = "/alterMenu.do", method = RequestMethod.POST) + public ModelAndView alterNode(@Validated(value = AlterNode.class) MenuDTO jsTreeHibernateDTO, + BindingResult bindingResult, ModelMap model) throws Exception { + if (bindingResult.hasErrors()){ throw new RuntimeException(); } - jsTreeHibernateDTO.setWhere("c_parentid", new Long(parser.get("c_id"))); - List list = menuService.getChildMenu(jsTreeHibernateDTO); + jsTreeHibernateDTO.setC_title(Util_TitleChecker.StringReplace(jsTreeHibernateDTO.getC_title())); + jsTreeHibernateDTO.setStatus(menuService.alterMenu(jsTreeHibernateDTO)); + setJsonDefaultSetting(jsTreeHibernateDTO); + ModelAndView modelAndView = new ModelAndView("jsonView"); - modelAndView.addObject("result", list); + modelAndView.addObject("result", jsTreeHibernateDTO); return modelAndView; } + /** + * 노드의 타입을 변경한다. + * + * @param jsTreeHibernateDTO + * @param model + * @param bindingResult + * @return + * @throws JsonProcessingException + */ + @ResponseBody + @RequestMapping(value = "/alterMenuType.do", method = RequestMethod.POST) + public ModelAndView alterNodeType(@Validated(value = AlterNodeType.class) MenuDTO jsTreeHibernateDTO, + BindingResult bindingResult, ModelMap model) throws Exception { + if (bindingResult.hasErrors()) + throw new RuntimeException(); + + menuService.alterMenuType(jsTreeHibernateDTO); + setJsonDefaultSetting(jsTreeHibernateDTO); + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", jsTreeHibernateDTO); + return modelAndView; + } + + /** + * 노드를 이동한다. + * + * @param jsTreeHibernateDTO + * @param model + * @param request + * @return + * @throws JsonProcessingException + * @throws ReflectiveOperationException + * @throws IllegalAccessException + * @throws InstantiationException + */ + @ResponseBody + @RequestMapping(value = "/moveMenu.do", method = RequestMethod.POST) + public ModelAndView moveNode(@Validated(value = MoveNode.class) MenuDTO jsTreeHibernateDTO, + BindingResult bindingResult, ModelMap model, HttpServletRequest request) throws Exception { + if (bindingResult.hasErrors()) + throw new RuntimeException(); + + menuService.moveMenu(jsTreeHibernateDTO, request); + setJsonDefaultSetting(jsTreeHibernateDTO); + + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", jsTreeHibernateDTO); + return modelAndView; + } + + @ResponseBody + @RequestMapping(value = "/analyzeMenu.do", method = RequestMethod.GET) + public ModelAndView getChildNode(ModelMap model) { + model.addAttribute("analyzeResult", ""); + + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", "ture"); + return modelAndView; + } + } Index: standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/AnonymousMenuController.java =================================================================== diff -u -rea3855e268c8ddec2ae620e3ae931f2940ff63dc -r23d3d53f9cdbbce89052b18d5fce8c076b9c02f7 --- standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/AnonymousMenuController.java (.../AnonymousMenuController.java) (revision ea3855e268c8ddec2ae620e3ae931f2940ff63dc) +++ standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/AnonymousMenuController.java (.../AnonymousMenuController.java) (revision 23d3d53f9cdbbce89052b18d5fce8c076b9c02f7) @@ -4,6 +4,7 @@ import com.google.common.collect.Maps; import egovframework.api.rivalWar.menu.service.MenuService; import egovframework.api.rivalWar.menu.vo.MenuDTO; +import egovframework.com.cmm.annotation.IncludedInfo; import egovframework.com.ext.jstree.springiBatis.core.util.Util_TitleChecker; import egovframework.com.ext.jstree.springiBatis.core.validation.group.*; import egovframework.com.ext.jstree.support.mvc.GenericAbstractController; @@ -34,8 +35,49 @@ private final Logger logger = LoggerFactory.getLogger(this.getClass()); + /** + * 자식노드를 요청한다. + * + * @param jsTreeHibernateDTO + * @param model + * @param request + * @return String + * @throws JsonProcessingException + */ + @IncludedInfo(name = "RivalWar Admin Menu", listUrl = "/api/rivalWar/menu/getJsTreeView.do", order = 7000, gid = 7313) + @RequestMapping("/getJsTreeView.do") + public String jsTreeSpringHibernate() { + return "egovframework/api/rivalWar/menu/JsTreeView"; + } + /** + * 노드를 검색한다. + * + * @param jsTreeHibernateDTO + * @param model + * @param request + * @return + * @throws JsonProcessingException + */ @ResponseBody + @RequestMapping(value = "/searchMenu.do", method = RequestMethod.GET) + public ModelAndView searchNode(MenuDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request) + throws Exception { + + ParameterParser parser = new ParameterParser(request); + + if (!StringUtils.hasText(request.getParameter("searchString"))) { + throw new RuntimeException(); + } + + jsTreeHibernateDTO.setWhereLike("c_title", parser.get("parser")); + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", menuService.searchMenu(jsTreeHibernateDTO)); + return modelAndView; + } + + + @ResponseBody @RequestMapping(value = "/getPaginatedChildMenu.do", method = RequestMethod.GET) public ModelAndView getPaginatedChildMenu(MenuDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request) throws Exception { @@ -76,6 +118,27 @@ } @ResponseBody + @RequestMapping(value = "/getChildMenu.do", method = RequestMethod.GET) + public ModelAndView getChildMenu(MenuDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request) + throws Exception { + + ParameterParser parser = new ParameterParser(request); + + logger.info("jrebel reload test"); + + if (parser.getInt("c_id") <= 0) { + throw new RuntimeException(); + } + + jsTreeHibernateDTO.setWhere("c_parentid", new Long(parser.get("c_id"))); + List list = menuService.getChildMenu(jsTreeHibernateDTO); + + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", list); + return modelAndView; + } + + @ResponseBody @RequestMapping(value = "/getRootMenuCategories.do", method = RequestMethod.GET) public ModelAndView getRootMenuCategories(MenuDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request) throws Exception { @@ -117,175 +180,4 @@ return modelAndView; } - - - /** - * 노드를 검색한다. - * - * @param jsTreeHibernateDTO - * @param model - * @param request - * @return - * @throws JsonProcessingException - */ - @ResponseBody - @RequestMapping(value = "/searchMenu.do", method = RequestMethod.GET) - public ModelAndView searchNode(MenuDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request) - throws Exception { - - ParameterParser parser = new ParameterParser(request); - - if (!StringUtils.hasText(request.getParameter("searchString"))) { - throw new RuntimeException(); - } - - jsTreeHibernateDTO.setWhereLike("c_title", parser.get("parser")); - ModelAndView modelAndView = new ModelAndView("jsonView"); - modelAndView.addObject("result", menuService.searchMenu(jsTreeHibernateDTO)); - return modelAndView; - } - - /** - * 노드를 추가한다. - * - * @param jsTreeHibernateDTO - * @param model - * @param bindingResult - * @return - * @throws JsonProcessingException - * @throws IllegalAccessException - * @throws InstantiationException - */ - @ResponseBody - @RequestMapping(value = "/addMenu.do", method = RequestMethod.POST) - public ModelAndView addMenu(@Validated(value = AddNode.class) MenuDTO jsTreeHibernateDTO, - BindingResult bindingResult, ModelMap model) throws Exception { - if (bindingResult.hasErrors()) - throw new RuntimeException(); - - ModelAndView modelAndView = new ModelAndView("jsonView"); - modelAndView.addObject("result", menuService.addMenu(jsTreeHibernateDTO)); - return modelAndView; - } - - /** - * 노드를 삭제한다. - * - * @param jsTreeHibernateDTO - * @param model - * @param bindingResult - * @return - * @throws JsonProcessingException - */ - @ResponseBody - @RequestMapping(value = "/removeMenu.do", method = RequestMethod.POST) - public ModelAndView removeNode(@Validated(value = RemoveNode.class) MenuDTO jsTreeHibernateDTO, - BindingResult bindingResult, ModelMap model) throws Exception { - if (bindingResult.hasErrors()) - throw new RuntimeException(); - - jsTreeHibernateDTO.setStatus(menuService.removeMenu(jsTreeHibernateDTO)); - setJsonDefaultSetting(jsTreeHibernateDTO); - - ModelAndView modelAndView = new ModelAndView("jsonView"); - modelAndView.addObject("result", jsTreeHibernateDTO); - return modelAndView; - } - - private void setJsonDefaultSetting(MenuDTO jsTreeHibernateDTO) { - long defaultSettingValue = 0; - jsTreeHibernateDTO.setC_parentid(defaultSettingValue); - jsTreeHibernateDTO.setC_position(defaultSettingValue); - jsTreeHibernateDTO.setC_left(defaultSettingValue); - jsTreeHibernateDTO.setC_right(defaultSettingValue); - jsTreeHibernateDTO.setC_level(defaultSettingValue); - jsTreeHibernateDTO.setRef(defaultSettingValue); - } - - /** - * 노드를 변경한다. - * - * @param jsTreeHibernateDTO - * @param model - * @param bindingResult - * @return - * @throws JsonProcessingException - */ - @ResponseBody - @RequestMapping(value = "/alterMenu.do", method = RequestMethod.POST) - public ModelAndView alterNode(@Validated(value = AlterNode.class) MenuDTO jsTreeHibernateDTO, - BindingResult bindingResult, ModelMap model) throws Exception { - if (bindingResult.hasErrors()){ - throw new RuntimeException(); - } - - jsTreeHibernateDTO.setC_title(Util_TitleChecker.StringReplace(jsTreeHibernateDTO.getC_title())); - - jsTreeHibernateDTO.setStatus(menuService.alterMenu(jsTreeHibernateDTO)); - setJsonDefaultSetting(jsTreeHibernateDTO); - - ModelAndView modelAndView = new ModelAndView("jsonView"); - modelAndView.addObject("result", jsTreeHibernateDTO); - return modelAndView; - } - - /** - * 노드의 타입을 변경한다. - * - * @param jsTreeHibernateDTO - * @param model - * @param bindingResult - * @return - * @throws JsonProcessingException - */ - @ResponseBody - @RequestMapping(value = "/alterMenuType.do", method = RequestMethod.POST) - public ModelAndView alterNodeType(@Validated(value = AlterNodeType.class) MenuDTO jsTreeHibernateDTO, - BindingResult bindingResult, ModelMap model) throws Exception { - if (bindingResult.hasErrors()) - throw new RuntimeException(); - - menuService.alterMenuType(jsTreeHibernateDTO); - setJsonDefaultSetting(jsTreeHibernateDTO); - ModelAndView modelAndView = new ModelAndView("jsonView"); - modelAndView.addObject("result", jsTreeHibernateDTO); - return modelAndView; - } - - /** - * 노드를 이동한다. - * - * @param jsTreeHibernateDTO - * @param model - * @param request - * @return - * @throws JsonProcessingException - * @throws ReflectiveOperationException - * @throws IllegalAccessException - * @throws InstantiationException - */ - @ResponseBody - @RequestMapping(value = "/moveMenu.do", method = RequestMethod.POST) - public ModelAndView moveNode(@Validated(value = MoveNode.class) MenuDTO jsTreeHibernateDTO, - BindingResult bindingResult, ModelMap model, HttpServletRequest request) throws Exception { - if (bindingResult.hasErrors()) - throw new RuntimeException(); - - menuService.moveMenu(jsTreeHibernateDTO, request); - setJsonDefaultSetting(jsTreeHibernateDTO); - - ModelAndView modelAndView = new ModelAndView("jsonView"); - modelAndView.addObject("result", jsTreeHibernateDTO); - return modelAndView; - } - - @ResponseBody - @RequestMapping(value = "/analyzeMenu.do", method = RequestMethod.GET) - public ModelAndView getChildNode(ModelMap model) { - model.addAttribute("analyzeResult", ""); - - ModelAndView modelAndView = new ModelAndView("jsonView"); - modelAndView.addObject("result", "ture"); - return modelAndView; - } } Index: standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/api/rivalWar/directChat/JsTreeView.jsp =================================================================== diff -u --- standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/api/rivalWar/directChat/JsTreeView.jsp (revision 0) +++ standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/api/rivalWar/directChat/JsTreeView.jsp (revision 23d3d53f9cdbbce89052b18d5fce8c076b9c02f7) @@ -0,0 +1,404 @@ +<%@ page isELIgnored="false" language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" autoFlush="true"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="customTags"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + + + + + + + +
c_idc_parentidc_positionc_leftc_rightc_levelc_titlec_type
+
+
+ +
분석 결과
+ + + + +
+
+
+
+
+
+
+ + Index: standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/api/rivalWar/menu/JsTreeView.jsp =================================================================== diff -u --- standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/api/rivalWar/menu/JsTreeView.jsp (revision 0) +++ standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/api/rivalWar/menu/JsTreeView.jsp (revision 23d3d53f9cdbbce89052b18d5fce8c076b9c02f7) @@ -0,0 +1,431 @@ +<%@ page isELIgnored="false" language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" + trimDirectiveWhitespaces="true" autoFlush="true" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="customTags" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + + + + + + + +
c_idc_parentidc_positionc_leftc_rightc_levelc_titlec_type
+
+
+ +
+ 분석 결과 +
+ + + + +
+
+
+
+
+
+
+ + FishEye: Tag 23d3d53f9cdbbce89052b18d5fce8c076b9c02f7 refers to a dead (removed) revision in file `standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/rivalWar/api/directChat/admin/JsTreeView.jsp'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 23d3d53f9cdbbce89052b18d5fce8c076b9c02f7 refers to a dead (removed) revision in file `standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/rivalWar/api/menu/admin/JsTreeView.jsp'. FishEye: No comparison available. Pass `N' to diff?