public interface RuleService
Modifier and Type | Method and Description |
---|---|
int |
countRules(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Enables the rules for a given node reference.
|
void |
enableRuleType(String ruleType)
Enables rules of a given type.
|
List<org.alfresco.service.cmr.repository.NodeRef> |
getLinkedFromRuleNodes(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get a list of the all the rule nodes that link to the passed rule node.
|
org.alfresco.service.cmr.repository.NodeRef |
getLinkedToRuleNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get the node reference to the rule node which the rule node links to.
|
org.alfresco.service.cmr.repository.NodeRef |
getOwningNodeRef(Action action)
Returns the owning node reference for an action.
|
org.alfresco.service.cmr.repository.NodeRef |
getOwningNodeRef(Rule rule)
Returns the owning node reference for a rule.
|
Rule |
getRule(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get the rule given its node reference
|
List<Rule> |
getRules(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get all the rules associated with an actionable node, including those
inherited from parents.
|
List<Rule> |
getRules(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean includeInhertied)
Get the rules associated with an actionable node.
|
List<Rule> |
getRules(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Removes all the rules associated with an actionable node
|
void |
removeRule(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Rule rule)
Removes a rule from the given rule actionable node
|
boolean |
rulesEnabled(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the rules for a given node are enabled or not.
|
void |
saveRule(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Rule rule)
Saves the details of the rule to the specified node reference.
|
void |
saveRule(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Rule rule,
int index) |
void |
setRulePosition(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.cmr.repository.NodeRef ruleNodeRef,
int index) |
void |
setRulePosition(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node reference@Auditable(parameters="nodeRef") void disableRules(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node reference@Auditable(parameters="nodeRef") void enableRules(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node reference@Auditable(parameters="nodeRef") List<Rule> getRules(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node reference@Auditable(parameters="nodeRef") Rule getRule(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node reference@Auditable(parameters={"nodeRef","rule"}) void saveRule(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.NodeRef nodeRef, Rule rule, int index)
nodeRef
- NodeRefrule
- Ruleindex
- int@Auditable(parameters={"nodeRef","ruleNodeRef","index"}) void setRulePosition(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef ruleNodeRef, int index)
nodeRef
- NodeRefruleNodeRef
- NodeRefindex
- int@Auditable(parameters={"nodeRef","rule","index"}) void setRulePosition(org.alfresco.service.cmr.repository.NodeRef nodeRef, Rule rule, int index)
nodeRef
- NodeRefrule
- Ruleindex
- int@Auditable(parameters={"nodeRef","rule"}) void removeRule(org.alfresco.service.cmr.repository.NodeRef nodeRef, Rule rule)
nodeRef
- the actionable node reference@Auditable(parameters="nodeRef") void removeAllRules(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the actionable node reference@Auditable(parameters="rule") org.alfresco.service.cmr.repository.NodeRef getOwningNodeRef(Rule rule)
rule
- the rule@Auditable(parameters="action") org.alfresco.service.cmr.repository.NodeRef getOwningNodeRef(Action action)
action
- the action@Auditable(parameters="nodeRef") boolean isLinkedToRuleNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- rule node reference@Auditable(parameters="nodeRef") org.alfresco.service.cmr.repository.NodeRef getLinkedToRuleNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- node reference of a rule node@Auditable(parameters="nodeRef") List<org.alfresco.service.cmr.repository.NodeRef> getLinkedFromRuleNodes(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- node reference of a rule nodeCopyright © 2005–2017 Alfresco Software. All rights reserved.