org.telscenter.sail.webapp.presentation.web.controllers.forgotaccount.student
Class PasswordReminderWizardController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.mvc.AbstractController
                  extended by org.springframework.web.servlet.mvc.BaseCommandController
                      extended by org.springframework.web.servlet.mvc.AbstractFormController
                          extended by org.springframework.web.servlet.mvc.AbstractWizardFormController
                              extended by org.telscenter.sail.webapp.presentation.web.controllers.forgotaccount.student.PasswordReminderWizardController
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

public class PasswordReminderWizardController
extends org.springframework.web.servlet.mvc.AbstractWizardFormController

Controller for the wizard to "Remind the student of their password" The default getTargetPage() method is used to find out which page to navigate to, so the controller looks for a request parameter starting with "_target" and ending with a number (e.g. "_target1"). The jsp pages should provide these parameters. General method invocation flow (when user clicks on "prev" and "next"): 1) onBind 2) onBindAndValidate 3) validatePage 4) referenceData Note that on user's first visit to the first page of the wizard, only referenceData will be invoked, and steps 1-4 are bypassed.

Version:
$Id$
Author:
Anthony Perritano

Field Summary
protected  UserService userService
           
 
Fields inherited from class org.springframework.web.servlet.mvc.AbstractWizardFormController
PARAM_CANCEL, PARAM_FINISH, PARAM_PAGE, PARAM_TARGET
 
Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandController
DEFAULT_COMMAND_NAME
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
PasswordReminderWizardController()
          Constructor - Specify the pages in the wizard - Specify the command name
 
Method Summary
protected  void onBind(javax.servlet.http.HttpServletRequest request, Object command, org.springframework.validation.BindException errors)
           
protected  org.springframework.web.servlet.ModelAndView processCancel(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object command, org.springframework.validation.BindException errors)
          This method is called if there is a submit that contains the "_cancel" request parameter.
protected  org.springframework.web.servlet.ModelAndView processFinish(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object command, org.springframework.validation.BindException errors)
          changes the password This method is called if there is a submit that validates and contains the "_finish" request parameter.
protected  Map<String,Object> referenceData(javax.servlet.http.HttpServletRequest request, Object command, org.springframework.validation.Errors errors, int page)
          This method is called right before the view is rendered to the user
 void setUserService(UserService userService)
          Sets the userDetailsService object.
protected  void validatePage(Object command, org.springframework.validation.Errors errors, int page)
          This method is called after the onBind and onBindAndValidate method.
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractWizardFormController
getCurrentPage, getInitialPage, getInitialPage, getPageAttribute, getPageCount, getPageCount, getPages, getPageSessionAttributeName, getPageSessionAttributeName, getTargetPage, getTargetPage, getViewName, handleInvalidSubmit, isAllowDirtyBack, isAllowDirtyForward, isCancelRequest, isFinishRequest, isFormSubmission, onBindAndValidate, onBindAndValidate, postProcessPage, processFormSubmission, referenceData, referenceData, setAllowDirtyBack, setAllowDirtyForward, setPageAttribute, setPages, showForm, showPage, validatePage
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractFormController
currentFormObject, formBackingObject, getCommand, getErrorsForNewForm, getFormSessionAttributeName, getFormSessionAttributeName, handleRequestInternal, isBindOnNewForm, isSessionForm, onBindOnNewForm, onBindOnNewForm, setBindOnNewForm, setSessionForm, showForm, showForm, showNewForm
 
Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController
bindAndValidate, checkCommand, createBinder, createCommand, getBindingErrorProcessor, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getValidator, getValidators, getWebBindingInitializer, initApplicationContext, initBinder, isValidateOnBinding, onBind, prepareBinder, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators, setWebBindingInitializer, suppressBinding, suppressValidation, suppressValidation, suppressValidation, useDirectFieldAccess
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userService

protected UserService userService
Constructor Detail

PasswordReminderWizardController

public PasswordReminderWizardController()
Constructor - Specify the pages in the wizard - Specify the command name

Method Detail

onBind

protected void onBind(javax.servlet.http.HttpServletRequest request,
                      Object command,
                      org.springframework.validation.BindException errors)
               throws Exception
Overrides:
onBind in class org.springframework.web.servlet.mvc.BaseCommandController
Throws:
Exception
See Also:
BaseCommandController.onBind(javax.servlet.http.HttpServletRequest, java.lang.Object, org.springframework.validation.BindException)

validatePage

protected void validatePage(Object command,
                            org.springframework.validation.Errors errors,
                            int page)
This method is called after the onBind and onBindAndValidate method. It acts in the same way as the validator

Overrides:
validatePage in class org.springframework.web.servlet.mvc.AbstractWizardFormController
See Also:
AbstractWizardFormController.validatePage(java.lang.Object, org.springframework.validation.Errors, int)

referenceData

protected Map<String,Object> referenceData(javax.servlet.http.HttpServletRequest request,
                                           Object command,
                                           org.springframework.validation.Errors errors,
                                           int page)
This method is called right before the view is rendered to the user

Overrides:
referenceData in class org.springframework.web.servlet.mvc.AbstractWizardFormController
See Also:
AbstractWizardFormController.referenceData(javax.servlet.http.HttpServletRequest, int)

processFinish

protected org.springframework.web.servlet.ModelAndView processFinish(javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     Object command,
                                                                     org.springframework.validation.BindException errors)
                                                              throws Exception
changes the password This method is called if there is a submit that validates and contains the "_finish" request parameter.

Specified by:
processFinish in class org.springframework.web.servlet.mvc.AbstractWizardFormController
Throws:
Exception
See Also:
AbstractWizardFormController.processFinish(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, org.springframework.validation.BindException)

processCancel

protected org.springframework.web.servlet.ModelAndView processCancel(javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     Object command,
                                                                     org.springframework.validation.BindException errors)
This method is called if there is a submit that contains the "_cancel" request parameter.

Overrides:
processCancel in class org.springframework.web.servlet.mvc.AbstractWizardFormController
See Also:
AbstractWizardFormController.processCancel(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, org.springframework.validation.BindException)

setUserService

public void setUserService(UserService userService)
Sets the userDetailsService object.

Parameters:
userDetailsService -


Copyright © 2012. All Rights Reserved.