org.alfresco.web.bean.wizard
Class AbstractWizardBean

java.lang.Object
  extended by org.alfresco.web.bean.wizard.AbstractWizardBean
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
NewUserWizard

public abstract class AbstractWizardBean
extends java.lang.Object
implements java.io.Serializable

Abstract bean used as the base class for all wizard backing beans.

See Also:
Serialized Form

Field Summary
protected  BrowseBean browseBean
           
protected static java.lang.String CANCEL_OUTCOME
           
protected  int currentStep
           
protected static java.lang.String DEFAULT_INSTRUCTION_ID
           
protected  boolean editMode
           
protected static java.lang.String FINISH_OUTCOME
           
protected  NavigationBean navigator
           
protected static java.lang.String SUMMARY_DESCRIPTION_ID
           
protected static java.lang.String SUMMARY_TITLE_ID
           
 
Constructor Summary
AbstractWizardBean()
           
 
Method Summary
 java.lang.String back()
          Deals with the back button being pressed
protected  java.lang.String buildSummary(java.lang.String[] labels, java.lang.String[] values)
          Build summary table from the specified list of Labels and Values
 java.lang.String cancel()
          Handles the cancelling of the wizard
protected abstract  java.lang.String determineOutcomeForStep(int step)
          Determines the outcome string for the given step number
abstract  java.lang.String finish()
          Handles the finish button being pressed
 BrowseBean getBrowseBean()
           
protected  org.alfresco.service.cmr.model.FileFolderService getFileFolderService()
           
 NavigationBean getNavigator()
           
 org.alfresco.service.cmr.repository.NodeService getNodeService()
           
protected  org.alfresco.service.cmr.search.SearchService getSearchService()
           
abstract  java.lang.String getStepDescription()
           
abstract  java.lang.String getStepInstructions()
           
abstract  java.lang.String getStepTitle()
           
abstract  java.lang.String getWizardDescription()
           
abstract  java.lang.String getWizardTitle()
           
 void init()
          Initialises the wizard
 boolean isInEditMode()
          Determines whether the wizard is in edit mode
 java.lang.String next()
          Deals with the next button being pressed
 void populate()
          Populates the wizard's values with the current values of the node about to be edited
 void setBrowseBean(BrowseBean browseBean)
           
 void setFileFolderService(org.alfresco.service.cmr.model.FileFolderService fileFolderService)
           
 void setNavigator(NavigationBean navigator)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
           
 void startWizard(javax.faces.event.ActionEvent event)
          Action listener called when the wizard is being launched allowing state to be setup
 void startWizardForEdit(javax.faces.event.ActionEvent event)
          Action listener called when the wizard is being launched for editing an existing node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FINISH_OUTCOME

protected static final java.lang.String FINISH_OUTCOME
See Also:
Constant Field Values

CANCEL_OUTCOME

protected static final java.lang.String CANCEL_OUTCOME
See Also:
Constant Field Values

DEFAULT_INSTRUCTION_ID

protected static final java.lang.String DEFAULT_INSTRUCTION_ID
See Also:
Constant Field Values

SUMMARY_TITLE_ID

protected static final java.lang.String SUMMARY_TITLE_ID
See Also:
Constant Field Values

SUMMARY_DESCRIPTION_ID

protected static final java.lang.String SUMMARY_DESCRIPTION_ID
See Also:
Constant Field Values

currentStep

protected int currentStep

editMode

protected boolean editMode

navigator

protected NavigationBean navigator

browseBean

protected BrowseBean browseBean
Constructor Detail

AbstractWizardBean

public AbstractWizardBean()
Method Detail

getWizardDescription

public abstract java.lang.String getWizardDescription()
Returns:
Returns the wizard description

getWizardTitle

public abstract java.lang.String getWizardTitle()
Returns:
Returns the wizard title

getStepTitle

public abstract java.lang.String getStepTitle()
Returns:
Returns the title for the current step

getStepDescription

public abstract java.lang.String getStepDescription()
Returns:
Returns the description for the current step

getStepInstructions

public abstract java.lang.String getStepInstructions()
Returns:
Returns the instructional text for the current step

determineOutcomeForStep

protected abstract java.lang.String determineOutcomeForStep(int step)
Determines the outcome string for the given step number

Parameters:
step - The step number to get the outcome for
Returns:
The outcome

finish

public abstract java.lang.String finish()
Handles the finish button being pressed

Returns:
The finish outcome

startWizard

public void startWizard(javax.faces.event.ActionEvent event)
Action listener called when the wizard is being launched allowing state to be setup


startWizardForEdit

public void startWizardForEdit(javax.faces.event.ActionEvent event)
Action listener called when the wizard is being launched for editing an existing node.


isInEditMode

public boolean isInEditMode()
Determines whether the wizard is in edit mode

Returns:
true if the wizard is in edit mode, false if it is in creation mode

next

public java.lang.String next()
Deals with the next button being pressed

Returns:
The outcome for the next step

back

public java.lang.String back()
Deals with the back button being pressed

Returns:
The outcome for the previous step

cancel

public java.lang.String cancel()
Handles the cancelling of the wizard

Returns:
The cancel outcome

init

public void init()
Initialises the wizard


populate

public void populate()
Populates the wizard's values with the current values of the node about to be edited


getNodeService

public org.alfresco.service.cmr.repository.NodeService getNodeService()
Returns:
Returns the nodeService.

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Parameters:
nodeService - The nodeService to set.

setFileFolderService

public void setFileFolderService(org.alfresco.service.cmr.model.FileFolderService fileFolderService)
Parameters:
fileFolderService - used to manipulate folder/folder model nodes

getFileFolderService

protected org.alfresco.service.cmr.model.FileFolderService getFileFolderService()

setSearchService

public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Parameters:
searchService - the service used to find nodes

getSearchService

protected org.alfresco.service.cmr.search.SearchService getSearchService()

getNavigator

public NavigationBean getNavigator()
Returns:
Returns the navigation bean instance.

setNavigator

public void setNavigator(NavigationBean navigator)
Parameters:
navigator - The NavigationBean to set.

getBrowseBean

public BrowseBean getBrowseBean()
Returns:
The BrowseBean

setBrowseBean

public void setBrowseBean(BrowseBean browseBean)
Parameters:
browseBean - The BrowseBean to set.

buildSummary

protected java.lang.String buildSummary(java.lang.String[] labels,
                                        java.lang.String[] values)
Build summary table from the specified list of Labels and Values

Parameters:
labels - Array of labels to display
values - Array of values to display
Returns:
summary table HTML


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