Package org.alfresco.service.cmr.rule
Class Rule
- java.lang.Object
-
- org.alfresco.service.cmr.rule.Rule
-
- All Implemented Interfaces:
java.io.Serializable
public class Rule extends java.lang.Object implements java.io.SerializableRule 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:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyToChildren(boolean isAppliedToChildren)Sets the values that indicates whether this rule should be applied to the children of the owning space.booleanequals(java.lang.Object obj)Equals implementationActiongetAction()Gets the action associatied with the rulejava.lang.StringgetDescription()Get the description of the rulebooleangetExecuteAsynchronously()Indicates whether the associated action should be executed async or notorg.alfresco.service.cmr.repository.NodeRefgetNodeRef()Get the node reference of the rulebooleangetRuleDisabled()Indicates wehther this rule has been disabled or notjava.util.List<java.lang.String>getRuleTypes()Get the rules rule types.java.lang.StringgetTitle()Get the title of the ruleinthashCode()Hash code implementationbooleanisAppliedToChildren()Indicates wehther this rule should be applied to the children of the owning space.voidsetAction(Action action)Set the actionvoidsetDescription(java.lang.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(org.alfresco.service.cmr.repository.NodeRef nodeRef)Set the node reference of the rulevoidsetRuleDisabled(boolean ruleDisabled)Set the value that indicates wehther this rule has been disabled or notvoidsetRuleType(java.lang.String ruleType)Helper method to set one rule type on the rule.voidsetRuleTypes(java.util.List<java.lang.String> ruleTypes)Set the rules rule types.voidsetTitle(java.lang.String title)Set the title of the rule
-
-
-
Method Detail
-
setAction
public void setAction(Action action)
Set the action- Parameters:
action- the action
-
getAction
public Action getAction()
Gets the action associatied with the rule- Returns:
- the action
-
setNodeRef
public void setNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Set the node reference of the rule- Parameters:
nodeRef- the rule node reference
-
getNodeRef
public org.alfresco.service.cmr.repository.NodeRef getNodeRef()
Get the node reference of the rule- Returns:
- the rule node reference
-
setTitle
public void setTitle(java.lang.String title)
Set the title of the rule- Parameters:
title- the title
-
getTitle
public java.lang.String getTitle()
Get the title of the rule- Returns:
- the title
-
setDescription
public void setDescription(java.lang.String description)
Set the description of the rule- Parameters:
description- the description
-
getDescription
public java.lang.String 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
public void setRuleType(java.lang.String ruleType)
Helper method to set one rule type on the rule.- Parameters:
ruleType- the rule type
-
setRuleTypes
public void setRuleTypes(java.util.List<java.lang.String> ruleTypes)
Set the rules rule types.- Parameters:
ruleTypes- list of rule types
-
getRuleTypes
public java.util.List<java.lang.String> 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- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Equals implementation- Overrides:
equalsin classjava.lang.Object
-
-