com.sri.emo.wizard.creation.management
Class CreationBeanManager

java.lang.Object
  extended by com.sri.emo.wizard.creation.management.CreationBeanManager
All Implemented Interfaces:
ICreationBeanManager

public class CreationBeanManager
extends Object
implements ICreationBeanManager

Class for managing the completion bean in the session.

Version:
1.0
Author:
Michael Rimov

Field Summary
static String BEAN_NAME
          Attribute name for what is stored in the session.
 
Constructor Summary
CreationBeanManager()
          Default constructor.
 
Method Summary
 CreationBeans createOrRetrieveActionForm(ExpressoRequest request)
          Creates or retrieves the action form.
 void destroyActionForm(ExpressoRequest request)
          Destroys the completion bean from the session.
 CreationBeans getActionForm(ExpressoRequest request)
          Retrieve an action form.
 boolean handleSessionTimeout(ExpressoRequest request, ExpressoResponse response)
          Checks if session has timed out and redirects to 'list wizards' state if it has.
 void setCompletionBean(ExpressoRequest request, CreationBeans wizardBeanToSave)
          Saves the specified completion bean to session.
 ErrorCollection validate(ExpressoRequest request, ErrorCollection errorsToAdd)
          Validate the bean and return any action errors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_NAME

public static final String BEAN_NAME
Attribute name for what is stored in the session.

See Also:
Constant Field Values
Constructor Detail

CreationBeanManager

public CreationBeanManager()
Default constructor.

Method Detail

handleSessionTimeout

public boolean handleSessionTimeout(ExpressoRequest request,
                                    ExpressoResponse response)
                             throws ControllerException
Description copied from interface: ICreationBeanManager
Checks if session has timed out and redirects to 'list wizards' state if it has.

Specified by:
handleSessionTimeout in interface ICreationBeanManager
Parameters:
request - The ControllerRequest handed to us by the framework.
response - ControllerResponse handed to us by the framework.
Returns:
boolean true if we handled a timeout. False otherwise.
Throws:
ControllerException

createOrRetrieveActionForm

public CreationBeans createOrRetrieveActionForm(ExpressoRequest request)
                                         throws ControllerException
Description copied from interface: ICreationBeanManager
Creates or retrieves the action form. If it doesn't exist on the session then we create it.

Specified by:
createOrRetrieveActionForm in interface ICreationBeanManager
Parameters:
request - ControllerRequest
Returns:
CompletionBean
Throws:
ControllerException

getActionForm

public CreationBeans getActionForm(ExpressoRequest request)
                            throws ControllerException
Description copied from interface: ICreationBeanManager
Retrieve an action form. If it doesn't exist, don't create it. Return

Specified by:
getActionForm in interface ICreationBeanManager
Parameters:
request - ControllerRequest
Returns:
CompletionBean
Throws:
ControllerException

destroyActionForm

public void destroyActionForm(ExpressoRequest request)
                       throws ControllerException
Description copied from interface: ICreationBeanManager
Destroys the completion bean from the session. Most often done after the bean has been saved.

Specified by:
destroyActionForm in interface ICreationBeanManager
Parameters:
request - ControllerRequest
Throws:
ControllerException

validate

public ErrorCollection validate(ExpressoRequest request,
                                ErrorCollection errorsToAdd)
                         throws ControllerException
Description copied from interface: ICreationBeanManager
Validate the bean and return any action errors.

Specified by:
validate in interface ICreationBeanManager
Parameters:
request - ControllerRequest
errorsToAdd - ErrorCollection
Returns:
ErrorCollection with or without any specified errors.
Throws:
ControllerException - upon error.

setCompletionBean

public void setCompletionBean(ExpressoRequest request,
                              CreationBeans wizardBeanToSave)
                       throws ControllerException
Description copied from interface: ICreationBeanManager
Saves the specified completion bean to session.

Specified by:
setCompletionBean in interface ICreationBeanManager
Parameters:
request - the ExpressoRequest that contains the session.
wizardBeanToSave - CompletionBean
Throws:
ControllerException


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.