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, ruleService
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAME
-
Fields inherited from interface org.alfresco.repo.rule.ruletrigger.RuleTrigger
RULE_TRIGGER_NEW_NODES, RULE_TRIGGER_RENAMED_NODES
-
-
Constructor Summary
Constructors Constructor Description OnPropertyUpdateRuleTrigger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> before, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> after)Triggers rules if properties have been updatedvoidregisterRuleTrigger()Register 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 itself-
Methods inherited from class org.alfresco.repo.rule.ruletrigger.RuleTriggerAbstractBase
areRulesEnabled, getIgnoredAspects, getIgnoredTypes, ignoreTrigger, registerRuleType, setAuthenticationComponent, setContentService, setDictionaryService, setExecuteRuleImmediately, setIgnoredAspectsStr, setIgnoredTypeStr, setNodeService, setPolicyComponent, setRuleService, triggerRules
-
-
-
-
Method Detail
-
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
public void setRuntimeRuleService(RuntimeRuleService runtimeRuleService)
Set the rule service
-
registerRuleTrigger
public void registerRuleTrigger()
Description copied from interface:RuleTriggerRegister the rule trigger- Specified by:
registerRuleTriggerin interfaceRuleTrigger
-
onUpdateProperties
public void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> before, java.util.Map<org.alfresco.service.namespace.QName,java.io.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
-
-