Пример #1
0
 @RequestMapping(value = "/save", method = RequestMethod.POST)
 @ResponseBody
 public int save(@RequestBody Group group) {
   if (group.getId() > 0) {
     groupService.update(group);
     return 1;
   } else {
     groupService.add(group);
     return 1;
   }
 }
Пример #2
0
 @RequestMapping(value = "/saveGroupActions/{groupId}", method = RequestMethod.POST)
 @ResponseBody
 public Boolean saveGroupActions(@PathVariable int groupId, @RequestBody MyActionList actions) {
   return groupService.saveAction(groupId, actions);
 }
Пример #3
0
 @RequestMapping("/loadActionsXmlForTree/{groupId}")
 @ResponseBody
 public Set<Action> loadActions(@PathVariable int groupId) {
   return groupService.loadByEntityId(groupId).getActions();
 }
Пример #4
0
 @RequestMapping("/delete/{Id}")
 @ResponseBody
 public Boolean delete(@PathVariable int Id) {
   return groupService.deleteByEntityId(Id);
 }
Пример #5
0
 @RequestMapping("/load/{Id}")
 @ResponseBody
 public Group load(@PathVariable int Id) {
   return groupService.loadByEntityId(Id);
 }
Пример #6
0
 @RequestMapping("/listAll")
 @ResponseBody
 public List<Group> list() {
   return groupService.getAll();
 }
Пример #7
0
 @RequestMapping("/list")
 @ResponseBody
 public QueryResult<Group> list(String searchFilter, String order, int pageNumber, int pageSize) {
   return groupService.getAllGrid(new SearchOption(searchFilter, order, pageNumber, pageSize));
 }