Package org.alfresco.service.cmr.rule
Class Rule
java.lang.Object
org.alfresco.service.cmr.rule.Rule
- All Implemented Interfaces:
Serializable
Rule class.
Encapsulates all the information about a rule. Can be creted or editied and then passed to the rule service to create/update a rule instance.
- Author:
- Roy Wetherall
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToChildren(boolean isAppliedToChildren) Sets the values that indicates whether this rule should be applied to the children of the owning space.booleanEquals implementationGets the action associatied with the ruleGet the description of the rulebooleanIndicates whether the associated action should be executed async or notGet the node reference of the rulebooleanIndicates wehther this rule has been disabled or notGet the rules rule types.getTitle()Get the title of the ruleinthashCode()Hash code implementationbooleanIndicates wehther this rule should be applied to the children of the owning space.voidSet the actionvoidsetDescription(String description) Set the description of the rulevoidsetExecuteAsynchronously(boolean executeAsynchronously) Sets the value that indicates whether this associated action should be executed asynchrously or notvoidsetNodeRef(NodeRef nodeRef) Set the node reference of the rulevoidsetRuleDisabled(boolean ruleDisabled) Set the value that indicates wehther this rule has been disabled or notvoidsetRuleType(String ruleType) Helper method to set one rule type on the rule.voidsetRuleTypes(List<String> ruleTypes) Set the rules rule types.voidSet the title of the rule
-
Constructor Details
-
Rule
public Rule()Constructor -
Rule
Constructor.- Parameters:
nodeRef- the rule node reference
-
-
Method Details
-
setAction
Set the action- Parameters:
action- the action
-
getAction
Gets the action associatied with the rule- Returns:
- the action
-
setNodeRef
Set the node reference of the rule- Parameters:
nodeRef- the rule node reference
-
getNodeRef
Get the node reference of the rule- Returns:
- the rule node reference
-
setTitle
Set the title of the rule- Parameters:
title- the title
-
getTitle
Get the title of the rule- Returns:
- the title
-
setDescription
Set the description of the rule- Parameters:
description- the description
-
getDescription
Get the description of the rule- Returns:
- the description
-
isAppliedToChildren
public boolean isAppliedToChildren()Indicates wehther this rule should be applied to the children of the owning space.- Returns:
- true if the rule is to be applied to children, false otherwise
-
applyToChildren
public void applyToChildren(boolean isAppliedToChildren) Sets the values that indicates whether this rule should be applied to the children of the owning space.- Parameters:
isAppliedToChildren- true if the rule is to be applied to children, false otherwise
-
setRuleType
Helper method to set one rule type on the rule.- Parameters:
ruleType- the rule type
-
setRuleTypes
Set the rules rule types.- Parameters:
ruleTypes- list of rule types
-
getRuleTypes
Get the rules rule types.- Returns:
- a list of rule types
-
setExecuteAsynchronously
public void setExecuteAsynchronously(boolean executeAsynchronously) Sets the value that indicates whether this associated action should be executed asynchrously or not- Parameters:
executeAsynchronously- true to execute action async, false otherwise
-
getExecuteAsynchronously
public boolean getExecuteAsynchronously()Indicates whether the associated action should be executed async or not- Returns:
- true to execute async, false otherwise
-
getRuleDisabled
public boolean getRuleDisabled()Indicates wehther this rule has been disabled or not- Returns:
- true if the rule has been disabled, false otherwise
-
setRuleDisabled
public void setRuleDisabled(boolean ruleDisabled) Set the value that indicates wehther this rule has been disabled or not- Parameters:
ruleDisabled- true id the rule has been disabled, false otherwise
-
hashCode
public int hashCode()Hash code implementation -
equals
Equals implementation
-