org.alfresco.service.cmr.rule
Class Rule

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

public class Rule
extends java.lang.Object
implements java.io.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.

See Also:
Serialized Form

Constructor Summary
Rule()
          Constructor
Rule(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Constructor.
 
Method Summary
 void applyToChildren(boolean isAppliedToChildren)
          Sets the values that indicates whether this rule should be applied to the children of the owning space.
 boolean equals(java.lang.Object obj)
          Equals implementation
 Action getAction()
          Gets the action associatied with the rule
 java.lang.String getDescription()
          Get the description of the rule
 boolean getExecuteAsynchronously()
          Indicates whether the associated action should be executed async or not
 org.alfresco.service.cmr.repository.NodeRef getNodeRef()
          Get the node reference of the rule
 boolean getRuleDisabled()
          Indicates wehther this rule has been disabled or not
 java.util.List getRuleTypes()
          Get the rules rule types.
 java.lang.String getTitle()
          Get the title of the rule
 int hashCode()
          Hash code implementation
 boolean isAppliedToChildren()
          Indicates wehther this rule should be applied to the children of the owning space.
 void setAction(Action action)
          Set the action
 void setDescription(java.lang.String description)
          Set the description of the rule
 void setExecuteAsynchronously(boolean executeAsynchronously)
          Sets the value that indicates whether this associated action should be executed asynchrously or not
 void setNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Set the node reference of the rule
 void setRuleDisabled(boolean ruleDisabled)
          Set the value that indicates wehther this rule has been disabled or not
 void setRuleType(java.lang.String ruleType)
          Helper method to set one rule type on the rule.
 void setRuleTypes(java.util.List ruleTypes)
          Set the rules rule types.
 void setTitle(java.lang.String title)
          Set the title of the rule
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rule

public Rule()
Constructor


Rule

public Rule(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Constructor.

Parameters:
nodeRef - the rule node reference
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 ruleTypes)
Set the rules rule types.

Parameters:
ruleTypes - list of rule types

getRuleTypes

public java.util.List 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 java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Equals implementation

Overrides:
equals in class java.lang.Object


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