org.ikasan.console.web.controller
Class MyAccountController

java.lang.Object
  extended by org.ikasan.console.web.controller.MyAccountController

@Controller
@RequestMapping(value="/users")
@SessionAttributes(value="user")
public class MyAccountController
extends Object

The controller for the various my account views

Author:
Ikasan Development Team

Constructor Summary
MyAccountController(UserService userService, ConsoleService consoleService)
          Constructor
 
Method Summary
 org.springframework.web.servlet.ModelAndView changePassword(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Navigate to the change password page for a user (not an administrator)
 org.springframework.web.servlet.ModelAndView forgotPassword()
          Takes the user to the forgotPassword screen
 org.springframework.web.servlet.ModelAndView myAccount(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.ModelMap model)
          Navigate to the my account page for a user (not an administrator)
 org.springframework.web.servlet.ModelAndView sendPassword(String username, org.springframework.ui.ModelMap model)
          Send the new Password to the user TODO Split tasks into individual methods
 org.springframework.web.servlet.ModelAndView userChangePassword(User user, String confirmNewPassword, org.springframework.ui.ModelMap model)
          Accepts submission of the changePassword form
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyAccountController

@Autowired
public MyAccountController(UserService userService,
                                     ConsoleService consoleService)
Constructor

Parameters:
userService - - The user service to use
consoleService - - The console service to use
Method Detail

changePassword

@RequestMapping(value="changePassword.htm",
                method=GET)
public org.springframework.web.servlet.ModelAndView changePassword(javax.servlet.http.HttpServletRequest request,
                                                                                  javax.servlet.http.HttpServletResponse response)
Navigate to the change password page for a user (not an administrator)

Parameters:
request - - Standard HTTP Request
response - - Standard HTTP Response
Returns:
- Model and View for changePassword

myAccount

@RequestMapping(value="myAccount.htm",
                method=GET)
public org.springframework.web.servlet.ModelAndView myAccount(javax.servlet.http.HttpServletRequest request,
                                                                             javax.servlet.http.HttpServletResponse response,
                                                                             org.springframework.ui.ModelMap model)
Navigate to the my account page for a user (not an administrator)

Parameters:
request - - Standard HTTP Request
response - - Standard HTTP Response- The model, contains the user amongst other things
model - - The model, will need to contain the user amongst other things
Returns:
- Model and View for myAccount

userChangePassword

@RequestMapping(value="userChangePassword.htm",
                method=POST)
public org.springframework.web.servlet.ModelAndView userChangePassword(@ModelAttribute(value="user")
                                                                                      User user,
                                                                                      @RequestParam(required=false)
                                                                                      String confirmNewPassword,
                                                                                      org.springframework.ui.ModelMap model)
Accepts submission of the changePassword form

Parameters:
user - - The user we're changing the password for
confirmNewPassword - - The password again, for confirmation
model - - The model to add any errors too if required
Returns:
Back to the changePassword screen in case of error, else back to the myAccount screen

forgotPassword

@RequestMapping(value="forgotPassword.htm",
                method=GET)
public org.springframework.web.servlet.ModelAndView forgotPassword()
Takes the user to the forgotPassword screen

Returns:
forgotPassword screen

sendPassword

@RequestMapping(value="sendPassword.htm",
                method=POST)
public org.springframework.web.servlet.ModelAndView sendPassword(@RequestParam(required=false)
                                                                                String username,
                                                                                org.springframework.ui.ModelMap model)
Send the new Password to the user TODO Split tasks into individual methods

Parameters:
username - - User to send the new password to
model - - The model to hold errors
Returns:
- On success, return the user to the login screen, else return back to the forgot password screen


Copyright © 2007-2014 Ikasan. All Rights Reserved.