Class RuleTriggerAbstractBase
java.lang.Object
org.alfresco.repo.rule.ruletrigger.RuleTriggerAbstractBase
- All Implemented Interfaces:
RuleTrigger
- Direct Known Subclasses:
BeforeDeleteChildAssociationRuleTrigger,CreateNodeRuleTrigger,OnCreateChildAssociationRuleTrigger,OnMoveNodeRuleTrigger,OnPropertyUpdateRuleTrigger,RestoreNodeRuleTrigger,SingleAssocRefPolicyRuleTrigger,SingleNodeRefPolicyRuleTrigger
Rule trigger abstract base
- Author:
- Roy Wetherall
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuthenticationComponentprotected ContentServiceprotected DictionaryServiceprotected booleanIndicates whether the rule should be executed immediately or at the end of the transaction.protected NodeServiceprotected PolicyComponentprotected RuleServiceFields inherited from interface org.alfresco.repo.rule.ruletrigger.RuleTrigger
RULE_TRIGGER_NEW_NODES, RULE_TRIGGER_RENAMED_NODES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanHelper method to allow triggers to check if rules are enabled or disabled (ALF-10839: Eliminate rule discovery overhead on property update when rules have been disabled)protected booleanignoreTrigger(NodeRef actionedUponNodeRef) Indicate whether the trigger should be ignored or notvoidregisterRuleType(RuleType ruleType) Registration of an interested rule typevoidsetAuthenticationComponent(AuthenticationComponent authenticationComponent) Set the authenticationComponentvoidsetContentService(ContentService contentService) Set the content servicevoidsetDictionaryService(DictionaryService dictionaryService) Set the dictionary servicevoidsetExecuteRuleImmediately(boolean executeRuleImmediately) Sets the values that indicates whether the rule should be executed immediately or not.voidsetIgnoredAspectsStr(List<String> ignoredAspects) Converting String Aspects from Spring context to QNamesvoidsetIgnoredTypeStr(List<String> ignoredTypes) Converting String ignored Types from Spring context to QNamesvoidsetNodeService(NodeService nodeService) Set the node servicevoidsetPolicyComponent(PolicyComponent policyComponent) Set the policy componentvoidsetRuleService(RuleService ruleService) Set the RuleService to assist with enabled/disabled checkprotected voidtriggerRules(NodeRef nodeRef, NodeRef actionedUponNodeRef) Trigger the rules that relate to any interested rule types for the node references passed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.repo.rule.ruletrigger.RuleTrigger
registerRuleTrigger
-
Field Details
-
policyComponent
-
nodeService
-
contentService
-
authenticationComponent
-
dictionaryService
-
ruleService
-
executeRuleImmediately
protected boolean executeRuleImmediatelyIndicates whether the rule should be executed immediately or at the end of the transaction. By default this is false as all rules are executed at the end of the transaction.
-
-
Constructor Details
-
RuleTriggerAbstractBase
public RuleTriggerAbstractBase()
-
-
Method Details
-
setPolicyComponent
Set the policy component -
setNodeService
Set the node service -
setContentService
Set the content service -
setAuthenticationComponent
Set the authenticationComponent -
setDictionaryService
Set the dictionary service -
setRuleService
Set the RuleService to assist with enabled/disabled check -
setExecuteRuleImmediately
public void setExecuteRuleImmediately(boolean executeRuleImmediately) Sets the values that indicates whether the rule should be executed immediately or not.- Parameters:
executeRuleImmediately- true execute the rule immediaely, false otherwise
-
registerRuleType
Registration of an interested rule type- Specified by:
registerRuleTypein interfaceRuleTrigger- Parameters:
ruleType- the rule type
-
triggerRules
Trigger the rules that relate to any interested rule types for the node references passed.- Parameters:
nodeRef- the node reference who rules are to be triggeredactionedUponNodeRef- the node reference that will be actioned upon by the rules
-
areRulesEnabled
protected boolean areRulesEnabled()Helper method to allow triggers to check if rules are enabled or disabled (ALF-10839: Eliminate rule discovery overhead on property update when rules have been disabled)- Returns:
- true if rules are enabled
-
ignoreTrigger
Indicate whether the trigger should be ignored or not- Parameters:
actionedUponNodeRef- actioned upon node reference- Returns:
- boolean true if the trigger should be ignored, false otherwise
-
getIgnoredAspects
-
setIgnoredAspectsStr
Converting String Aspects from Spring context to QNames- Parameters:
ignoredAspects- List of ignoredAspects
-
getIgnoredTypes
-
setIgnoredTypeStr
Converting String ignored Types from Spring context to QNames- Parameters:
ignoredTypes-
-