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

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

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

    Modifier and Type Method Description
    java.lang.String activate​(java.util.UUID uuid, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)  
    java.lang.String create​(java.lang.String password1, java.lang.String password2, @Valid de.digitalcollections.model.impl.security.UserImpl 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)  
    java.lang.String create​(org.springframework.ui.Model model)  
    java.lang.String deactivate​(java.util.UUID uuid, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)  
    java.lang.String edit​(java.util.UUID uuid, java.lang.String password1, java.lang.String password2, @Valid de.digitalcollections.model.impl.security.UserImpl 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)  
    java.lang.String edit​(java.util.UUID uuid, org.springframework.ui.Model model)  
    protected void initBinder​(org.springframework.web.bind.WebDataBinder binder)  
    java.lang.String list​(org.springframework.ui.Model model, org.springframework.data.domain.Pageable pageable)  
    protected java.lang.String module()  
    protected java.util.List<de.digitalcollections.model.api.security.enums.Role> populateAllRoles()  
    java.lang.String updatePassword​(java.lang.String password1, java.lang.String password2, @Valid de.digitalcollections.model.impl.security.UserImpl 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)  
    java.lang.String updatePassword​(org.springframework.ui.Model model)  
    java.lang.String view​(java.util.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

    • UserController

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

    • module

      @ModelAttribute("menu") protected java.lang.String module()
    • populateAllRoles

      @ModelAttribute("allRoles") protected java.util.List<de.digitalcollections.model.api.security.enums.Role> populateAllRoles()
    • initBinder

      @InitBinder("user") protected void initBinder​(org.springframework.web.bind.WebDataBinder binder)
    • activate

      @GetMapping("/users/{uuid}/activate") public java.lang.String activate​(@PathVariable java.util.UUID uuid, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws ServiceException
      Throws:
      ServiceException
    • create

      @GetMapping("/users/new") public java.lang.String create​(org.springframework.ui.Model model)
    • create

      @PostMapping("/users/new") public java.lang.String create​(@RequestParam("pwd1") java.lang.String password1, @RequestParam("pwd2") java.lang.String password2, @ModelAttribute(name="user") @Valid @Valid de.digitalcollections.model.impl.security.UserImpl 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}/deactivate") public java.lang.String deactivate​(@PathVariable java.util.UUID uuid, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws ServiceException
      Throws:
      ServiceException
    • edit

      @GetMapping("/users/{uuid}/edit") public java.lang.String edit​(@PathVariable java.util.UUID uuid, org.springframework.ui.Model model) throws ServiceException
      Throws:
      ServiceException
    • edit

      @PostMapping("/users/{uuid}/edit") public java.lang.String edit​(@PathVariable java.util.UUID uuid, @RequestParam(name="pwd1",required=false) java.lang.String password1, @RequestParam(name="pwd2",required=false) java.lang.String password2, @ModelAttribute(name="user") @Valid @Valid de.digitalcollections.model.impl.security.UserImpl 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 java.lang.String list​(org.springframework.ui.Model model, @PageableDefault(sort="email",direction=ASC,size=25) org.springframework.data.domain.Pageable pageable) throws ServiceException
      Throws:
      ServiceException
    • updatePassword

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

      @PostMapping("/users/updatePassword") public java.lang.String updatePassword​(@RequestParam("pwd1") java.lang.String password1, @RequestParam("pwd2") java.lang.String password2, @ModelAttribute(name="user") @Valid @Valid de.digitalcollections.model.impl.security.UserImpl 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}") public java.lang.String view​(@PathVariable java.util.UUID uuid, org.springframework.ui.Model model) throws ServiceException
      Throws:
      ServiceException