com.sri.emo.wizard.completion.management
Interface ICompletionBeanManager

All Known Implementing Classes:
CompletionBeanManager

public interface ICompletionBeanManager

Interface that adapts the CompletionBean to the Webapp Session. (Or other pseudo-session depending on implementation.)

Version:
1.0
Author:
Michael Rimov

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.
 

Method Detail

createOrRetrieveActionForm

CompletionBean createOrRetrieveActionForm(ExpressoRequest request)
                                          throws ControllerException
Creates or retrieves the action form. If it doesn't exist on the session then we create it.

Parameters:
request - ControllerRequest
Returns:
CompletionBean
Throws:
ControllerException

destroyActionForm

void destroyActionForm(ExpressoRequest request)
                       throws ControllerException
Destroys the completion bean from the session. Most often done after the bean has been saved.

Parameters:
request - ControllerRequest
Throws:
ControllerException

getActionForm

CompletionBean getActionForm(ExpressoRequest request)
                             throws ControllerException
Retrieve an action form. If it doesn't exist, don't create it. Return

Parameters:
request - ControllerRequest
Returns:
CompletionBean
Throws:
ControllerException

handleSessionTimeout

boolean handleSessionTimeout(ExpressoRequest request,
                             ExpressoResponse response)
                             throws ControllerException,
                                    NonHandleableException
Checks if session has timed out and redirects to 'list wizards' state if it has.

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
NonHandleableException

validate

ErrorCollection validate(ExpressoRequest request,
                         ErrorCollection errorsToAdd)
                         throws ControllerException
Validate the bean and return any action errors.

Parameters:
request - ControllerRequest
errorsToAdd - ErrorCollection
Returns:
ErrorCollection with or without any specified errors.
Throws:
ControllerException - upon error.

setCompletionBean

void setCompletionBean(ExpressoRequest request,
                       CompletionBean wizardBeanToSave)
                       throws ControllerException
Saves the specified completion bean to session.

Parameters:
request - the ExpressoRequest that contains the session.
wizardBeanToSave - CompletionBean
Throws:
ControllerException


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