org.alfresco.web.bean.actions
Class BaseActionWizard

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.wizard.BaseWizardBean
          extended by org.alfresco.web.bean.actions.BaseActionWizard
All Implemented Interfaces:
java.io.Serializable, IDialogBean, IWizardBean
Direct Known Subclasses:
CreateRuleWizard, RunActionWizard

public abstract class BaseActionWizard
extends BaseWizardBean

Base class for the "Run Action" and "Create Rule" wizards.

See Also:
Serialized Form

Nested Class Summary
static class BaseActionWizard.RecipientWrapper
          Simple wrapper class for email recipient fields
 
Field Summary
protected  java.lang.String action
           
protected  java.util.Map actionHandlers
           
protected  java.util.List actions
           
protected  java.util.List addableAspects
           
protected  javax.faces.model.DataModel allActionsDataModel
           
protected  java.util.List allActionsProperties
           
protected  java.util.List commonAspects
           
protected  java.util.Map currentActionProperties
           
protected  javax.faces.model.DataModel currentEmailRecipientsDataModel
           
protected  boolean editingAction
           
protected  java.util.List encodings
           
protected static java.lang.String ERROR_ACTION_CANNOT_BE_EXECUTE_REPEATEDLY
           
protected  java.util.List imageTransformers
           
protected static java.lang.String NO_PARAMS_MARKER
           
protected  java.util.List objectTypes
           
protected static java.lang.String PROP_ACTION_EMAIL_RECIPIENTS
           
protected static java.lang.String PROP_ACTION_NAME
           
protected static java.lang.String PROP_ACTION_SUMMARY
           
protected  java.util.List removableAspects
           
protected  java.lang.String returnViewId
           
protected  java.util.List testableAspects
           
protected  java.util.List transformers
           
protected  java.util.List users
           
protected  java.lang.String usingTemplate
           
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
BaseActionWizard()
           
 
Method Summary
 void addAction()
          Adds the action just setup by the user to the list of actions for the rule
 void addRecipient(javax.faces.event.ActionEvent event)
          Action handler called when the Add button is pressed to add an email recipient
 void cancelAddAction()
          Cancels the addition of the action
 void discardTemplate(javax.faces.event.ActionEvent event)
          Action handler called to discard the template from the email body
 java.lang.String displayLabelForAuthority(java.lang.String authority)
           
 void editAction()
          Sets up the context for editing existing action values
 java.lang.String getAction()
           
 java.util.Map getActionProperties()
           
 java.util.List getActions()
           
protected  org.alfresco.service.cmr.action.ActionService getActionService()
           
 java.util.List getAddableAspects()
          Returns a list of aspects that can be added
 javax.faces.model.DataModel getAllActionsDataModel()
          Returns the properties for all the actions as a JSF DataModel
protected  org.alfresco.service.cmr.security.AuthorityService getAuthorityService()
           
protected  java.util.List getCommonAspects()
          Returns the aspects that are available in all scenarios i.e.
 java.util.List getEmailRecipients(java.util.Map actionProperties)
          Returns the current list of email recipients
 javax.faces.model.DataModel getEmailRecipientsDataModel()
          Returns the properties for email recipients JSF DataModel
 java.util.List getImageTransformers()
          Returns the image transformers that are available
protected  org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()
           
 java.util.List getObjectTypes()
           
protected  org.alfresco.service.cmr.security.PersonService getPersonService()
           
 java.util.List getRemovableAspects()
          Returns a list of aspects that can be removed
 java.util.List getTestableAspects()
          Returns a list of aspects that can be tested i.e.
 java.util.List getTransformers()
          Returns the transformers that are available
 java.util.List getUsers()
           
 java.lang.String getUsingTemplate()
           
protected  void goToPage(javax.faces.context.FacesContext context, java.lang.String viewId)
          Navigates to the given page, used to go back and forth between the wizard and the actions settings pages
 void init(java.util.Map parameters)
          Initialises the dialog bean
protected  void initialiseActionHandlers()
          Initialises the action handlers from the current configuration.
 void insertTemplate(javax.faces.event.ActionEvent event)
          Action handler called to insert a template as the email body
