Class AccountController
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.web.controllers.settings.account.AccountController
-
@Controller public class AccountController extends java.lang.ObjectThe controller that deals with account settings pages
-
-
Constructor Summary
Constructors Constructor Description AccountController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringemailGetFragment(org.springframework.ui.Model model, boolean isAjax, AccountWrapper account)Handles GET requests to the email fragment of the account pagejava.lang.StringemailPostFragment(boolean isAjax, AccountWrapper account, @Valid AccountEmailForm accountEmailForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model)Handles the POST requests to the email fragment on the accounts pagejava.lang.StringindexGet()Handles requests to the account pagejava.lang.StringnameGetFragment(org.springframework.ui.Model model, boolean isAjax, AccountWrapper account)Handles GET requests to the name fragment on the account pagejava.lang.StringnamePostFragment(boolean isAjax, AccountWrapper account, @Valid AccountNameForm accountNameForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model)Handles POST requests to the name fragment on the account pagejava.lang.StringpasswordGetFragment(org.springframework.ui.Model model, boolean isAjax)Handles GET requests to the password fragment on the account pagejava.lang.StringpasswordPostFragment(boolean isAjax, AccountWrapper account, @Valid AccountPasswordForm accountPasswordForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model)Handles POST requests to the password fragment on the accounts page
-
-
-
Method Detail
-
indexGet
@GetMapping("/account") public java.lang.String indexGet()Handles requests to the account page- Returns:
- the path to the account page
-
nameGetFragment
@GetMapping("/account/name") public java.lang.String nameGetFragment(org.springframework.ui.Model model, @ModelAttribute("isAjax") boolean isAjax, @ModelAttribute("account") AccountWrapper account) throws NotAjaxRequestHandles GET requests to the name fragment on the account page- Parameters:
model- holder for model attributesisAjax- whether or not the request was ajax or notaccount- the account wrapper for the logged in user- Returns:
- the path to the name fragment
- Throws:
NotAjaxRequest- if the request was not an ajax one, the message is where to redirect the user to
-
namePostFragment
@PostMapping("/account/name") public java.lang.String namePostFragment(@ModelAttribute("isAjax") boolean isAjax, @ModelAttribute("account") AccountWrapper account, @Valid @ModelAttribute @Valid AccountNameForm accountNameForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model) throws NotAjaxRequestHandles POST requests to the name fragment on the account page- Parameters:
isAjax- whether or not the request was ajax or notaccount- the account wrapper for the logged in useraccountNameForm- the form that should be submitted in the requestresult- the results of the validation on the form abovemodel- holder for model attributes- Returns:
- the path to the name fragment
- Throws:
NotAjaxRequest- if the request was not an ajax one, the message is where to redirect the user to
-
emailGetFragment
@GetMapping("/account/email") public java.lang.String emailGetFragment(org.springframework.ui.Model model, @ModelAttribute("isAjax") boolean isAjax, @ModelAttribute("account") AccountWrapper account) throws NotAjaxRequestHandles GET requests to the email fragment of the account page- Parameters:
model- holder for model attributesisAjax- whether or not the request was ajax or notaccount- the account wrapper for the logged in user- Returns:
- the path to the email fragment
- Throws:
NotAjaxRequest- if the request was not an ajax one, the message is where to redirect the user to
-
emailPostFragment
@PostMapping("/account/email") public java.lang.String emailPostFragment(@ModelAttribute("isAjax") boolean isAjax, @ModelAttribute("account") AccountWrapper account, @Valid @ModelAttribute @Valid AccountEmailForm accountEmailForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model) throws NotAjaxRequestHandles the POST requests to the email fragment on the accounts page- Parameters:
isAjax- whether or not the request was ajax or notaccount- the account wrapper for the logged in useraccountEmailForm- the form that should be submitted in the requestresult- the results of the validation on the form abovemodel- holder for model attributes- Returns:
- the path to the email fragment
- Throws:
NotAjaxRequest- if the request was not an ajax one, the message is where to redirect the user to
-
passwordGetFragment
@GetMapping("/account/password") public java.lang.String passwordGetFragment(org.springframework.ui.Model model, @ModelAttribute("isAjax") boolean isAjax) throws NotAjaxRequestHandles GET requests to the password fragment on the account page- Parameters:
model- holder for model attributesisAjax- whether or not the request was ajax or not- Returns:
- the path to the password fragment
- Throws:
NotAjaxRequest- if the request was not an ajax one, the message is where to redirect the user to
-
passwordPostFragment
@PostMapping("/account/password") public java.lang.String passwordPostFragment(@ModelAttribute("isAjax") boolean isAjax, @ModelAttribute("account") AccountWrapper account, @Valid @ModelAttribute @Valid AccountPasswordForm accountPasswordForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model) throws NotAjaxRequestHandles POST requests to the password fragment on the accounts page- Parameters:
isAjax- whether or not the request was ajax or notaccount- the account wrapper for the logged in useraccountPasswordForm- the form that should be submitted in the requestresult- the results of the validation on the form abovemodel- holder for model attributes- Returns:
- the path to the password fragment
- Throws:
NotAjaxRequest- if the request was not an ajax one, the message is where to redirect the user to
-
-