org.alfresco.web.bean.rules
Class RulesDialog

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.rules.RulesDialog
All Implemented Interfaces:
java.io.Serializable, IContextListener, FilterViewSupport, IDialogBean

public class RulesDialog
extends BaseDialogBean
implements IContextListener, FilterViewSupport

Backing bean for the manage content rules dialog

See Also:
Serialized Form

Nested Class Summary
static class RulesDialog.WrappedRule
          Inner class to wrap the Rule objects so we can expose a flag to indicate whether the rule is a local or inherited rule
 
Field Summary
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
RulesDialog()
          Default constructor
 
Method Summary
 void areaChanged()
          Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e.
 void contextUpdated()
          Method called by UIContextService.notifyBeans() to inform all registered beans that all UI Beans should refresh dump all cached data and settings.
 void filterModeChanged(javax.faces.event.ActionEvent event)
           
protected  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
 java.lang.String getCancelButtonLabel()
          Returns the label to use for the cancel button
 org.alfresco.service.cmr.rule.Rule getCurrentRule()
          Returns the current rule
 java.util.List getFilterItems()
           
 java.lang.String getFilterMode()
           
 boolean getIgnoreInheritedRules()
           
 java.lang.String getIgnoreInheritedRulesLabelId()
          Gets the label id from the ignore inhertied action
 UIRichList getRichList()
          Returns the UIRichList component being used by this backing bean
 java.util.List getRules()
          Returns the list of rules to display
protected  org.alfresco.service.cmr.rule.RuleService getRuleService()
          Get the rule service
 Node getSpace()
           
 void ignoreInheritedRules(javax.faces.event.ActionEvent event)
          Action listener to ignore (or include) inherited rules.
 void reapplyRules(javax.faces.event.ActionEvent event)
          Reapply the currently defines rules to the
 void restored()
          Called when the dialog is restored after a nested dialog is closed
 void setActionService(org.alfresco.service.cmr.action.ActionService actionService)
          Set the action service to use
 void setFilterMode(java.lang.String filterMode)
           
 void setRichList(UIRichList richList)
          Sets the UIRichList component being used by this backing bean
 void setRuleService(org.alfresco.service.cmr.rule.RuleService ruleService)
           
 void setupRuleAction(javax.faces.event.ActionEvent event)
          Handles a rule being clicked ready for an action i.e.
 void spaceChanged()
          Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
cancel, doPostCommitProcessing, finish, formatErrorMessage, getActionsConfigId, getActionsContext, getAdditionalButtons, getCheckOutCheckInService, getContainerDescription, getContainerSubTitle, getContainerTitle, getDefaultCancelOutcome, getDefaultFinishOutcome, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getFinishButtonDisabled, getFinishButtonLabel, getMoreActionsConfigId, getNamespaceService, getNodeService, getSearchService, getTransactionService, init, isFinished, 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
 

Constructor Detail

RulesDialog

public RulesDialog()
Default constructor

Method Detail

getSpace

public Node getSpace()
Returns:
The space to work against

getCurrentRule

public org.alfresco.service.cmr.rule.Rule getCurrentRule()
Returns the current rule

Returns:
The current rule

getRules

public java.util.List getRules()
Returns the list of rules to display

Returns:
List of WrappedRule objects

setupRuleAction

public void setupRuleAction(javax.faces.event.ActionEvent event)
Handles a rule being clicked ready for an action i.e. edit or delete

Parameters:
event - The event representing the click

reapplyRules

public void reapplyRules(javax.faces.event.ActionEvent event)
Reapply the currently defines rules to the

Parameters:
event -

getIgnoreInheritedRulesLabelId

public java.lang.String getIgnoreInheritedRulesLabelId()
Gets the label id from the ignore inhertied action

Returns:
the message id

getIgnoreInheritedRules

public boolean getIgnoreInheritedRules()

ignoreInheritedRules

public void ignoreInheritedRules(javax.faces.event.ActionEvent event)
Action listener to ignore (or include) inherited rules.

Parameters:
event - the action event object

finishImpl

protected java.lang.String finishImpl(javax.faces.context.FacesContext context,
                                      java.lang.String outcome)
                               throws java.lang.Exception
Description copied from class: BaseDialogBean
Performs the actual processing for the wizard. NOTE: This method is called within the context of a transaction so no transaction handling is required

Specified by:
finishImpl in class BaseDialogBean
Parameters:
context - FacesContext
outcome - The default outcome
Returns:
The outcome
Throws:
java.lang.Exception

restored

public void restored()
Description copied from interface: IDialogBean
Called when the dialog is restored after a nested dialog is closed

Specified by:
restored in interface IDialogBean
Overrides:
restored in class BaseDialogBean

getCancelButtonLabel

public java.lang.String getCancelButtonLabel()
Description copied from interface: IDialogBean
Returns the label to use for the cancel button

Specified by:
getCancelButtonLabel in interface IDialogBean
Overrides:
getCancelButtonLabel in class BaseDialogBean
Returns:
The cancel button label

setRichList

public void setRichList(UIRichList richList)
Sets the UIRichList component being used by this backing bean

Parameters:
richList - UIRichList component

getRichList

public UIRichList getRichList()
Returns the UIRichList component being used by this backing bean

Returns:
UIRichList component

setRuleService

public void setRuleService(org.alfresco.service.cmr.rule.RuleService ruleService)
Parameters:
ruleService - Sets the rule service to use

getRuleService

protected org.alfresco.service.cmr.rule.RuleService getRuleService()
Description copied from class: BaseDialogBean
Get the rule service

Overrides:
getRuleService in class BaseDialogBean
Returns:
RuleService rule service

setActionService

public void setActionService(org.alfresco.service.cmr.action.ActionService actionService)
Set the action service to use

Parameters:
actionService - the action service

contextUpdated

public void contextUpdated()
Description copied from interface: IContextListener
Method called by UIContextService.notifyBeans() to inform all registered beans that all UI Beans should refresh dump all cached data and settings.

Specified by:
contextUpdated in interface IContextListener
See Also:
IContextListener.contextUpdated()

areaChanged

public void areaChanged()
Description copied from interface: IContextListener
Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e. from company home to my home.

Specified by:
areaChanged in interface IContextListener
See Also:
IContextListener.areaChanged()

spaceChanged

public void spaceChanged()
Description copied from interface: IContextListener
Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.

Specified by:
spaceChanged in interface IContextListener
See Also:
IContextListener.spaceChanged()

filterModeChanged

public void filterModeChanged(javax.faces.event.ActionEvent event)
Specified by:
filterModeChanged in interface FilterViewSupport

getFilterItems

public java.util.List getFilterItems()
Specified by:
getFilterItems in interface FilterViewSupport

getFilterMode

public java.lang.String getFilterMode()
Specified by:
getFilterMode in interface FilterViewSupport

setFilterMode

public void setFilterMode(java.lang.String filterMode)
Specified by:
setFilterMode in interface FilterViewSupport


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