magoffin.matt.ma2.web
Class AlbumForm

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

public class AlbumForm
extends AbstractForm

Form controller for administering album details.

The configurable properties of this class are:

albumDateFormat
The date format to use for parsing album date strings.
mediaBiz
The MediaBiz to use for storing the album.

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 AlbumForm.Command
          The command class.
 
Field Summary
static java.lang.String DEFAULT_ALBUM_DATE_FORMAT
          The default value for the albumDateFormat property.
static java.lang.String UI_METADATA_REMOVE_PARENT
          A UiMetadata key for removing an album parent, if the value is "true".
 
Fields inherited from class magoffin.matt.ma2.web.AbstractForm
HTTP_USER_AGENT_HEADER, PARAM_CANCEL
 
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
AlbumForm()
           
 
Method Summary
protected  java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request)
           
 magoffin.matt.util.ThreadSafeDateFormat getAlbumDateFormat()
           
 MediaBiz getMediaBiz()
           
protected  void initBinder(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.ServletRequestDataBinder binder)
           
protected  org.springframework.web.servlet.ModelAndView onSubmit(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, java.lang.Object command, org.springframework.validation.Errors errors)
           
 void setAlbumDateFormat(magoffin.matt.util.ThreadSafeDateFormat albumDateFormat)
           
 void setMediaBiz(MediaBiz mediaBiz)
           
 
Methods inherited from class magoffin.matt.ma2.web.AbstractForm
createBinder, getBinderTemplate, getCancelView, getDomainObjectFactory, getSystemBiz, getWebHelper, initApplicationContext, isCancel, processCancel, processFormSubmission, registerCalendarEditor, setBinderTemplate, setCancelView, setDomainObjectFactory, setSystemBiz, setWebHelper
 
Methods inherited from class org.springframework.web.servlet.mvc.SimpleFormController
doSubmitAction, getFormView, getSuccessView, isFormChangeRequest, onFormChange, onFormChange, onSubmit, onSubmit, referenceData, setFormView, setSuccessView, showForm, showForm, suppressValidation
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractFormController
currentFormObject, getCommand, getErrorsForNewForm, getFormSessionAttributeName, getFormSessionAttributeName, handleInvalidSubmit, handleRequestInternal, isBindOnNewForm, isFormSubmission, isSessionForm, onBindOnNewForm, onBindOnNewForm, setBindOnNewForm, setSessionForm, showForm, showForm, showNewForm
 
Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController
bindAndValidate, checkCommand, createCommand, getBindingErrorProcessor, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getValidator, getValidators, isValidateOnBinding, onBind, onBind, onBindAndValidate, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators, suppressBinding
 
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

DEFAULT_ALBUM_DATE_FORMAT

public static final java.lang.String DEFAULT_ALBUM_DATE_FORMAT
The default value for the albumDateFormat property.

See Also:
Constant Field Values

UI_METADATA_REMOVE_PARENT

public static final java.lang.String UI_METADATA_REMOVE_PARENT
A UiMetadata key for removing an album parent, if the value is "true".

See Also:
Constant Field Values
Constructor Detail

AlbumForm

public AlbumForm()
Method Detail

referenceData

protected java.util.Map referenceData(javax.servlet.http.HttpServletRequest request,
                                      java.lang.Object command,
                                      org.springframework.validation.Errors errors)
                               throws java.lang.Exception
Overrides:
referenceData in class org.springframework.web.servlet.mvc.SimpleFormController
Throws:
java.lang.Exception

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

onSubmit

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

initBinder

protected void initBinder(javax.servlet.http.HttpServletRequest request,
                          org.springframework.web.bind.ServletRequestDataBinder binder)
                   throws java.lang.Exception
Overrides:
initBinder in class org.springframework.web.servlet.mvc.BaseCommandController
Throws:
java.lang.Exception

getAlbumDateFormat

public magoffin.matt.util.ThreadSafeDateFormat getAlbumDateFormat()
Returns:
the albumDateFormat

setAlbumDateFormat

public void setAlbumDateFormat(magoffin.matt.util.ThreadSafeDateFormat albumDateFormat)
Parameters:
albumDateFormat - the albumDateFormat to set

getMediaBiz

public MediaBiz getMediaBiz()
Returns:
the mediaBiz

setMediaBiz

public void setMediaBiz(MediaBiz mediaBiz)
Parameters:
mediaBiz - the mediaBiz to set