@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; } }
@RequestMapping(value = "/saveGroupActions/{groupId}", method = RequestMethod.POST) @ResponseBody public Boolean saveGroupActions(@PathVariable int groupId, @RequestBody MyActionList actions) { return groupService.saveAction(groupId, actions); }
@RequestMapping("/loadActionsXmlForTree/{groupId}") @ResponseBody public Set<Action> loadActions(@PathVariable int groupId) { return groupService.loadByEntityId(groupId).getActions(); }
@RequestMapping("/delete/{Id}") @ResponseBody public Boolean delete(@PathVariable int Id) { return groupService.deleteByEntityId(Id); }
@RequestMapping("/load/{Id}") @ResponseBody public Group load(@PathVariable int Id) { return groupService.loadByEntityId(Id); }
@RequestMapping("/listAll") @ResponseBody public List<Group> list() { return groupService.getAll(); }
@RequestMapping("/list") @ResponseBody public QueryResult<Group> list(String searchFilter, String order, int pageNumber, int pageSize) { return groupService.getAllGrid(new SearchOption(searchFilter, order, pageNumber, pageSize)); }