Class BehaviourFilterImpl
- All Implemented Interfaces:
BehaviourFilter,Extensible
Conversions based on the current tenant context are done automatically.
- Author:
- Derek Hulley
-
Constructor Summary
Constructors -
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.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 withBehaviourFilter.disableBehaviour(QName, boolean)voidenableBehaviours(NodeRef nodeRef) Deprecated.<M extends Trait>
ExtendedTrait<M>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.voidsetDictionaryService(DictionaryService dictionaryService) voidsetTenantService(TenantService tenantService)
-
Constructor Details
-
BehaviourFilterImpl
public BehaviourFilterImpl()
-
-
Method Details
-
setDictionaryService
- Parameters:
dictionaryService- dictionary service
-
setTenantService
- Parameters:
tenantService- dictionary service
-
enableBehaviours
Deprecated.- Specified by:
enableBehavioursin interfaceBehaviourFilter
-
disableAllBehaviours
Deprecated.- Specified by:
disableAllBehavioursin interfaceBehaviourFilter
-
enableAllBehaviours
Deprecated.- Specified by:
enableAllBehavioursin interfaceBehaviourFilter
-
disableBehaviour
public void disableBehaviour()Description copied from interface:BehaviourFilterDisable behaviour for all typesThe change applies ONLY to the current transaction.
- Specified by:
disableBehaviourin interfaceBehaviourFilter
-
disableBehaviour
Description copied from interface:BehaviourFilterDisable 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 callingBehaviourFilter.disableBehaviour(QName, boolean)withfalseThe change applies ONLY to the current transaction.
- Specified by:
disableBehaviourin interfaceBehaviourFilter- Parameters:
className- the type/aspect behaviour to disable
-
disableBehaviour
Description copied from interface:BehaviourFilterDisable 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.- Specified by:
disableBehaviourin interfaceBehaviourFilter- Parameters:
className- the type/aspect behaviour to disableincludeSubClasses- set totrueto disable the behaviours of subclasses
-
disableBehaviour
Description copied from interface:BehaviourFilterDisable behaviour for specific node and classThe change applies ONLY to the current transaction.
- Specified by:
disableBehaviourin interfaceBehaviourFilter- Parameters:
nodeRef- the node to disable forclassName- the type/aspect behaviour to disable
-
disableBehaviour
Description copied from interface:BehaviourFilterDisable all behaviours for a given node- Specified by:
disableBehaviourin interfaceBehaviourFilter- Parameters:
nodeRef- the node to disable for
-
enableBehaviour
public void enableBehaviour()Description copied from interface:BehaviourFilterEnable behaviours for all classes.The change applies ONLY to the current transaction.
- Specified by:
enableBehaviourin interfaceBehaviourFilter
-
enableBehaviour
Description copied from interface:BehaviourFilterEnable behaviour for all nodes
This is also applied to the to the disabled behaviours withBehaviourFilter.disableBehaviour(QName, boolean)The change applies ONLY to the current transaction.
- Specified by:
enableBehaviourin interfaceBehaviourFilter- Parameters:
className- the type/aspect behaviour to enable
-
enableBehaviour
Description copied from interface:BehaviourFilterEnable behaviour for specific nodeThe change applies ONLY to the current transaction.
- Specified by:
enableBehaviourin interfaceBehaviourFilter- Parameters:
nodeRef- the node to enable forclassName- the type/aspect behaviour to enable or null for all classes
-
enableBehaviour
Description copied from interface:BehaviourFilterEnable behaviour for a specific nodeThe change applies ONLY to the current transaction.
- Specified by:
enableBehaviourin interfaceBehaviourFilter- Parameters:
nodeRef- the node to enable for
-
isEnabled
public boolean isEnabled()Description copied from interface:BehaviourFilterDetermine if behaviour is globally enabled.The change applies ONLY to the current transaction.
- Specified by:
isEnabledin interfaceBehaviourFilter- Returns:
- true => behaviour is enabled
-
isEnabled
Description copied from interface:BehaviourFilterDetermine if behaviour is enabled for a class.The change applies ONLY to the current transaction.
- Specified by:
isEnabledin interfaceBehaviourFilter- Parameters:
className- the behaviour to test for- Returns:
- true => behaviour is enabled
-
isEnabled
Description copied from interface:BehaviourFilterDetermine 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.
- Specified by:
isEnabledin interfaceBehaviourFilter- Parameters:
nodeRef- the node to test forclassName- the behaviour to test for- Returns:
- true => behaviour is enabled
-
isEnabled
Description copied from interface:BehaviourFilterDetermine if behaviour is enabled for a specific node.The change applies ONLY to the current transaction.
- Specified by:
isEnabledin interfaceBehaviourFilter- Parameters:
nodeRef- the node to test for- Returns:
- true => behaviour is enabled
-
isActivated
public boolean isActivated()Description copied from interface:BehaviourFilterDetermine if any behaviours have been disabled or altered.The change applies ONLY to the current transaction.
- Specified by:
isActivatedin interfaceBehaviourFilter- Returns:
- true => behaviours have been altered
-
getTrait
- Specified by:
getTraitin interfaceExtensible
-