Interface BehaviourFilter
- All Known Subinterfaces:
BehaviourFilterExtension,BehaviourFilterTrait
- All Known Implementing Classes:
BehaviourFilterImpl,VirtualBehaviourFilterExtension
behaviourFilter.disableBehaviour(abc);
try
{
behaviourFilter.disableBehaviour(abc);
try
{
// Do something that might have triggered 'abc' but will not
}
finally
{
behaviourFilter.enableBehaviour(abc);
}
// Do something that might have triggered 'abc' but will not despite the last enable call
}
finally
{
behaviourFilter.enableBehaviour(abc);
}
- Author:
- Derek Hulley
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.voidDisable behaviour for all typesvoiddisableBehaviour(NodeRef nodeRef) Disable all behaviours for a given nodevoiddisableBehaviour(NodeRef nodeRef, QName className) Disable behaviour for specific node and classvoiddisableBehaviour(QName className) Disable behaviour for a type or aspect for all nodes.voiddisableBehaviour(QName className, boolean includeSubClasses) Disable behaviour for a type or aspect for all nodes.voidDeprecated.Since 4.0 usedisableBehaviour()voidEnable behaviours for all classes.voidenableBehaviour(NodeRef nodeRef) Enable behaviour for a specific nodevoidenableBehaviour(NodeRef nodeRef, QName className) Enable behaviour for specific nodevoidenableBehaviour(QName className) Enable behaviour for all nodes
This is also applied to the to the disabled behaviours withdisableBehaviour(QName, boolean)voidenableBehaviours(NodeRef nodeRef) Deprecated.Since 4.0 useenableBehaviour(NodeRef)booleanDetermine if any behaviours have been disabled or altered.booleanDetermine if behaviour is globally enabled.booleanDetermine if behaviour is enabled for a specific node.booleanDetermine if behaviour is enabled for specific node and class.booleanDetermine if behaviour is enabled for a class.
-
Method Details
-
enableBehaviours
Deprecated.Since 4.0 useenableBehaviour(NodeRef) -
disableAllBehaviours
void disableAllBehaviours()Deprecated.Since 4.0 useenableBehaviour(NodeRef) -
enableAllBehaviours
void enableAllBehaviours()Deprecated.Since 4.0 usedisableBehaviour() -
disableBehaviour
void disableBehaviour()Disable behaviour for all typesThe change applies ONLY to the current transaction.
-
disableBehaviour
Disable behaviour for a type or aspect for all nodes.
Given a direct instance of className (ie. not a subclass) all behaviour is disabled (including superclass behaviour).
The same as callingdisableBehaviour(QName, boolean)withfalseThe change applies ONLY to the current transaction.
- Parameters:
className- the type/aspect behaviour to disable
-
disableBehaviour
Disable behaviour for a type or aspect for all nodes.
Given an instance of className (including instances that are subclasses of className, if includeSubClasses is true) all behaviour is disabled (including superclass behaviour).
Successive calls (within the current transaction) will overwrite the filter for this class. The change applies ONLY to the current transaction.- Parameters:
className- the type/aspect behaviour to disableincludeSubClasses- set totrueto disable the behaviours of subclasses- Since:
- 5.1
-
disableBehaviour
Disable behaviour for specific node and classThe change applies ONLY to the current transaction.
- Parameters:
nodeRef- the node to disable forclassName- the type/aspect behaviour to disable
-
disableBehaviour
Disable all behaviours for a given node- Parameters:
nodeRef- the node to disable for
-
enableBehaviour
void enableBehaviour()Enable behaviours for all classes.The change applies ONLY to the current transaction.
-
enableBehaviour
Enable behaviour for all nodes
This is also applied to the to the disabled behaviours withdisableBehaviour(QName, boolean)The change applies ONLY to the current transaction.
- Parameters:
className- the type/aspect behaviour to enable
-
enableBehaviour
Enable behaviour for specific nodeThe change applies ONLY to the current transaction.
- Parameters:
nodeRef- the node to enable forclassName- the type/aspect behaviour to enable or null for all classes
-
enableBehaviour
Enable behaviour for a specific nodeThe change applies ONLY to the current transaction.
- Parameters:
nodeRef- the node to enable for- Since:
- 4.0
-
isEnabled
boolean isEnabled()Determine if behaviour is globally enabled.The change applies ONLY to the current transaction.
- Returns:
- true => behaviour is enabled
- Since:
- 4.0
-
isEnabled
Determine if behaviour is enabled for a class.The change applies ONLY to the current transaction.
- Parameters:
className- the behaviour to test for- Returns:
- true => behaviour is enabled
-
isEnabled
Determine if behaviour is enabled for specific node and class.Note: A node behaviour is enabled only when: a) the behaviour is not disabled across all nodes b) the behaviour is not disabled specifically for the provided node
The change applies ONLY to the current transaction.
- Parameters:
nodeRef- the node to test forclassName- the behaviour to test for- Returns:
- true => behaviour is enabled
-
isEnabled
Determine if behaviour is enabled for a specific node.The change applies ONLY to the current transaction.
- Parameters:
nodeRef- the node to test for- Returns:
- true => behaviour is enabled
-
isActivated
boolean isActivated()Determine if any behaviours have been disabled or altered.The change applies ONLY to the current transaction.
- Returns:
- true => behaviours have been altered
-
enableBehaviour(NodeRef)