protected  boolean isActionPresent(java.lang.String actionName)
           
 boolean isFinishButtonDisabled()
           
 void promptForActionValues()
          Displays the settings page for the current action being added
protected  java.util.List readAspectsConfig(javax.faces.context.FacesContext context, org.springframework.extensions.config.ConfigElement aspectsCfg)
           
 void removeAction()
          Removes the requested action from the list
 void removeRecipient(javax.faces.event.ActionEvent event)
          Action handler called when the Remove icon is pressed to remove an email recipient
 void setAction(java.lang.String action)
           
 void setActionService(org.alfresco.service.cmr.action.ActionService actionService)
          Sets the action service
 void setAuthorityService(org.alfresco.service.cmr.security.AuthorityService authorityService)
           
 void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
          Sets the mimetype service
 void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
           
 void setUsingTemplate(java.lang.String usingTemplate)
           
 
Methods inherited from class org.alfresco.web.bean.wizard.BaseWizardBean
back, buildSummary, getBackButtonLabel, getDefaultCancelOutcome, getDefaultFinishOutcome, getFinishButtonLabel, getNextButtonDisabled, getNextButtonLabel, getStepDescription, getStepTitle, next
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
cancel, doPostCommitProcessing, finish, finishImpl, formatErrorMessage, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getCheckOutCheckInService, getContainerDescription, getContainerSubTitle, getContainerTitle, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getFinishButtonDisabled, getMoreActionsConfigId, getNamespaceService, getNodeService, getRuleService, getSearchService, getTransactionService, isFinished, restored, setBrowseBean, setDictionaryService, setFileFolderService, setNamespaceService, setNavigator, setNodeService, setSearchService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.web.bean.dialog.IDialogBean
cancel, finish, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getContainerDescription, getContainerSubTitle, getContainerTitle, getFinishButtonDisabled, getMoreActionsConfigId, isFinished, restored
 

Field Detail

PROP_ACTION_NAME

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

PROP_ACTION_SUMMARY

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

PROP_ACTION_EMAIL_RECIPIENTS

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

NO_PARAMS_MARKER

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

ERROR_ACTION_CANNOT_BE_EXECUTE_REPEATEDLY

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

actions

protected java.util.List actions

transformers

protected java.util.List transformers

imageTransformers

protected java.util.List imageTransformers

commonAspects

protected java.util.List commonAspects

removableAspects

protected java.util.List removableAspects

addableAspects

protected java.util.List addableAspects

testableAspects

protected java.util.List testableAspects

users

protected java.util.List users

encodings

protected java.util.List encodings

objectTypes

protected java.util.List objectTypes

allActionsDataModel

protected transient javax.faces.model.DataModel allActionsDataModel

currentEmailRecipientsDataModel

protected transient javax.faces.model.DataModel currentEmailRecipientsDataModel

editingAction

protected boolean editingAction

action

protected java.lang.String action

usingTemplate

protected java.lang.String usingTemplate

returnViewId

protected java.lang.String returnViewId

currentActionProperties

protected java.util.Map currentActionProperties

allActionsProperties

protected java.util.List allActionsProperties

actionHandlers

protected java.util.Map actionHandlers
Constructor Detail

BaseActionWizard

public BaseActionWizard()
Method Detail

init

public void init(java.util.Map parameters)
Description copied from interface: IDialogBean
Initialises the dialog bean

Specified by:
init in interface IDialogBean
Overrides:
init in class BaseDialogBean
Parameters:
parameters - Map of parameters for the dialog

getAction

public java.lang.String getAction()
Returns:
Returns the selected action

setAction

public void setAction(java.lang.String action)
Parameters:
action - Sets the selected action

getUsingTemplate

public java.lang.String getUsingTemplate()
Returns:
Returns if a template has been inserted by a user for email body.

setUsingTemplate

public void setUsingTemplate(java.lang.String usingTemplate)
Parameters:
usingTemplate - Template that has been inserted by a user for the email body.

getAllActionsDataModel

public javax.faces.model.DataModel getAllActionsDataModel()
Returns the properties for all the actions as a JSF DataModel

Returns:
JSF DataModel representing the action properties

getEmailRecipientsDataModel

