public interface RuleService
| Modifier and Type | Method and Description |
|---|---|
int |
countRules(NodeRef nodeRef)
Count the number of rules associated with an actionable node.
|
void |
disableRule(Rule rule)
Disables a rule, preventing it from being fired.
|
void |
disableRules()
Disable rules for the current thread
|
void |
disableRules(NodeRef nodeRef)
Disables the rules for a given node reference.
|
void |
disableRuleType(String ruleType)
Disables the rules of a given type.
|
void |
enableRule(Rule rule)
Enables a rule previously disabled.
|
void |
enableRules()
Enable rules for the current thread
|
void |
enableRules(NodeRef nodeRef)
Enables the rules for a given node reference.
|
void |
enableRuleType(String ruleType)
Enables rules of a given type.
|
List<NodeRef> |
getLinkedFromRuleNodes(NodeRef nodeRef)
Get a list of the all the rule nodes that link to the passed rule node.
|
NodeRef |
getLinkedToRuleNode(NodeRef nodeRef)
Get the node reference to the rule node which the rule node links to.
|
NodeRef |
getOwningNodeRef(Action action)
Returns the owning node reference for an action.
|
NodeRef |
getOwningNodeRef(Rule rule)
Returns the owning node reference for a rule.
|
Rule |
getRule(NodeRef nodeRef)
Get the rule given its node reference
|
List<Rule> |
getRules(NodeRef nodeRef)
Get all the rules associated with an actionable node, including those
inherited from parents.
|
List<Rule> |
getRules(NodeRef nodeRef,
boolean includeInhertied)
Get the rules associated with an actionable node.
|
List<Rule> |
getRules(NodeRef nodeRef,
boolean includeInhertiedRuleType,
String ruleTypeName)
Get the rules associated with an actionable node that are of a specific rule type.
|
RuleType |
getRuleType(String name)
Gets a rule type by name.
|
List<RuleType> |
getRuleTypes()
Get the rule types currently defined in the repository.
|
boolean |
hasRules(NodeRef nodeRef)
Indicates whether the node in question has any rules associated with it.
|
boolean |
isEnabled()
Indicates whether rules are currently enabled for the current thread or not
|
boolean |
isLinkedToRuleNode(NodeRef nodeRef)
Indicates whether the passed rule node reference is linked to another
rule node.
|
boolean |
isRuleTypeEnabled(String ruleType)
Indicates whether the rule is enabled or not
|
void |
removeAllRules(NodeRef nodeRef)
Removes all the rules associated with an actionable node
|
void |
removeRule(NodeRef nodeRef,
Rule rule)
Removes a rule from the given rule actionable node
|
boolean |
rulesEnabled(NodeRef nodeRef)
Indicates whether the rules for a given node are enabled or not.
|
void |
saveRule(NodeRef nodeRef,
Rule rule)
Saves the details of the rule to the specified node reference.
|
void |
saveRule(NodeRef nodeRef,
Rule rule,
int index) |
void |
setRulePosition(NodeRef nodeRef,
NodeRef ruleNodeRef,
int index) |
void |
setRulePosition(NodeRef nodeRef,
Rule rule,
int index) |
@Auditable List<RuleType> getRuleTypes()
@Auditable(parameters="name") RuleType getRuleType(String name)
name - the name of the rule type@Auditable void enableRules()
isEnabled(),
disableRules()@Auditable void disableRules()
enableRules(),
isEnabled()@Auditable boolean isEnabled()
enableRules(),
disableRules()@Auditable(parameters="nodeRef") boolean rulesEnabled(NodeRef nodeRef)
nodeRef - the node reference@Auditable(parameters="nodeRef") void disableRules(NodeRef nodeRef)
nodeRef - the node reference@Auditable(parameters="nodeRef") void enableRules(NodeRef nodeRef)
nodeRef - the node reference@Auditable(parameters="rule") void disableRule(Rule rule)
rule - the rule to disableenableRule(Rule)@Auditable(parameters="rule") void enableRule(Rule rule)
rule - the rule to enabledisableRule(Rule)@Auditable(parameters="ruleType") void disableRuleType(String ruleType)
ruleType - rule type@Auditable(parameters="ruleType") void enableRuleType(String ruleType)
ruleType - rule type@Auditable(parameters="ruleType") boolean isRuleTypeEnabled(String ruleType)
ruleType - rule type@Auditable(parameters="nodeRef") boolean hasRules(NodeRef nodeRef)
nodeRef - the node reference@Auditable(parameters="nodeRef") List<Rule> getRules(NodeRef nodeRef)
An exception is raised if the actionable aspect is not present on the passed node.
nodeRef - the node reference@Auditable(parameters={"nodeRef","includeInhertied"}) List<Rule> getRules(NodeRef nodeRef, boolean includeInhertied)
Optionally this list includes rules inherited from its parents.
An exception is raised if the actionable aspect is not present on the passed node.
nodeRef - the node referenceincludeInhertied - indicates whether the inherited rules should be included in
the result list or not@Auditable(parameters={"nodeRef","includeInhertiedRuleType","ruleTypeName"}) List<Rule> getRules(NodeRef nodeRef, boolean includeInhertiedRuleType, String ruleTypeName)
nodeRef - the node referenceincludeInhertiedRuleType - indicates whether the inherited rules should be included in
the result list or notruleTypeName - the name of the rule type, if null is passed all rule types
are returned@Auditable(parameters="nodeRef") int countRules(NodeRef nodeRef)
nodeRef - the node reference@Auditable(parameters="nodeRef") Rule getRule(NodeRef nodeRef)
nodeRef - the node reference@Auditable(parameters={"nodeRef","rule"}) void saveRule(NodeRef nodeRef, Rule rule)
If the rule is already associated with the node, the details are updated with those specified.
nodeRef - NodeRefrule - Rule@Auditable(parameters={"nodeRef","rule","index"}) void saveRule(NodeRef nodeRef, Rule rule, int index)
nodeRef - NodeRefrule - Ruleindex - int@Auditable(parameters={"nodeRef","ruleNodeRef","index"}) void setRulePosition(NodeRef nodeRef, NodeRef ruleNodeRef, int index)
nodeRef - NodeRefruleNodeRef - NodeRefindex - int@Auditable(parameters={"nodeRef","rule","index"}) void setRulePosition(NodeRef nodeRef, Rule rule, int index)
nodeRef - NodeRefrule - Ruleindex - int@Auditable(parameters={"nodeRef","rule"}) void removeRule(NodeRef nodeRef, Rule rule)
nodeRef - the actionable node reference@Auditable(parameters="nodeRef") void removeAllRules(NodeRef nodeRef)
nodeRef - the actionable node reference@Auditable(parameters="rule") NodeRef getOwningNodeRef(Rule rule)
rule - the rule@Auditable(parameters="action") NodeRef getOwningNodeRef(Action action)
action - the action@Auditable(parameters="nodeRef") boolean isLinkedToRuleNode(NodeRef nodeRef)
nodeRef - rule node reference@Auditable(parameters="nodeRef") NodeRef getLinkedToRuleNode(NodeRef nodeRef)
nodeRef - node reference of a rule node@Auditable(parameters="nodeRef") List<NodeRef> getLinkedFromRuleNodes(NodeRef nodeRef)
nodeRef - node reference of a rule nodeCopyright © 2005–2021 Alfresco Software. All rights reserved.