com.sri.emo.wizard.completion.management
Class CompletionBeanManager

java.lang.Object
  extended by com.sri.emo.wizard.completion.management.CompletionBeanManager
All Implemented Interfaces:
ICompletionBeanManager

public class CompletionBeanManager
extends Object
implements ICompletionBeanManager

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
CompletionBeanManager()
          Default constructor.
 
Method Summary
 CompletionBean createOrRetrieveActionForm(ExpressoRequest request)
          Creates or retrieves the action form.
 void destroyActionForm(ExpressoRequest request)
          Destroys the completion bean from the session.
 CompletionBean 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, CompletionBean 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

CompletionBeanManager

public CompletionBeanManager()
Default constructor.

Method Detail

handleSessionTimeout

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

Specified by:
handleSessionTimeout in interface ICompletionBeanManager
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 CompletionBean createOrRetrieveActionForm(ExpressoRequest request)
                                          throws ControllerException
Description copied from interface: ICompletionBeanManager
Creates or retrieves the action form. If it doesn't exist on the session then we create it.

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

getActionForm

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

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

destroyActionForm

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

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

validate

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

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

setCompletionBean

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

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


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