com.sri.emo.wizard.completion
Class EmoCompletionWizard

java.lang.Object
  extended by com.sri.emo.wizard.AbstractWizard
      extended by com.sri.emo.wizard.defaults.SequentialWizard
          extended by com.sri.emo.wizard.completion.EmoCompletionWizard
All Implemented Interfaces:
Wizard, Serializable

public class EmoCompletionWizard
extends SequentialWizard

A completion wizard. For the completion wizard pages, ids are java.lang.Integer types with values <= 0 are special pages. Any values >0 represent a corresponding Part. Developers should use isPartsPage() for interpretation of this, however.

Author:
Michael Rimov
See Also:
Serialized Form

Field Summary
static String FINAL_PAGE_ID
          Constant for the last page (where 'finish' appears) id.
static String TITLE_PAGE_ID
          Constant for the title page id.
 
Constructor Summary
EmoCompletionWizard(WizardMonitor wizMonitor, WizardPage[] steps)
          Constructs an emo completion wizard.
 
Method Summary
 CompletionBean getCompletionBean()
           
 Node getTargetNode()
           
 String getTargetNodeId()
           
protected  boolean isDynamicTarget()
          Returns true if the dynamic target has been specified.
protected  boolean isPartsPage(Integer pageId)
          Checks if the given page Id indicates it is a 'Parts' page.
protected  boolean onNextPage(WizardPage previousPage, WizardPage nextPage, Serializable previousPageData)
          Override of Sequential's onNextPage to allow for validation of values as they're entered.
 Object processFinish(WizardPage src, Serializable data, Map additonalParams)
          This version returns a Node instance if one has been successfully created.
 void setCompletionBean(CompletionBean completionBean)
          Sets the underlying completion bean.
 void setTargetNodeId(String targetNodeId)
           
 
Methods inherited from class com.sri.emo.wizard.defaults.SequentialWizard
backupToPage, checkAgainstIllegalJump, convertKeyToPageId, equals, findWizardPageIndex, getAllData, getAllSteps, getCurrentPageIndex, getInitialPage, getPageById, getStepHistory, getTotalPages, hashCode, isNeedingRollback, next, previous, rollbackBacktrace, toString
 
Methods inherited from class com.sri.emo.wizard.AbstractWizard
begin, destroy, getBackTrace, getCurrentPage, getId, getMonitor, getSummary, getTitle, setCurrentPage, setId, setSummary, setTitle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TITLE_PAGE_ID

public static final String TITLE_PAGE_ID
Constant for the title page id.

See Also:
Constant Field Values

FINAL_PAGE_ID

public static final String FINAL_PAGE_ID
Constant for the last page (where 'finish' appears) id.

See Also:
Constant Field Values
Constructor Detail

EmoCompletionWizard

public EmoCompletionWizard(WizardMonitor wizMonitor,
                           WizardPage[] steps)
Constructs an emo completion wizard.

Parameters:
wizMonitor - WizardMonitor
steps - WizardPage[]
Method Detail

onNextPage

protected boolean onNextPage(WizardPage previousPage,
                             WizardPage nextPage,
                             Serializable previousPageData)
                      throws WizardException,
                             AssertionError
Override of Sequential's onNextPage to allow for validation of values as they're entered.

Overrides:
onNextPage in class SequentialWizard
Parameters:
previousPage - WizardPage
nextPage - The next page that will be invoked. A 'lookahead' so to speak.
previousPageData - Serializable
Returns:
boolean true if the wizard can proceed, false if the previous page needs to be displayed with validation errors.
Throws:
WizardException - upon error.
AssertionError - if the previouspage id is the final page.

isPartsPage

protected boolean isPartsPage(Integer pageId)
Checks if the given page Id indicates it is a 'Parts' page.

Parameters:
pageId - Integer
Returns:
boolean

processFinish

public Object processFinish(WizardPage src,
                            Serializable data,
                            Map additonalParams)
                     throws WizardException
This version returns a Node instance if one has been successfully created.

Processes the final finish and returns some sort of data that can be whatever is desired.

Specified by:
processFinish in interface Wizard
Overrides:
processFinish in class SequentialWizard
Parameters:
src - WizardPage the source of the event.
data - This class expects a string for the data.
additonalParams - anything that the underlying wizard needs. The values are set by the Application Controller.
Returns:
An instance of a Node object that represents the node the Decision Matrix returned or null if there was no equivilant data found.
Throws:
WizardException - upon error.

isDynamicTarget

protected boolean isDynamicTarget()
Returns true if the dynamic target has been specified.

Returns:
boolean

getTargetNodeId

public String getTargetNodeId()

getTargetNode

public Node getTargetNode()
                   throws WizardException
Throws:
WizardException

setCompletionBean

public void setCompletionBean(CompletionBean completionBean)
Sets the underlying completion bean.

Parameters:
completionBean - CompletionBean

setTargetNodeId

public void setTargetNodeId(String targetNodeId)

getCompletionBean

public CompletionBean getCompletionBean()


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