Index: .idea/sonarIssues.xml
===================================================================
diff -u -r90adf650236eaf9a7b0920174b680c9114c1af4d -r395c2562d2dfd7900c4e263f8ddb5938785405ab
--- .idea/sonarIssues.xml (.../sonarIssues.xml) (revision 90adf650236eaf9a7b0920174b680c9114c1af4d)
+++ .idea/sonarIssues.xml (.../sonarIssues.xml) (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -918,6 +918,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: standard/project/web/src/main/java/egovframework/api/jsTreeServiceFramework/security/controller/SecurityController.java
===================================================================
diff -u
--- standard/project/web/src/main/java/egovframework/api/jsTreeServiceFramework/security/controller/SecurityController.java (revision 0)
+++ standard/project/web/src/main/java/egovframework/api/jsTreeServiceFramework/security/controller/SecurityController.java (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -0,0 +1,20 @@
+package egovframework.api.jsTreeServiceFramework.security.controller;
+
+import egovframework.com.cmm.annotation.IncludedInfo;
+import egovframework.com.ext.jstree.support.mvc.GenericAbstractController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * Created by Administrator on 2017-07-24.
+ */
+@Controller
+@RequestMapping(value = {"/api/jsTreeServiceFramework/security"})
+public class SecurityController extends GenericAbstractController {
+
+ @IncludedInfo(name = "CSRF json", listUrl = "/api/jsTreeServiceFramework/security/csrf.do", order = 3300, gid = 313)
+ @RequestMapping("/csrf.do")
+ public String jsTreeCSRFtoJson() {
+ return "egovframework/com/ext/jstree/csrf";
+ }
+}
Index: standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/controller/DirectChatController.java
===================================================================
diff -u
--- standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/controller/DirectChatController.java (revision 0)
+++ standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/controller/DirectChatController.java (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -0,0 +1,278 @@
+package egovframework.api.rivalWar.directChat.controller;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.google.common.collect.Maps;
+import egovframework.api.rivalWar.directChat.service.DirectChatService;
+import egovframework.api.rivalWar.directChat.vo.DirectChatDTO;
+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;
+import egovframework.com.ext.jstree.support.util.ParameterParser;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.util.StringUtils;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.List;
+
+@Controller
+@RequestMapping(value = {"/api/rivalWar/directChat"})
+public class DirectChatController extends GenericAbstractController {
+
+ @Autowired
+ private DirectChatService directChatService;
+
+ @IncludedInfo(name = "RivalWar Admin DirectChat", listUrl = "/api/rivalWar/directChat/admin/getJsTreeView.do", order = 7001, gid = 7313)
+ @RequestMapping("/admin/getJsTreeView.do")
+ public String jsTreeSpringHibernate() {
+ return "egovframework/rivalWar/api/directChat/admin/JsTreeView";
+ }
+
+ /**
+ * 자식노드를 요청한다.
+ *
+ * @param comprehensiveTree
+ * @param model
+ * @param request
+ * @return String
+ * @throws JsonProcessingException
+ */
+ @ResponseBody
+ @RequestMapping(value = "/getChildDirectChat.do", method = RequestMethod.GET)
+ public ModelAndView getChildDirectChat(DirectChatDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request)
+ throws Exception {
+
+ ParameterParser parser = new ParameterParser(request);
+
+ if (parser.getInt("c_id") <= 0) {
+ throw new RuntimeException();
+ }
+
+ jsTreeHibernateDTO.setWhere("c_parentid", new Long(parser.get("c_id")));
+ List list = directChatService.getChildDirectChat(jsTreeHibernateDTO);
+
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ modelAndView.addObject("result", list);
+ return modelAndView;
+ }
+
+ @ResponseBody
+ @RequestMapping(value = "/getPaginatedChildMenu.do", method = RequestMethod.GET)
+ public ModelAndView getPaginatedChildMenu(DirectChatDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request)
+ throws Exception {
+
+ if (jsTreeHibernateDTO.getC_id() <= 0 || jsTreeHibernateDTO.getPageIndex() <= 0
+ || jsTreeHibernateDTO.getPageUnit() <= 0 || jsTreeHibernateDTO.getPageSize() <= 0) {
+ throw new RuntimeException();
+ }
+
+ jsTreeHibernateDTO.setWhere("c_parentid", jsTreeHibernateDTO.getC_id());
+ List list = directChatService.getPaginatedChildDirectChat(jsTreeHibernateDTO);
+ jsTreeHibernateDTO.getPaginationInfo().setTotalRecordCount(list.size());
+
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ HashMap resultMap = Maps.newHashMap();
+ resultMap.put("paginationInfo", jsTreeHibernateDTO.getPaginationInfo());
+ resultMap.put("result", list);
+ modelAndView.addObject("result", resultMap);
+ return modelAndView;
+ }
+
+ @ResponseBody
+ @RequestMapping(value = "/getDirectChat.do", method = RequestMethod.GET)
+ public ModelAndView getDirectChat(DirectChatDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request)
+ throws Exception {
+
+ ParameterParser parser = new ParameterParser(request);
+
+ if (parser.getInt("c_id") <= 0) {
+ throw new RuntimeException();
+ }
+
+ DirectChatDTO directChatDTO = directChatService.getDirectChat(jsTreeHibernateDTO);
+
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ modelAndView.addObject("result", directChatDTO);
+ return modelAndView;
+ }
+
+ /**
+ * 노드를 검색한다.
+ *
+ * @param comprehensiveTree
+ * @param model
+ * @param request
+ * @return
+ * @throws JsonProcessingException
+ */
+ @ResponseBody
+ @RequestMapping(value = "/searchDirectChat.do", method = RequestMethod.GET)
+ public ModelAndView searchNode(DirectChatDTO 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", directChatService.searchDirectChat(jsTreeHibernateDTO));
+ return modelAndView;
+ }
+
+ /**
+ * 노드를 추가한다.
+ *
+ * @param comprehensiveTree
+ * @param model
+ * @param request
+ * @return
+ * @throws JsonProcessingException
+ * @throws IllegalAccessException
+ * @throws InstantiationException
+ */
+ @ResponseBody
+ @RequestMapping(value = "/addDirectChat.do", method = RequestMethod.POST)
+ public ModelAndView addDirectChat(@Validated(value = AddNode.class) DirectChatDTO jsTreeHibernateDTO,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+ if (bindingResult.hasErrors())
+ throw new RuntimeException();
+
+ jsTreeHibernateDTO.setC_title(Util_TitleChecker.StringReplace(jsTreeHibernateDTO.getC_title()));
+
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ modelAndView.addObject("result", directChatService.addDirectChat(jsTreeHibernateDTO));
+ return modelAndView;
+ }
+
+ /**
+ * 노드를 삭제한다.
+ *
+ * @param comprehensiveTree
+ * @param model
+ * @param request
+ * @return
+ * @throws JsonProcessingException
+ */
+ @ResponseBody
+ @RequestMapping(value = "/removeDirectChat.do", method = RequestMethod.POST)
+ public ModelAndView removeNode(@Validated(value = RemoveNode.class) DirectChatDTO jsTreeHibernateDTO,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+ if (bindingResult.hasErrors())
+ throw new RuntimeException();
+
+ jsTreeHibernateDTO.setStatus(directChatService.removeDirectChat(jsTreeHibernateDTO));
+ setJsonDefaultSetting(jsTreeHibernateDTO);
+
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ modelAndView.addObject("result", jsTreeHibernateDTO);
+ return modelAndView;
+ }
+
+ private void setJsonDefaultSetting(DirectChatDTO 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 comprehensiveTree
+ * @param model
+ * @param request
+ * @return
+ * @throws JsonProcessingException
+ */
+ @ResponseBody
+ @RequestMapping(value = "/alterDirectChat.do", method = RequestMethod.POST)
+ public ModelAndView alterNode(@Validated(value = AlterNode.class) DirectChatDTO jsTreeHibernateDTO,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+ if (bindingResult.hasErrors())
+ throw new RuntimeException();
+
+ jsTreeHibernateDTO.setC_title(Util_TitleChecker.StringReplace(jsTreeHibernateDTO.getC_title()));
+
+ jsTreeHibernateDTO.setStatus(directChatService.alterDirectChat(jsTreeHibernateDTO));
+ setJsonDefaultSetting(jsTreeHibernateDTO);
+
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ modelAndView.addObject("result", jsTreeHibernateDTO);
+ return modelAndView;
+ }
+
+ /**
+ * 노드의 타입을 변경한다.
+ *
+ * @param comprehensiveTree
+ * @param model
+ * @param request
+ * @return
+ * @throws JsonProcessingException
+ */
+ @ResponseBody
+ @RequestMapping(value = "/alterNodeDirectChat.do", method = RequestMethod.POST)
+ public ModelAndView alterNodeType(@Validated(value = AlterNodeType.class) DirectChatDTO jsTreeHibernateDTO,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+ if (bindingResult.hasErrors())
+ throw new RuntimeException();
+
+ directChatService.alterDirectChatType(jsTreeHibernateDTO);
+ setJsonDefaultSetting(jsTreeHibernateDTO);
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ modelAndView.addObject("result", jsTreeHibernateDTO);
+ return modelAndView;
+ }
+
+ /**
+ * 노드를 이동한다.
+ *
+ * @param comprehensiveTree
+ * @param model
+ * @param request
+ * @return
+ * @throws JsonProcessingException
+ * @throws ReflectiveOperationException
+ * @throws IllegalAccessException
+ * @throws InstantiationException
+ */
+ @ResponseBody
+ @RequestMapping(value = "/moveDirectChat.do", method = RequestMethod.POST)
+ public ModelAndView moveNode(@Validated(value = MoveNode.class) DirectChatDTO jsTreeHibernateDTO,
+ BindingResult bindingResult, ModelMap model, HttpServletRequest request) throws Exception {
+ if (bindingResult.hasErrors())
+ throw new RuntimeException();
+
+ directChatService.moveDirectChat(jsTreeHibernateDTO, request);
+ setJsonDefaultSetting(jsTreeHibernateDTO);
+
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ modelAndView.addObject("result", jsTreeHibernateDTO);
+ return modelAndView;
+ }
+
+ @ResponseBody
+ @RequestMapping(value = "/analyzeDirectChat.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/directChat/service/DirectChatService.java
===================================================================
diff -u
--- standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/service/DirectChatService.java (revision 0)
+++ standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/service/DirectChatService.java (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -0,0 +1,28 @@
+package egovframework.api.rivalWar.directChat.service;
+
+import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+public interface DirectChatService {
+
+ public T getDirectChat(T jsTreeHibernateDTO) throws Exception;
+
+ public List getChildDirectChat(T jsTreeHibernateDTO) throws Exception;
+
+ public List getPaginatedChildDirectChat(T jsTreeHibernateDTO) throws Exception;
+
+ public List searchDirectChat(T jsTreeHibernateDTO) throws Exception;
+
+ public T addDirectChat(T jsTreeHibernateDTO) throws Exception;
+
+ public int removeDirectChat(T jsTreeHibernateDTO) throws Exception;
+
+ public int alterDirectChat(T jsTreeHibernateDTO) throws Exception;
+
+ public int alterDirectChatType(T jsTreeHibernateDTO) throws Exception;
+
+ public T moveDirectChat(T jsTreeHibernateDTO, HttpServletRequest request) throws Exception;
+
+}
Index: standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/service/DirectChatServiceImpl.java
===================================================================
diff -u
--- standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/service/DirectChatServiceImpl.java (revision 0)
+++ standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/service/DirectChatServiceImpl.java (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -0,0 +1,62 @@
+package egovframework.api.rivalWar.directChat.service;
+
+import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateService;
+import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+@Service("DirectChatService")
+public class DirectChatServiceImpl implements DirectChatService {
+
+ @Autowired
+ private JsTreeHibernateService jsTreeHibernateService;
+
+ @Override
+ public T getDirectChat(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.getNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public List getPaginatedChildDirectChat(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.getPaginatedChildNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public List getChildDirectChat(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.getChildNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public List searchDirectChat(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.searchNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public T addDirectChat(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.addNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public int removeDirectChat(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.removeNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public int alterDirectChat(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.alterNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public int alterDirectChatType(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.alterNodeType(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public T moveDirectChat(T jsTreeHibernateDTO, HttpServletRequest request)
+ throws Exception {
+ return jsTreeHibernateService.moveNode(jsTreeHibernateDTO, request);
+ }
+}
\ No newline at end of file
Index: standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/vo/DirectChatDTO.java
===================================================================
diff -u
--- standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/vo/DirectChatDTO.java (revision 0)
+++ standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/vo/DirectChatDTO.java (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -0,0 +1,114 @@
+package egovframework.api.rivalWar.directChat.vo;
+
+import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO;
+import org.hibernate.annotations.Cache;
+import org.hibernate.annotations.*;
+
+import javax.persistence.*;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+@Entity
+@Table(name = "T_JSTREE_DIRECTCHAT")
+@SelectBeforeUpdate(value = true)
+@DynamicInsert(value = true)
+@DynamicUpdate(value = true)
+@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
+@SequenceGenerator(name = "JsTreeSequence", sequenceName = "S_JSTREE_DIRECTCHAT", allocationSize = 1)
+public class DirectChatDTO extends JsTreeHibernateSearchDTO implements Serializable {
+
+ private static final long serialVersionUID = -2826589626523340365L;
+
+ public DirectChatDTO() {
+ super();
+ }
+
+ public DirectChatDTO(Boolean copyBooleanValue) {
+ super();
+ this.copyBooleanValue = copyBooleanValue;
+ }
+
+ /*
+ * Extend Bean Field
+ */
+ private Boolean copyBooleanValue;
+
+ @Transient
+ public Boolean getCopyBooleanValue() {
+ copyBooleanValue = false;
+ if (this.getCopy() == 0) {
+ copyBooleanValue = false;
+ } else {
+ copyBooleanValue = true;
+ }
+ return copyBooleanValue;
+ }
+
+ public void setCopyBooleanValue(Boolean copyBooleanValue) {
+ this.copyBooleanValue = copyBooleanValue;
+ }
+
+ private Long c_userid;
+ private String c_time;
+ private Long c_likecount;
+ private Long c_hatecount;
+ private Long c_camp;
+
+ @Column(name = "C_USERID")
+ public Long getC_userid() {
+ return c_userid;
+ }
+
+ public void setC_userid(Long c_userid) {
+ this.c_userid = c_userid;
+ }
+
+ @Column(name = "C_TIME")
+ public String getC_time() {
+ return c_time;
+ }
+
+ public void setC_time(String c_time) {
+ this.c_time = c_time;
+ }
+
+ @Column(name = "C_LIKECOUNT")
+ public Long getC_likecount() {
+ return c_likecount;
+ }
+
+ public void setC_likecount(Long c_likecount) {
+ this.c_likecount = c_likecount;
+ }
+
+ @Column(name = "C_HATECOUNT")
+ public Long getC_hatecount() {
+ return c_hatecount;
+ }
+
+ public void setC_hatecount(Long c_hatecount) {
+ this.c_hatecount = c_hatecount;
+ }
+
+ @Column(name = "C_CAMP")
+ public Long getC_camp() {
+ return c_camp;
+ }
+
+ public void setC_camp(Long c_camp) {
+ this.c_camp = c_camp;
+ }
+
+ @Override
+ public void setFieldFromNewInstance(T paramInstance) {
+ if (paramInstance instanceof DirectChatDTO) {
+ this.setC_userid(this.getC_userid());
+ this.setC_time(this.getC_time());
+ this.setC_likecount(this.getC_likecount());
+ this.setC_hatecount(this.getC_hatecount());
+ this.setC_camp(this.getC_camp());
+ }
+ }
+
+}
Index: standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/MenuController.java
===================================================================
diff -u
--- standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/MenuController.java (revision 0)
+++ standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/MenuController.java (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -0,0 +1,283 @@
+package egovframework.api.rivalWar.menu.controller;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+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;
+import egovframework.com.ext.jstree.support.util.ParameterParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.util.StringUtils;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.List;
+
+@Controller
+@RequestMapping(value = {"/api/rivalWar/menu"})
+public class MenuController extends GenericAbstractController {
+
+ @Autowired
+ private MenuService menuService;
+
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+
+ @IncludedInfo(name = "RivalWar Admin Menu", listUrl = "/api/rivalWar/menu/admin/getJsTreeView.do", order = 7000, gid = 7313)
+ @RequestMapping("/admin/getJsTreeView.do")
+ public String jsTreeSpringHibernate() {
+ return "egovframework/rivalWar/api/menu/admin/JsTreeView";
+ }
+
+ /**
+ * 자식노드를 요청한다.
+ *
+ * @param jsTreeHibernateDTO
+ * @param model
+ * @param request
+ * @return String
+ * @throws JsonProcessingException
+ */
+ @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 = "/getPaginatedChildMenu.do", method = RequestMethod.GET)
+ public ModelAndView getPaginatedChildMenu(MenuDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request)
+ throws Exception {
+
+ if (jsTreeHibernateDTO.getC_id() <= 0 || jsTreeHibernateDTO.getPageIndex() <= 0
+ || jsTreeHibernateDTO.getPageUnit() <= 0 || jsTreeHibernateDTO.getPageSize() <= 0) {
+ throw new RuntimeException();
+ }
+
+ jsTreeHibernateDTO.setWhere("c_parentid", jsTreeHibernateDTO.getC_id());
+ List list = menuService.getPaginatedChildMenu(jsTreeHibernateDTO);
+ jsTreeHibernateDTO.getPaginationInfo().setTotalRecordCount(list.size());
+
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ HashMap resultMap = Maps.newHashMap();
+ resultMap.put("paginationInfo", jsTreeHibernateDTO.getPaginationInfo());
+ resultMap.put("result", list);
+ modelAndView.addObject("result", resultMap);
+ return modelAndView;
+ }
+
+ @ResponseBody
+ @RequestMapping(value = "/getMenu.do", method = RequestMethod.GET)
+ public ModelAndView getMenu(MenuDTO jsTreeHibernateDTO, ModelMap model, HttpServletRequest request)
+ throws Exception {
+
+ ParameterParser parser = new ParameterParser(request);
+
+ if (parser.getInt("c_id") <= 0) {
+ throw new RuntimeException();
+ }
+
+ MenuDTO menuDTO = menuService.getMenu(jsTreeHibernateDTO);
+
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ modelAndView.addObject("result", menuDTO);
+ 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/java/egovframework/api/rivalWar/menu/service/MenuService.java
===================================================================
diff -u
--- standard/project/web/src/main/java/egovframework/api/rivalWar/menu/service/MenuService.java (revision 0)
+++ standard/project/web/src/main/java/egovframework/api/rivalWar/menu/service/MenuService.java (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -0,0 +1,28 @@
+package egovframework.api.rivalWar.menu.service;
+
+import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+public interface MenuService {
+
+ public T getMenu(T jsTreeHibernateDTO) throws Exception;
+
+ public List getChildMenu(T jsTreeHibernateDTO) throws Exception;
+
+ public List getPaginatedChildMenu(T jsTreeHibernateDTO) throws Exception;
+
+ public List searchMenu(T jsTreeHibernateDTO) throws Exception;
+
+ public T addMenu(T jsTreeHibernateDTO) throws Exception;
+
+ public int removeMenu(T jsTreeHibernateDTO) throws Exception;
+
+ public int alterMenu(T jsTreeHibernateDTO) throws Exception;
+
+ public int alterMenuType(T jsTreeHibernateDTO) throws Exception;
+
+ public T moveMenu(T jsTreeHibernateDTO, HttpServletRequest request) throws Exception;
+
+}
Index: standard/project/web/src/main/java/egovframework/api/rivalWar/menu/service/MenuServiceImpl.java
===================================================================
diff -u
--- standard/project/web/src/main/java/egovframework/api/rivalWar/menu/service/MenuServiceImpl.java (revision 0)
+++ standard/project/web/src/main/java/egovframework/api/rivalWar/menu/service/MenuServiceImpl.java (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -0,0 +1,62 @@
+package egovframework.api.rivalWar.menu.service;
+
+import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateService;
+import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+@Service("MenuService")
+public class MenuServiceImpl implements MenuService {
+
+ @Autowired
+ private JsTreeHibernateService jsTreeHibernateService;
+
+ @Override
+ public T getMenu(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.getNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public List getChildMenu(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.getChildNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public List getPaginatedChildMenu(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.getPaginatedChildNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public List searchMenu(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.searchNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public T addMenu(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.addNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public int removeMenu(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.removeNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public int alterMenu(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.alterNode(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public int alterMenuType(T jsTreeHibernateDTO) throws Exception {
+ return jsTreeHibernateService.alterNodeType(jsTreeHibernateDTO);
+ }
+
+ @Override
+ public T moveMenu(T jsTreeHibernateDTO, HttpServletRequest request)
+ throws Exception {
+ return jsTreeHibernateService.moveNode(jsTreeHibernateDTO, request);
+ }
+}
\ No newline at end of file
Index: standard/project/web/src/main/java/egovframework/api/rivalWar/menu/vo/MenuDTO.java
===================================================================
diff -u
--- standard/project/web/src/main/java/egovframework/api/rivalWar/menu/vo/MenuDTO.java (revision 0)
+++ standard/project/web/src/main/java/egovframework/api/rivalWar/menu/vo/MenuDTO.java (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -0,0 +1,84 @@
+package egovframework.api.rivalWar.menu.vo;
+
+import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO;
+import org.hibernate.annotations.Cache;
+import org.hibernate.annotations.*;
+
+import javax.persistence.*;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+@Entity
+@Table(name = "T_JSTREE_MENU")
+@SelectBeforeUpdate(value = true)
+@DynamicInsert(value = true)
+@DynamicUpdate(value = true)
+@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
+@SequenceGenerator(name = "JsTreeSequence", sequenceName = "S_JSTREE_MENU", allocationSize = 1)
+public class MenuDTO extends JsTreeHibernateSearchDTO implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5641929581490357881L;
+
+ public MenuDTO() {
+ super();
+ }
+
+ public MenuDTO(Boolean copyBooleanValue) {
+ super();
+ this.copyBooleanValue = copyBooleanValue;
+ }
+
+ /*
+ * Extend Bean Field
+ */
+ private Boolean copyBooleanValue;
+
+ @Transient
+ public Boolean getCopyBooleanValue() {
+ copyBooleanValue = false;
+ if (this.getCopy() == 0) {
+ copyBooleanValue = false;
+ } else {
+ copyBooleanValue = true;
+ }
+ return copyBooleanValue;
+ }
+
+ public void setCopyBooleanValue(Boolean copyBooleanValue) {
+ this.copyBooleanValue = copyBooleanValue;
+ }
+
+ private String c_vote_start_date;
+ private String c_vote_end_date;
+
+ @Column(name = "c_vote_start_date")
+ public String getC_vote_start_date() {
+ return c_vote_start_date;
+ }
+
+ public void setC_vote_start_date(String c_vote_start_date) {
+ this.c_vote_start_date = c_vote_start_date;
+ }
+
+ @Column(name = "c_vote_end_date")
+ public String getC_vote_end_date() {
+ return c_vote_end_date;
+ }
+
+ public void setC_vote_end_date(String c_vote_end_date) {
+ this.c_vote_end_date = c_vote_end_date;
+ }
+
+ @Override
+ public void setFieldFromNewInstance(T paramInstance) {
+ if (paramInstance instanceof MenuDTO) {
+ this.setC_vote_start_date(this.getC_vote_start_date());
+ this.setC_vote_end_date(this.getC_vote_end_date());
+ }
+ }
+
+}
FishEye: Tag 395c2562d2dfd7900c4e263f8ddb5938785405ab refers to a dead (removed) revision in file `standard/project/web/src/main/java/egovframework/com/ext/jstree/support/security/controller/UtilController.java'.
FishEye: No comparison available. Pass `N' to diff?
FishEye: Tag 395c2562d2dfd7900c4e263f8ddb5938785405ab refers to a dead (removed) revision in file `standard/project/web/src/main/java/egovframework/rivalwar/api/directChat/controller/DirectChatController.java'.
FishEye: No comparison available. Pass `N' to diff?
FishEye: Tag 395c2562d2dfd7900c4e263f8ddb5938785405ab refers to a dead (removed) revision in file `standard/project/web/src/main/java/egovframework/rivalwar/api/directChat/service/DirectChatService.java'.
FishEye: No comparison available. Pass `N' to diff?
FishEye: Tag 395c2562d2dfd7900c4e263f8ddb5938785405ab refers to a dead (removed) revision in file `standard/project/web/src/main/java/egovframework/rivalwar/api/directChat/service/DirectChatServiceImpl.java'.
FishEye: No comparison available. Pass `N' to diff?
FishEye: Tag 395c2562d2dfd7900c4e263f8ddb5938785405ab refers to a dead (removed) revision in file `standard/project/web/src/main/java/egovframework/rivalwar/api/directChat/vo/DirectChatDTO.java'.
FishEye: No comparison available. Pass `N' to diff?
FishEye: Tag 395c2562d2dfd7900c4e263f8ddb5938785405ab refers to a dead (removed) revision in file `standard/project/web/src/main/java/egovframework/rivalwar/api/menu/controller/MenuController.java'.
FishEye: No comparison available. Pass `N' to diff?
FishEye: Tag 395c2562d2dfd7900c4e263f8ddb5938785405ab refers to a dead (removed) revision in file `standard/project/web/src/main/java/egovframework/rivalwar/api/menu/service/MenuService.java'.
FishEye: No comparison available. Pass `N' to diff?
FishEye: Tag 395c2562d2dfd7900c4e263f8ddb5938785405ab refers to a dead (removed) revision in file `standard/project/web/src/main/java/egovframework/rivalwar/api/menu/service/MenuServiceImpl.java'.
FishEye: No comparison available. Pass `N' to diff?
FishEye: Tag 395c2562d2dfd7900c4e263f8ddb5938785405ab refers to a dead (removed) revision in file `standard/project/web/src/main/java/egovframework/rivalwar/api/menu/vo/MenuDTO.java'.
FishEye: No comparison available. Pass `N' to diff?
Index: standard/project/web/src/main/resources/egovframework/spring/com/context-security.xml
===================================================================
diff -u -rbb1f16e249542e4c4af01ba890862dcdad2ccc1a -r395c2562d2dfd7900c4e263f8ddb5938785405ab
--- standard/project/web/src/main/resources/egovframework/spring/com/context-security.xml (.../context-security.xml) (revision bb1f16e249542e4c4af01ba890862dcdad2ccc1a)
+++ standard/project/web/src/main/resources/egovframework/spring/com/context-security.xml (.../context-security.xml) (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -54,6 +54,10 @@
+
+
+
+
Index: standard/project/web/src/main/webapp/WEB-INF/web.xml
===================================================================
diff -u -r526c537450c1a6ef16d096d64abea6081e3ff72e -r395c2562d2dfd7900c4e263f8ddb5938785405ab
--- standard/project/web/src/main/webapp/WEB-INF/web.xml (.../web.xml) (revision 526c537450c1a6ef16d096d64abea6081e3ff72e)
+++ standard/project/web/src/main/webapp/WEB-INF/web.xml (.../web.xml) (revision 395c2562d2dfd7900c4e263f8ddb5938785405ab)
@@ -63,7 +63,6 @@
spring
*.do
- /api/*
/connect/facebook
/signin/facebook
/auth/*