magoffin.matt.ma2.web
Class SetupWizard

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 magoffin.matt.ma2.web.AbstractWizardForm
                                  extended by magoffin.matt.ma2.web.SetupWizard
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.servlet.mvc.Controller

public class SetupWizard
extends AbstractWizardForm

Wizard for configuring Matte options, when running for the first time.

Version:
$Revision: 43 $ $Date: 2007-10-21 11:10:01 +1300 (Sun, 21 Oct 2007) $
Author:
Matt Magoffin (spamsqr@msqr.us)

Nested Class Summary
static class SetupWizard.Command
          Command object for SetupWizard.
static class SetupWizard.SetupCommandValidator
          Validator class for SetupCommand.
 
Field Summary
static java.lang.String SETTING_KEY_ADMIN_REQUIRED_FOR_SETUP
          The XwebParameter key for the "admin required for setup" boolean flag.
static java.lang.String SETTING_KEY_SETUP_COMPLETE
          The XwebParameter key for the "setup complete" boolean flag.
 
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
HEADER_CACHE_CONTROL, HEADER_EXPIRES, HEADER_PRAGMA, METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
SetupWizard()
           
 
Method Summary
protected  java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request)
           
 java.util.Properties getAdvancedProperties()
           
 int getAdvancedPropertiesPage()
           
 java.util.Map<java.lang.String,java.lang.String> getDefaultSettings()
           
 java.lang.String getOriginalHibernateDialect()
           
 magoffin.matt.xweb.util.XwebParamDao getSettingDao()
           
protected  int getTargetPage(javax.servlet.http.HttpServletRequest request, java.lang.Object command, org.springframework.validation.Errors errors, int currentPage)
           
 boolean isRequireAdmin()
           
protected  org.springframework.web.servlet.ModelAndView processFinish(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object command, org.springframework.validation.BindException errors)
           
protected  java.util.Map referenceData(javax.servlet.http.HttpServletRequest request, int page)
           
 void setAdvancedProperties(java.util.Properties advancedProperties)
           
 void setAdvancedPropertiesPage(int advancedPropertiesPage)
           
 void setDefaultSettings(java.util.Map<java.lang.String,java.lang.String> defaultSettings)
           
 void setOriginalHibernateDialect(java.lang.String originalHibernateDialect)
           
 void setRequireAdmin(boolean requireAdmin)
           
 void setSettingDao(magoffin.matt.xweb.util.XwebParamDao settingDao)
           
protected  void validatePage(java.lang.Object command, org.springframework.validation.Errors errors, int page)
           
 
Methods inherited from class magoffin.matt.ma2.web.AbstractWizardForm
getCancelView, getDomainObjectFactory, getSuccessView, getSystemBiz, getWebHelper, initApplicationContext, setCancelView, setDomainObjectFactory, setSuccessView, setSystemBiz, setWebHelper
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractWizardFormController
getCurrentPage, getInitialPage, getInitialPage, getPageAttribute, getPageCount, getPageCount, getPages, getPageSessionAttributeName, getPageSessionAttributeName, getTargetPage, getViewName, handleInvalidSubmit, isAllowDirtyBack, isAllowDirtyForward, isCancel, isCancelRequest, isFinish, isFinishRequest, isFormSubmission, onBindAndValidate, onBindAndValidate, postProcessPage, processCancel, processFormSubmission, referenceData, referenceData, setAllowDirtyBack, setAllowDirtyForward, setPageAttribute, setPages, showForm, showPage, validatePage
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractFormController
currentFormObject, 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, initBinder, isValidateOnBinding, onBind, onBind, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators, suppressBinding, suppressValidation
 
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, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired
 
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

SETTING_KEY_SETUP_COMPLETE

public static final java.lang.String SETTING_KEY_SETUP_COMPLETE
The XwebParameter key for the "setup complete" boolean flag.

See Also:
Constant Field Values

SETTING_KEY_ADMIN_REQUIRED_FOR_SETUP

public static final java.lang.String SETTING_KEY_ADMIN_REQUIRED_FOR_SETUP
The XwebParameter key for the "admin required for setup" boolean flag.

See Also:
Constant Field Values
Constructor Detail

SetupWizard

public SetupWizard()
Method Detail

validatePage

protected void validatePage(java.lang.Object command,
                            org.springframework.validation.Errors errors,
                            int page)
Overrides:
validatePage in class org.springframework.web.servlet.mvc.AbstractWizardFormController

formBackingObject

protected java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request)
                                      throws java.lang.Exception
Overrides:
formBackingObject in class org.springframework.web.servlet.mvc.AbstractFormController
Throws:
java.lang.Exception

getTargetPage

protected int getTargetPage(javax.servlet.http.HttpServletRequest request,
                            java.lang.Object command,
                            org.springframework.validation.Errors errors,
                            int currentPage)
Overrides:
getTargetPage in class org.springframework.web.servlet.mvc.AbstractWizardFormController

referenceData

protected java.util.Map referenceData(javax.servlet.http.HttpServletRequest request,
                                      int page)
                               throws java.lang.Exception
Overrides:
referenceData in class org.springframework.web.servlet.mvc.AbstractWizardFormController
Throws:
java.lang.Exception

processFinish

protected org.springframework.web.servlet.ModelAndView processFinish(javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     java.lang.Object command,
                                                                     org.springframework.validation.BindException errors)
                                                              throws java.lang.Exception
Specified by:
processFinish in class org.springframework.web.servlet.mvc.AbstractWizardFormController
Throws:
java.lang.Exception

getDefaultSettings

public java.util.Map<java.lang.String,java.lang.String> getDefaultSettings()
Returns:
the defaultSettings

setDefaultSettings

public void setDefaultSettings(java.util.Map<java.lang.String,java.lang.String> defaultSettings)
Parameters:
defaultSettings - the defaultSettings to set

getOriginalHibernateDialect

public java.lang.String getOriginalHibernateDialect()
Returns:
the originalHibernateDialect

setOriginalHibernateDialect

public void setOriginalHibernateDialect(java.lang.String originalHibernateDialect)
Parameters:
originalHibernateDialect - the originalHibernateDialect to set

getSettingDao

public magoffin.matt.xweb.util.XwebParamDao getSettingDao()
Returns:
the settingDao

setSettingDao

public void setSettingDao(magoffin.matt.xweb.util.XwebParamDao settingDao)
Parameters:
settingDao - the settingDao to set

isRequireAdmin

public boolean isRequireAdmin()
Returns:
the requireAdmin

setRequireAdmin

public void setRequireAdmin(boolean requireAdmin)
Parameters:
requireAdmin - the requireAdmin to set

getAdvancedProperties

public java.util.Properties getAdvancedProperties()
Returns:
the advancedProperties

setAdvancedProperties

public void setAdvancedProperties(java.util.Properties advancedProperties)
Parameters:
advancedProperties - the advancedProperties to set

getAdvancedPropertiesPage

public int getAdvancedPropertiesPage()
Returns:
the advancedPropertiesPage

setAdvancedPropertiesPage

public void setAdvancedPropertiesPage(int advancedPropertiesPage)
Parameters:
advancedPropertiesPage - the advancedPropertiesPage to set