public javax.faces.model.DataModel getEmailRecipientsDataModel()
Returns the properties for email recipients JSF DataModel

Returns:
JSF DataModel wrapping the current email recipients

getActionProperties

public java.util.Map getActionProperties()
Returns:
Gets the action settings

getActions

public java.util.List getActions()
Returns:
Returns the list of selectable actions

getRemovableAspects

public java.util.List getRemovableAspects()
Returns a list of aspects that can be removed

Returns:
List of SelectItem objects representing the aspects that can be removed

getAddableAspects

public java.util.List getAddableAspects()
Returns a list of aspects that can be added

Returns:
List of SelectItem objects representing the aspects that can be added

getTestableAspects

public java.util.List getTestableAspects()
Returns a list of aspects that can be tested i.e. hasAspect

Returns:
List of SelectItem objects representing the aspects that can be tested for

getObjectTypes

public java.util.List getObjectTypes()
Returns:
Returns a list of object types to allow the user to select from

getUsers

public java.util.List getUsers()
Returns:
the List of users in the system wrapped in SelectItem objects

getTransformers

public java.util.List getTransformers()
Returns the transformers that are available

Returns:
List of SelectItem objects representing the available transformers

getImageTransformers

public java.util.List getImageTransformers()
Returns the image transformers that are available

Returns:
List of SelectItem objects representing the available image transformers

getEmailRecipients

public java.util.List getEmailRecipients(java.util.Map actionProperties)
Returns the current list of email recipients

Returns:
List of email recipients

promptForActionValues

public void promptForActionValues()
Displays the settings page for the current action being added


editAction

public void editAction()
Sets up the context for editing existing action values


addAction

public void addAction()
Adds the action just setup by the user to the list of actions for the rule


removeAction

public void removeAction()
Removes the requested action from the list


cancelAddAction

public void cancelAddAction()
Cancels the addition of the action


addRecipient

public void addRecipient(javax.faces.event.ActionEvent event)
Action handler called when the Add button is pressed to add an email recipient


removeRecipient

public void removeRecipient(javax.faces.event.ActionEvent event)
Action handler called when the Remove icon is pressed to remove an email recipient


insertTemplate

public void insertTemplate(javax.faces.event.ActionEvent event)
Action handler called to insert a template as the email body


discardTemplate

public void discardTemplate(javax.faces.event.ActionEvent event)
Action handler called to discard the template from the email body


setActionService

public void setActionService(org.alfresco.service.cmr.action.ActionService actionService)
Sets the action service

Parameters:
actionService - the action service

getActionService

protected org.alfresco.service.cmr.action.ActionService getActionService()

setMimetypeService

public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Sets the mimetype service

Parameters:
mimetypeService - The mimetype service

getMimetypeService

protected org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()

setPersonService

public void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
Parameters:
personService - The personService to set.

getPersonService

protected org.alfresco.service.cmr.security.PersonService getPersonService()

setAuthorityService

public void setAuthorityService(org.alfresco.service.cmr.security.AuthorityService authorityService)
Parameters:
authorityService - The authorityService to set.

getAuthorityService

protected org.alfresco.service.cmr.security.AuthorityService getAuthorityService()

displayLabelForAuthority

public java.lang.String displayLabelForAuthority(java.lang.String authority)

goToPage

protected void goToPage(javax.faces.context.FacesContext context,
                        java.lang.String viewId)
Navigates to the given page, used to go back and forth between the wizard and the actions settings pages

Parameters:
context - FacesContext
viewId - The viewId to go to

initialiseActionHandlers

protected void initialiseActionHandlers()
Initialises the action handlers from the current configuration.


getCommonAspects

protected java.util.List getCommonAspects()
Returns the aspects that are available in all scenarios i.e. add, remove and test

Returns:
List of SelectItem objects representing the available aspects

readAspectsConfig

protected java.util.List readAspectsConfig(javax.faces.context.FacesContext context,
                                           org.springframework.extensions.config.ConfigElement aspectsCfg)

isFinishButtonDisabled

public boolean isFinishButtonDisabled()

isActionPresent

protected boolean isActionPresent(java.lang.String actionName)


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