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(java.lang.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(java.lang.String ruleType)
Enables rules of a given type.
|
java.util.List |
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
|
java.util.List |
getRules(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get all the rules associated with an actionable node, including those
inherited from parents.
|
java.util.List |
getRules(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean includeInhertied)
Get the rules associated with an actionable node.
|
java.util.List |
getRules(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean includeInhertiedRuleType,
java.lang.String ruleTypeName)
Get the rules associated with an actionable node that are of a specific rule type.
|
RuleType |
getRuleType(java.lang.String name)
Gets a rule type by name.
|
java.util.List |
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(java.lang.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 wether 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 java.util.List getRuleTypes()
@Auditable(parameters="name") RuleType getRuleType(java.lang.String name)
name - the name of the rule type@Auditable void enableRules()
@Auditable void disableRules()
@Auditable boolean isEnabled()
RuleService.enableRules(),
RuleService.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 disable@Auditable(parameters="rule") void enableRule(Rule rule)
rule - the rule to enable@Auditable(parameters="ruleType") void disableRuleType(java.lang.String ruleType)
ruleType - rule type@Auditable(parameters="ruleType") void enableRuleType(java.lang.String ruleType)
ruleType - rule type@Auditable(parameters="ruleType") boolean isRuleTypeEnabled(java.lang.String ruleType)
ruleType - rule type@Auditable(parameters="nodeRef") boolean hasRules(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef - the node reference@Auditable(parameters="nodeRef") java.util.List 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"})
java.util.List 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"})
java.util.List getRules(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean includeInhertiedRuleType,
java.lang.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 - rule - @Auditable(parameters={"nodeRef", "rule", "index"})
void saveRule(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Rule rule,
int index)
nodeRef - rule - index - @Auditable(parameters={"nodeRef", "ruleNodeRef", "index"})
void setRulePosition(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.cmr.repository.NodeRef ruleNodeRef,
int index)
nodeRef - ruleNodeRef - index - @Auditable(parameters={"nodeRef", "rule", "index"})
void setRulePosition(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Rule rule,
int index)
nodeRef - rule - index - @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") java.util.List getLinkedFromRuleNodes(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef - node reference of a rule nodeCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.