Class Rule

java.lang.Object
org.alfresco.service.cmr.rule.Rule
All Implemented Interfaces:
Serializable

public class Rule extends Object implements 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 Details

    • Rule

      public Rule()
      Constructor
    • Rule

      public Rule(NodeRef nodeRef)
      Constructor.
      Parameters:
      nodeRef - the rule node reference
  • Method Details

    • 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(NodeRef nodeRef)
      Set the node reference of the rule
      Parameters:
      nodeRef - the rule node reference
    • getNodeRef

      public NodeRef getNodeRef()
      Get the node reference of the rule
      Returns:
      the rule node reference
    • setTitle

      public void setTitle(String title)
      Set the title of the rule
      Parameters:
      title - the title
    • getTitle

      public String getTitle()
      Get the title of the rule
      Returns:
      the title
    • setDescription

      public void setDescription(String description)
      Set the description of the rule
      Parameters:
      description - the description
    • getDescription

      public 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(String ruleType)
      Helper method to set one rule type on the rule.
      Parameters:
      ruleType - the rule type
    • setRuleTypes

      public void setRuleTypes(List<String> ruleTypes)
      Set the rules rule types.
      Parameters:
      ruleTypes - list of rule types
    • getRuleTypes

      public List<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:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Equals implementation
      Overrides:
      equals in class Object