org.alfresco.web.bean.wizard
Class WizardManager

java.lang.Object
  extended by org.alfresco.web.bean.wizard.WizardManager
All Implemented Interfaces:
java.io.Serializable

public final class WizardManager
extends java.lang.Object
implements java.io.Serializable

Bean that manages the wizard framework

See Also:
Serialized Form

Field Summary
static java.lang.String BEAN_NAME
          public JSF bean name
 
Constructor Summary
WizardManager()
           
 
Method Summary
 void back()
          Method handler called when the back button of the wizard is pressed
 java.lang.String cancel()
          Method handler called when the cancel button of the wizard is pressed
protected  void determineCurrentPage()
          Sets up the current page to show in the wizard
 java.lang.String finish()
          Method handler called when the finish button of the wizard is pressed
 boolean getBackButtonDisabled()
          Determines whether the back button on the wizard should be disabled
 java.lang.String getBackButtonLabel()
          Returns the label to use for the back button
 IWizardBean getBean()
          Returns the current wizard bean being managed
 java.lang.String getCancelButtonLabel()
          Returns the label to use for the cancel button
 int getCurrentStep()
          Returns the current step position
 java.lang.String getCurrentStepAsString()
          Returns the current step position as a string for use in the UI
 java.lang.String getCurrentStepName()
          Returns the name of the current step, wizards should use the name of the step rather than the step number to discover the position as extra steps can be added via configuration.
 WizardsConfigElement.WizardConfig getCurrentWizard()
          Returns the config for the current wizard
 java.lang.String getDescription()
          Returns the resolved description to use for the wizard
 java.lang.String getErrorMessage()
          Returns the error message to use in error conditions
 boolean getFinishButtonDisabled()
          Determines whether the finish button on the wizard should be disabled
 java.lang.String getFinishButtonLabel()
          Returns the label to use for the finish button
 java.lang.String getIcon()
          Returns the icon to use for the current wizard
 boolean getNextButtonDisabled()
          Determines whether the next button on the wizard should be disabled
 java.lang.String getNextButtonLabel()
          Returns the label to use for the next button
 java.lang.String getPage()
          Returns the current page of the wizard (depends on the current step position)
 WizardState getState()
          Returns the state of the currently active wizard
 java.lang.String getStepDescription()
          Returns the description of the current step
 java.lang.String getStepInstructions()
          Returns the instructions for the current step
 java.util.List getStepItems()
          Returns a list of UIListItems representing the steps of the wizard
 java.lang.String getStepTitle()
          Returns the title of the current step
 java.lang.String getSubTitle()
          Returns the resolved subtitle to use for the wizard
 java.lang.String getTitle()
          Returns the resolved title to use for the wizard
 void next()
          Method handler called when the next button of the wizard is pressed
 void restoreState(WizardState state)
          Restores the wizard represented by the given WizardState object.
 void setCurrentWizard(WizardsConfigElement.WizardConfig config)
          Sets the current wizard
 void setupParameters(javax.faces.event.ActionEvent event)
          Action handler used to setup parameters for the wizard being launched
 void setupParameters(java.util.Map params)
          Sets the parameters the next wizard will initialise with
 
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 java.lang.String BEAN_NAME
public JSF bean name

See Also:
Constant Field Values
Constructor Detail

WizardManager

public WizardManager()
Method Detail

setupParameters

public void setupParameters(java.util.Map params)
Sets the parameters the next wizard will initialise with

Parameters:
params - The parameters

setupParameters

public void setupParameters(javax.faces.event.ActionEvent event)
Action handler used to setup parameters for the wizard being launched

Parameters:
event - The event containing the parameters

setCurrentWizard

public void setCurrentWizard(WizardsConfigElement.WizardConfig config)
Sets the current wizard

Parameters:
config - The configuration for the wizard to set

getState

public WizardState getState()
Returns the state of the currently active wizard

Returns:
Current wizard's state

restoreState

public void restoreState(WizardState state)
Restores the wizard represented by the given WizardState object. NOTE: The wizard's restored() method is also called during this method.

Parameters:
state - The WizardState for the wizard to restore

getCurrentWizard

public WizardsConfigElement.WizardConfig getCurrentWizard()
Returns the config for the current wizard

Returns:
The current wizard config

getBean

public IWizardBean getBean()
Returns the current wizard bean being managed

Returns:
The current managed bean

getIcon

public java.lang.String getIcon()
Returns the icon to use for the current wizard

Returns:
The icon

getErrorMessage

public java.lang.String getErrorMessage()
Returns the error message to use in error conditions

Returns:
The error message

getTitle

public java.lang.String getTitle()
Returns the resolved title to use for the wizard

Returns:
The title

getSubTitle

public java.lang.String getSubTitle()
Returns the resolved subtitle to use for the wizard

Returns:
The subtitle

getDescription

public java.lang.String getDescription()
Returns the resolved description to use for the wizard

Returns:
The description

getCurrentStep

public int getCurrentStep()
Returns the current step position

Returns:
Current step position

getCurrentStepAsString

public java.lang.String getCurrentStepAsString()
Returns the current step position as a string for use in the UI

Returns:
Current step position as a string

getCurrentStepName

public java.lang.String getCurrentStepName()
Returns the name of the current step, wizards should use the name of the step rather than the step number to discover the position as extra steps can be added via configuration.

Returns:
The name of the current step

getStepItems

public java.util.List getStepItems()
Returns a list of UIListItems representing the steps of the wizard

Returns:
List of steps to display in UI

getPage

public java.lang.String getPage()
Returns the current page of the wizard (depends on the current step position)

Returns:
The page

getStepTitle

public java.lang.String getStepTitle()
Returns the title of the current step

Returns:
The step title

getStepDescription

public java.lang.String getStepDescription()
Returns the description of the current step

Returns:
The step description

getStepInstructions

public java.lang.String getStepInstructions()
Returns the instructions for the current step

Returns:
The step instructions

getNextButtonLabel

public java.lang.String getNextButtonLabel()
Returns the label to use for the next button

Returns:
The next button label

getNextButtonDisabled

public boolean getNextButtonDisabled()
Determines whether the next button on the wizard should be disabled

Returns:
true if the button should be disabled

getBackButtonLabel

public java.lang.String getBackButtonLabel()
Returns the label to use for the back button

Returns:
The back button label

getBackButtonDisabled

public boolean getBackButtonDisabled()
Determines whether the back button on the wizard should be disabled

Returns:
true if the button should be disabled

getCancelButtonLabel

public java.lang.String getCancelButtonLabel()
Returns the label to use for the cancel button

Returns:
The cancel button label

getFinishButtonLabel

public java.lang.String getFinishButtonLabel()
Returns the label to use for the finish button

Returns:
The finish button label

getFinishButtonDisabled

public boolean getFinishButtonDisabled()
Determines whether the finish button on the wizard should be disabled

Returns:
true if the button should be disabled

next

public void next()
Method handler called when the next button of the wizard is pressed


back

public void back()
Method handler called when the back button of the wizard is pressed


finish

public java.lang.String finish()
Method handler called when the finish button of the wizard is pressed

Returns:
The outcome

cancel

public java.lang.String cancel()
Method handler called when the cancel button of the wizard is pressed

Returns:
The outcome

determineCurrentPage

protected void determineCurrentPage()
Sets up the current page to show in the wizard



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.