|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface BehaviourFilter
Contract disabling and enabling policy behaviours.
Since 4.0, the behaviour enabling/disabling is recorded using reference counting, meaning that the outermost disable call in a stack has an effective veto. Use proper try-finally patterns to ensure behaviour is released after it is no longer needed.
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);
}
| Method Summary | |
|---|---|
void |
disableAllBehaviours()
Deprecated. Since 4.0 use BehaviourFilter.enableBehaviour(NodeRef) |
void |
disableBehaviour()
Disable behaviour for all types |
void |
disableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Disable all behaviours for a given node |
void |
disableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName className)
Disable behaviour for specific node and class |
void |
disableBehaviour(org.alfresco.service.namespace.QName className)
Disable behaviour for a type or aspect for all nodes. |
void |
enableAllBehaviours()
Deprecated. Since 4.0 use BehaviourFilter.disableBehaviour() |
void |
enableBehaviour()
Enable behaviours for all classes. |
void |
enableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Enable behaviour for a specific node |
void |
enableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName className)
Enable behaviour for specific node |
void |
enableBehaviour(org.alfresco.service.namespace.QName className)
Enable behaviour for all nodes |
void |
enableBehaviours(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Deprecated. Since 4.0 use BehaviourFilter.enableBehaviour(NodeRef) |
boolean |
isActivated()
Determine if any behaviours have been disabled or altered. |
boolean |
isEnabled()
Determine if behaviour is globally enabled. |
boolean |
isEnabled(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Determine if behaviour is enabled for a specific node. |
boolean |
isEnabled(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName className)
Determine if behaviour is enabled for specific node and class. |
boolean |
isEnabled(org.alfresco.service.namespace.QName className)
Determine if behaviour is enabled for a class. |
| Method Detail |
|---|
void enableBehaviours(org.alfresco.service.cmr.repository.NodeRef nodeRef)
BehaviourFilter.enableBehaviour(NodeRef)
void disableAllBehaviours()
BehaviourFilter.enableBehaviour(NodeRef)
void enableAllBehaviours()
BehaviourFilter.disableBehaviour()
void disableBehaviour()
The change applies ONLY to the current transaction.
void disableBehaviour(org.alfresco.service.namespace.QName className)
The change applies ONLY to the current transaction.
className - the type/aspect behaviour to disable
void disableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName className)
The change applies ONLY to the current transaction.
nodeRef - the node to disable forclassName - the type/aspect behaviour to disablevoid disableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef - the node to disable forvoid enableBehaviour()
The change applies ONLY to the current transaction.
void enableBehaviour(org.alfresco.service.namespace.QName className)
The change applies ONLY to the current transaction.
className - the type/aspect behaviour to enable
void enableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName className)
The change applies ONLY to the current transaction.
nodeRef - the node to enable forclassName - the type/aspect behaviour to enable or null for all classesvoid enableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef)
The change applies ONLY to the current transaction.
nodeRef - the node to enable forboolean isEnabled()
The change applies ONLY to the current transaction.
boolean isEnabled(org.alfresco.service.namespace.QName className)
The change applies ONLY to the current transaction.
className - the behaviour to test for
boolean isEnabled(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName className)
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.
nodeRef - the node to test forclassName - the behaviour to test for
boolean isEnabled(org.alfresco.service.cmr.repository.NodeRef nodeRef)
The change applies ONLY to the current transaction.
nodeRef - the node to test for
boolean isActivated()
The change applies ONLY to the current transaction.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||