private ModelAndView deleteGroupInternal( HttpServletRequest request, HttpServletResponse response, UserGroupDAO userGroupRequest) { if (notNull(userGroupRequest.getPid())) { userGroupRequest.setType(Constants.DELETE_GROUP); userGroupRequest.setAdminName(request.getRemoteUser()); UserGroupDAO userGroupResponse = uiWebService.userGroupOperation(userGroupRequest); userGroupRequest.setMessage(chooseMessage(request, userGroupResponse)); } else { userGroupRequest.setMessage(""); userGroupRequest.setPid(""); } userGroupRequest.setType(Constants.GET_GROUPS); UserGroupDAO userGroupResponse = uiWebService.userGroupOperation(userGroupRequest); userGroupRequest.getGroups().clear(); userGroupRequest.getGroups().addAll(userGroupResponse.getGroups()); return new ModelAndView("deletegroup", "userGroupDAO", userGroupRequest); }
private ModelAndView createUserInternal( HttpServletRequest request, HttpServletResponse response, UserGroupDAO userGroupRequest) { if ((notNull(userGroupRequest.getUserName())) && (notNull(userGroupRequest.getOnyen()))) { userGroupRequest.setType(Constants.CREATE_USER); userGroupRequest.setAdminName(request.getRemoteUser()); UserGroupDAO userGroupResponse = uiWebService.userGroupOperation(userGroupRequest); userGroupRequest.setMessage(chooseMessage(request, userGroupResponse)); } else { // no user name String msg = new RequestContext(request).getMessage("um.user.noname", ""); userGroupRequest.setMessage(msg); } return new ModelAndView("createuser", "userGroupDAO", userGroupRequest); }
private ModelAndView createGroupInternal( HttpServletRequest request, HttpServletResponse response, UserGroupDAO userGroupRequest) { if (notNull(userGroupRequest.getGroupName())) { userGroupRequest.setType(Constants.CREATE_GROUP); userGroupRequest.setAdminName(request.getRemoteUser()); UserGroupDAO userGroupResponse = uiWebService.userGroupOperation(userGroupRequest); userGroupRequest.setMessage(chooseMessage(request, userGroupResponse)); } else { // no group name String msg = new RequestContext(request).getMessage("um.group.noname", ""); userGroupRequest.setMessage(msg); } // TODO Need to handle duplicate group, null group return new ModelAndView("creategroup", "userGroupDAO", userGroupRequest); }