// FIXME: remove GET support, only for testing @RequestMapping( method = {RequestMethod.GET, RequestMethod.POST}, value = {"/addParticipant.*", "/saveParticipant.*"}) public String createParticipant( HttpServletRequest request, Model model, @Valid ParticipantCommand input, Errors errors) { Participant newParticipant = participantAdminBiz.storeParticipant(input.getParticipant()); model.addAttribute(MODEL_KEY_RESULT, newParticipant); return WebUtils.resolveViewFromUrlExtension(request, getViewName()); }
// FIXME: remove GET support, only for testing @RequestMapping( method = {RequestMethod.GET, RequestMethod.POST}, value = "/saveParticipantGroupCapability.*") public String storeParticipantGroupCapability( HttpServletRequest request, Model model, CapableParticipantGroup input) { Capability result = participantAdminBiz.storeParticipantGroupCapability(input.getId(), input.getCapability()); model.addAttribute(MODEL_KEY_RESULT, result); return WebUtils.resolveViewFromUrlExtension(request, getViewName()); }
// FIXME: remove GET support, only for testing @RequestMapping( method = {RequestMethod.GET, RequestMethod.POST}, value = "/assignParticipantGroupMembers.*") public String assignParticipantGroupMembers( HttpServletRequest request, Model model, MembershipCommand input) { EffectiveCollection<ParticipantGroup, ? extends Member> result = participantAdminBiz.assignParticipantGroupMembers(input); model.addAttribute(MODEL_KEY_RESULT, result); return WebUtils.resolveViewFromUrlExtension(request, getViewName()); }
// FIXME: remove GET support, only for testing @RequestMapping( method = {RequestMethod.GET, RequestMethod.POST}, value = {"/addParticipantGroup.*", "/saveParticipantGroup.*"}) public String createParticipantGroup( HttpServletRequest request, Model model, @Valid ParticipantGroupCommand input, Errors errors) { try { ParticipantGroup newParticipantGroup = participantAdminBiz.storeParticipantGroup(input.getParticipantGroup()); model.addAttribute(MODEL_KEY_RESULT, newParticipantGroup); } catch (DuplicateKeyException e) { log.debug( "Duplicate key violation adding new participantGroup [{}]", input.getParticipantGroup().getName()); errors.rejectValue("participantGroup.name", "name.taken"); } return WebUtils.resolveViewFromUrlExtension(request, getViewName()); }