Esempio n. 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;
   }
 }
Esempio n. 2
0
 @RequestMapping(value = "/saveGroupActions/{groupId}", method = RequestMethod.POST)
 @ResponseBody
 public Boolean saveGroupActions(@PathVariable int groupId, @RequestBody MyActionList actions) {
   return groupService.saveAction(groupId, actions);
 }
Esempio n. 3
0
 @RequestMapping("/loadActionsXmlForTree/{groupId}")
 @ResponseBody
 public Set<Action> loadActions(@PathVariable int groupId) {
   return groupService.loadByEntityId(groupId).getActions();
 }
Esempio n. 4
0
 @RequestMapping("/delete/{Id}")
 @ResponseBody
 public Boolean delete(@PathVariable int Id) {
   return groupService.deleteByEntityId(Id);
 }
Esempio n. 5
0
 @RequestMapping("/load/{Id}")
 @ResponseBody
 public Group load(@PathVariable int Id) {
   return groupService.loadByEntityId(Id);
 }
Esempio n. 6
0
 @RequestMapping("/listAll")
 @ResponseBody
 public List<Group> list() {
   return groupService.getAll();
 }
Esempio n. 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));
 }