com.sri.emo.wizard.creation
Class EmoCreationWizard

java.lang.Object
  extended by com.sri.emo.wizard.AbstractWizard
      extended by com.sri.emo.wizard.branch.BranchingWizard
          extended by com.sri.emo.wizard.creation.EmoCreationWizard
All Implemented Interfaces:
Wizard, Serializable

public class EmoCreationWizard
extends BranchingWizard

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 BROWSE_TRANSITION
           
static String CREATE_TRANSITION
           
static String DEFAULT_TRANSITION_KEY
           
static String FINAL_PAGE_ID
          Constant for the last page (where 'finish' appears) id.
static String INITIALIZATION_PAGE_ID
          Constant for the initialization page id
static String SEARCH_TRANSITION
           
static String SUMMARY_TRANSITION
           
static String TITLE_PAGE_ID
          Constant for the title page id.
 
Constructor Summary
EmoCreationWizard(WizardMonitor wizMonitor, BranchNode[] steps)
          Constructs an emo completion wizard.
 
Method Summary
 SearchResultBean addSearchResult(Serializable pageId)
           
 CreationBeans getCompletionBean()
           
 SearchResultBean getCurrentSearchBean()
           
 WizardPage getInitPage()
           
 SearchListPage getSearchListPage(Serializable pageId)
           
 SearchResultBean getSearchResult(Serializable pageId)
           
protected  boolean includeInMainStep(BranchNode node)
           
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 setCompletionBeans(CreationBeans completionBeans)
          Sets the underlying completion bean.
 
Methods inherited from class com.sri.emo.wizard.branch.BranchingWizard
backupToPage, checkAgainstIllegalJump, convertKeyToPageId, equals, findWizardPageIndex, getAllData, getAllSteps, getCurrentPageIndex, getInitialPage, getMainStepHistory, getPageById, getStepHistory, hashCode, isNeedingRollback, next, 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

INITIALIZATION_PAGE_ID

public static final String INITIALIZATION_PAGE_ID
Constant for the initialization 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

DEFAULT_TRANSITION_KEY

public static final String DEFAULT_TRANSITION_KEY
See Also:
Constant Field Values

SEARCH_TRANSITION

public static final String SEARCH_TRANSITION
See Also:
Constant Field Values

BROWSE_TRANSITION

public static final String BROWSE_TRANSITION
See Also:
Constant Field Values

CREATE_TRANSITION

public static final String CREATE_TRANSITION
See Also:
Constant Field Values

SUMMARY_TRANSITION

public static final String SUMMARY_TRANSITION
See Also:
Constant Field Values
Constructor Detail

EmoCreationWizard

public EmoCreationWizard(WizardMonitor wizMonitor,
                         BranchNode[] steps)
Constructs an emo completion wizard.

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

getCurrentSearchBean

public SearchResultBean getCurrentSearchBean()

addSearchResult

public SearchResultBean addSearchResult(Serializable pageId)

getSearchListPage

public SearchListPage getSearchListPage(Serializable pageId)

getSearchResult

public SearchResultBean getSearchResult(Serializable pageId)

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 BranchingWizard
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

includeInMainStep

protected boolean includeInMainStep(BranchNode node)
Overrides:
includeInMainStep in class BranchingWizard

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 BranchingWizard
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

setCompletionBeans

public void setCompletionBeans(CreationBeans completionBeans)
Sets the underlying completion bean.

Parameters:
completionBean - CompletionBean

getCompletionBean

public CreationBeans getCompletionBean()

getInitPage

public WizardPage getInitPage()


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