Class OnPropertyUpdateRuleTrigger
java.lang.Object
org.alfresco.repo.rule.ruletrigger.RuleTriggerAbstractBase
org.alfresco.repo.rule.ruletrigger.OnPropertyUpdateRuleTrigger
- All Implemented Interfaces:
NodeServicePolicies.OnUpdatePropertiesPolicy,ClassPolicy,Policy,RuleTrigger
public class OnPropertyUpdateRuleTrigger
extends RuleTriggerAbstractBase
implements NodeServicePolicies.OnUpdatePropertiesPolicy
On propety update trigger
- Author:
- Roy Wetherall
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg -
Field Summary
Fields inherited from class org.alfresco.repo.rule.ruletrigger.RuleTriggerAbstractBase
authenticationComponent, contentService, dictionaryService, executeRuleImmediately, nodeService, policyComponent, ruleServiceFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAMEFields inherited from interface org.alfresco.repo.rule.ruletrigger.RuleTrigger
RULE_TRIGGER_NEW_NODES, RULE_TRIGGER_RENAMED_NODES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) Triggers rules if properties have been updatedvoidRegister the rule triggervoidsetIgnoreEmptyContent(boolean ignoreEmptyContent) If set to true, then we consider zero byte content to be equivalent to no content.voidsetOnNewContent(boolean onNewContent) If set to true the trigger will fire on new content, otherwise it will fire on content updatevoidsetRuntimeRuleService(RuntimeRuleService runtimeRuleService) Set the rule servicevoidsetTriggerParentRules(boolean triggerParentRules) Indicates whether the parent rules should be triggered or the rules on the node itselfMethods inherited from class org.alfresco.repo.rule.ruletrigger.RuleTriggerAbstractBase
areRulesEnabled, getIgnoredAspects, getIgnoredTypes, ignoreTrigger, registerRuleType, setAuthenticationComponent, setContentService, setDictionaryService, setExecuteRuleImmediately, setIgnoredAspectsStr, setIgnoredTypeStr, setNodeService, setPolicyComponent, setRuleService, triggerRules
-
Constructor Details
-
OnPropertyUpdateRuleTrigger
public OnPropertyUpdateRuleTrigger()
-
-
Method Details
-
setOnNewContent
public void setOnNewContent(boolean onNewContent) If set to true the trigger will fire on new content, otherwise it will fire on content update- Parameters:
onNewContent- indicates whether to fire on content create or update
-
setIgnoreEmptyContent
public void setIgnoreEmptyContent(boolean ignoreEmptyContent) If set to true, then we consider zero byte content to be equivalent to no content.- Parameters:
ignoreEmptyContent- boolean
-
setTriggerParentRules
public void setTriggerParentRules(boolean triggerParentRules) Indicates whether the parent rules should be triggered or the rules on the node itself- Parameters:
triggerParentRules- true trigger parent rules, false otherwise
-
setRuntimeRuleService
Set the rule service -
registerRuleTrigger
public void registerRuleTrigger()Description copied from interface:RuleTriggerRegister the rule trigger- Specified by:
registerRuleTriggerin interfaceRuleTrigger
-
onUpdateProperties
public void onUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) Triggers rules if properties have been updated- Specified by:
onUpdatePropertiesin interfaceNodeServicePolicies.OnUpdatePropertiesPolicy- Parameters:
nodeRef- reference to the updated nodebefore- the node's properties before the changeafter- the node's properties after the change
-