/**
  * confirmDelete
  *
  * @param req a {@link javax.servlet.http.HttpServletRequest} object.
  * @return a {@link org.springframework.web.servlet.ModelAndView} object.
  */
 @RequestMapping("/group.confirm.page")
 public ModelAndView confirmDelete(HttpServletRequest req) {
   Group group = WebUtils.getGroup(req);
   ModelAndView mav = new ModelAndView("group/detail");
   mav.addObject(Constants.GROUP, group.getGroupView());
   mav.addObject(Constants.UI_MODE, Constants.DELETE);
   return mav;
 }
 /**
  * delete
  *
  * @param req a {@link javax.servlet.http.HttpServletRequest} object.
  * @return a {@link org.springframework.web.servlet.ModelAndView} object.
  */
 @RequestMapping("/group.delete.page")
 public ModelAndView delete(HttpServletRequest req) {
   Group group = WebUtils.getGroup(req);
   ModelAndView mav = new ModelAndView(Constants.REDIRECT_GROUP_LIST);
   mav.addObject(
       Constants.MESSAGE,
       group.remove()
           ? Constants.MSG_AUTHORITY_DELETE_SUCCESS
           : Constants.MSG_AUTHORITY_DELETE_FAILURE);
   return mav;
 }
 /**
  * items
  *
  * @param req a {@link javax.servlet.http.HttpServletRequest} object.
  * @return a {@link org.springframework.web.servlet.ModelAndView} object.
  */
 @RequestMapping("/group.items.page")
 public ModelAndView items(HttpServletRequest req) {
   Group group = WebUtils.getGroup(req);
   if (group != null) {
     ModelAndView mav = new ModelAndView("group/items");
     mav.addObject(Constants.GROUP, group.getGroupView());
     mav.addObject(Constants.UI_ITEMS, group.getFreeAuthorities());
     mav.addObject(Constants.GROUP_AUTHORITIES, group.getAuthorities());
     return mav;
   } else {
     throw new AuthorityNotFoundException("id not found");
   }
 }
 /**
  * selection
  *
  * @param ids a {@link java.lang.String} object.
  * @param req a {@link javax.servlet.http.HttpServletRequest} object.
  * @return a {@link org.springframework.web.servlet.ModelAndView} object.
  */
 @RequestMapping("/group.selection.page")
 public ModelAndView selection(
     @RequestParam("includedHidden") String ids, HttpServletRequest req) {
   Group group = WebUtils.getGroup(req);
   if (group != null && ids.length() > 0) {
     group.setNewAuthorities(WebUtils.extractIdGrantedAuthorityFromString(ids, Constants.COMMA));
   } else {
     group.setNewAuthorities(new ArrayList<Integer>());
   }
   group.save();
   return new ModelAndView(
       new StringBuilder(Constants.REDIRECT_GROUP_LIST)
           .append("?")
           .append(Constants.GROUP_ID)
           .append("=")
           .append(group.getId())
           .toString());
 }
 /**
  * detail
  *
  * @param req a {@link javax.servlet.http.HttpServletRequest} object.
  * @return a {@link org.springframework.web.servlet.ModelAndView} object.
  */
 @RequestMapping("/group.detail.page")
 public ModelAndView detail(HttpServletRequest req) {
   Group group = WebUtils.getGroup(req);
   return new ModelAndView("group/detail", Constants.GROUP, group.getGroupView());
 }