Class SubaccountController


  • @Controller
    public class SubaccountController
    extends java.lang.Object
    The controller that deals with all the admin sub-account pages
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String deleteGet​(org.springframework.ui.Model model)
      Handles GET requests to the delete account page
      java.lang.String deletePost​(@Valid PasswordForm passwordForm, org.springframework.validation.BindingResult result, AccountWrapper subAccount, AccountWrapper account, org.springframework.ui.Model model)
      Handles POST requests to the delete account page
      java.lang.String manageGet​(AccountWrapper subAccount, org.springframework.ui.Model model)
      Handles GET requests to the manage account page
      java.lang.String managePost​(@Valid AccountForm accountForm, org.springframework.validation.BindingResult result, AccountWrapper subAccount, AccountWrapper account, org.springframework.ui.Model model)
      Handles POST requests to the manage account page, updates the username, email and roles based on the form contents
      java.lang.String passwordGet​(org.springframework.ui.Model model)
      Handles GET requests to the reset password page
      java.lang.String passwordPost​(@Valid PasswordForm passwordForm, org.springframework.validation.BindingResult result, AccountWrapper subAccount, AccountWrapper account, org.springframework.ui.Model model)
      Handles POST requests to the reset password page
      • Methods inherited from class java.lang.Object

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

      • SubaccountController

        public SubaccountController()
    • Method Detail

      • manageGet

        @GetMapping("/admin/manage/{pathid}")
        public java.lang.String manageGet​(@ModelAttribute("subAccount")
                                          AccountWrapper subAccount,
                                          org.springframework.ui.Model model)
        Handles GET requests to the manage account page
        Parameters:
        subAccount - the account being managed
        model - holder for model attributes
        Returns:
        the path to the manage account page
      • managePost

        @PostMapping("/admin/manage/{pathid}")
        public java.lang.String managePost​(@Valid @ModelAttribute
                                           @Valid AccountForm accountForm,
                                           org.springframework.validation.BindingResult result,
                                           @ModelAttribute("subAccount")
                                           AccountWrapper subAccount,
                                           @ModelAttribute("account")
                                           AccountWrapper account,
                                           org.springframework.ui.Model model)
        Handles POST requests to the manage account page, updates the username, email and roles based on the form contents
        Parameters:
        accountForm - the form that should be submitted in the request
        result - the results of the validation on the form above
        subAccount - the account being managed
        account - the account wrapper for the logged in user
        model - holder for model attributes
        Returns:
        the path to the manage account page
      • passwordGet

        @GetMapping("/admin/password/{pathid}")
        public java.lang.String passwordGet​(org.springframework.ui.Model model)
        Handles GET requests to the reset password page
        Parameters:
        model - holder for model attributes
        Returns:
        the path to the reset page
      • passwordPost

        @PostMapping("/admin/password/{pathid}")
        public java.lang.String passwordPost​(@Valid @ModelAttribute
                                             @Valid PasswordForm passwordForm,
                                             org.springframework.validation.BindingResult result,
                                             @ModelAttribute("subAccount")
                                             AccountWrapper subAccount,
                                             @ModelAttribute("account")
                                             AccountWrapper account,
                                             org.springframework.ui.Model model)
        Handles POST requests to the reset password page
        Parameters:
        passwordForm - the form that should be submitted in the request
        result - the results of the validation on the form above
        subAccount - the account being managed
        account - the account wrapper for the logged in user
        model - holder for model attributes
        Returns:
        the path to the reset password page
      • deleteGet

        @GetMapping("/admin/delete/{pathid}")
        public java.lang.String deleteGet​(org.springframework.ui.Model model)
        Handles GET requests to the delete account page
        Parameters:
        model - holder for model attributes
        Returns:
        the path to the delete page
      • deletePost

        @PostMapping("/admin/delete/{pathid}")
        public java.lang.String deletePost​(@Valid @ModelAttribute
                                           @Valid PasswordForm passwordForm,
                                           org.springframework.validation.BindingResult result,
                                           @ModelAttribute("subAccount")
                                           AccountWrapper subAccount,
                                           @ModelAttribute("account")
                                           AccountWrapper account,
                                           org.springframework.ui.Model model)
        Handles POST requests to the delete account page
        Parameters:
        passwordForm - the form that should be submitted in the request
        result - the results of the validation on the form above
        subAccount - the account being managed
        account - the account wrapper for the logged in user
        model - holder for model attributes
        Returns:
        the path to the delete page