java.lang.Object
de.digitalcollections.commons.springmvc.controller.AbstractController
de.digitalcollections.cudami.admin.controller.security.UsersController

@Controller @SessionAttributes("user") public class UsersController extends de.digitalcollections.commons.springmvc.controller.AbstractController
Controller for all "Users" pages.
  • Constructor Summary

    Constructors
    Constructor
    Description
    UsersController(UserService service, org.springframework.context.MessageSource messageSource)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    activate(UUID uuid, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
     
    create(String password1, String password2, @Valid de.digitalcollections.model.security.User user, org.springframework.validation.BindingResult results, org.springframework.ui.Model model, org.springframework.web.bind.support.SessionStatus status, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
     
    create(org.springframework.ui.Model model)
     
    deactivate(UUID uuid, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
     
    edit(UUID uuid, String password1, String password2, @Valid de.digitalcollections.model.security.User user, org.springframework.validation.BindingResult results, org.springframework.ui.Model model, org.springframework.web.bind.support.SessionStatus status, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
     
    edit(UUID uuid, org.springframework.ui.Model model)
     
     
    protected String
     
    protected List<de.digitalcollections.model.security.Role>
     
    updatePassword(String password1, String password2, @Valid de.digitalcollections.model.security.User user, org.springframework.validation.BindingResult results, org.springframework.ui.Model model, org.springframework.web.bind.support.SessionStatus status, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
     
    updatePassword(org.springframework.ui.Model model)
     
    view(UUID uuid, org.springframework.ui.Model model)
     

    Methods inherited from class de.digitalcollections.commons.springmvc.controller.AbstractController

    verifyBinding

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UsersController

      public UsersController(UserService service, org.springframework.context.MessageSource messageSource)
  • Method Details

    • activate

      @GetMapping("/users/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/activate") public String activate(@PathVariable UUID uuid, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • create

      @GetMapping("/users/new") public String create(org.springframework.ui.Model model) throws ServiceException
      Throws:
      ServiceException
    • create

      @PostMapping("/users/new") public String create(@RequestParam(value="pwd1",required=false) String password1, @RequestParam(value="pwd2",required=false) String password2, @ModelAttribute(name="user") @Valid @Valid de.digitalcollections.model.security.User user, org.springframework.validation.BindingResult results, org.springframework.ui.Model model, org.springframework.web.bind.support.SessionStatus status, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws ServiceException
      Throws:
      ServiceException
    • deactivate

      @GetMapping("/users/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/deactivate") public String deactivate(@PathVariable UUID uuid, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • edit

      @GetMapping("/users/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/edit") public String edit(@PathVariable UUID uuid, org.springframework.ui.Model model) throws ServiceException
      Throws:
      ServiceException
    • edit

      @PostMapping("/users/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/edit") public String edit(@PathVariable UUID uuid, @RequestParam(name="pwd1",required=false) String password1, @RequestParam(name="pwd2",required=false) String password2, @ModelAttribute(name="user") @Valid @Valid de.digitalcollections.model.security.User user, org.springframework.validation.BindingResult results, org.springframework.ui.Model model, org.springframework.web.bind.support.SessionStatus status, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws ServiceException
      Throws:
      ServiceException
    • list

      @GetMapping("/users") public String list()
    • module

      @ModelAttribute("menu") protected String module()
    • populateAllRoles

      @ModelAttribute("allRoles") protected List<de.digitalcollections.model.security.Role> populateAllRoles()
    • updatePassword

      @GetMapping("/users/updatePassword") public String updatePassword(org.springframework.ui.Model model) throws ServiceException
      Throws:
      ServiceException
    • updatePassword

      @PostMapping("/users/updatePassword") public String updatePassword(@RequestParam("pwd1") String password1, @RequestParam("pwd2") String password2, @ModelAttribute(name="user") @Valid @Valid de.digitalcollections.model.security.User user, org.springframework.validation.BindingResult results, org.springframework.ui.Model model, org.springframework.web.bind.support.SessionStatus status, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws ServiceException
      Throws:
      ServiceException
    • view

      @GetMapping("/users/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}") public String view(@PathVariable UUID uuid, org.springframework.ui.Model model) throws de.digitalcollections.model.exception.ResourceNotFoundException, ServiceException
      Throws:
      de.digitalcollections.model.exception.ResourceNotFoundException
      ServiceException