org.alfresco.repo.policy
Interface BehaviourFilter

All Known Implementing Classes:
BehaviourFilterImpl

public interface BehaviourFilter

Contract disabling and enabling policy behaviours.


Method Summary
 void disableAllBehaviours()
          Disable all behaviours.
 boolean disableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName className)
          Disable behaviour for specific node
 boolean disableBehaviour(org.alfresco.service.namespace.QName className)
          Disable behaviour for a type or aspect for all nodes.
 void enableAllBehaviours()
          Enable all behaviours i.e.
 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)
          Enable all behaviours for specific node
 boolean isActivated()
          Determine if any behaviours have been disabled?
 boolean isEnabled(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName className)
          Determine if behaviour is enabled for specific node.
 boolean isEnabled(org.alfresco.service.namespace.QName className)
          Determine if behaviour is enabled across all nodes.
 

Method Detail

disableBehaviour

boolean disableBehaviour(org.alfresco.service.namespace.QName className)
Disable behaviour for a type or aspect for all nodes.

The change applies ONLY to the current transaction.

Parameters:
className - the type/aspect behaviour to disable
Returns:
true => already disabled

disableBehaviour

boolean disableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                         org.alfresco.service.namespace.QName className)
Disable behaviour for specific node

The change applies ONLY to the current transaction.

Parameters:
nodeRef - the node to disable for
className - the type/aspect behaviour to disable
Returns:
true => already disabled

enableBehaviour

void enableBehaviour(org.alfresco.service.namespace.QName className)
Enable behaviour for all nodes

The change applies ONLY to the current transaction.

Parameters:
className - the type/aspect behaviour to enable

enableBehaviour

void enableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                     org.alfresco.service.namespace.QName className)
Enable behaviour for specific node

The change applies ONLY to the current transaction.

Parameters:
nodeRef - the node to enable for
className - the type/aspect behaviour to enable

enableBehaviours

void enableBehaviours(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Enable all behaviours for specific node

The change applies ONLY to the current transaction.

Parameters:
nodeRef - the node to enable for

disableAllBehaviours

void disableAllBehaviours()
Disable all behaviours. Once this method is called the node and class level filters, enableBehaviours and disableBehaviours methods have no effect, every behaviour is disabled. EnableAllBehaviours reverses the result of calling this method.

Calling this method may result in nodes existing in your repository that do not conform to your policies.

The change applies ONLY to the current transaction.

See Also:
BehaviourFilter.enableAllBehaviours()

enableAllBehaviours

void enableAllBehaviours()
Enable all behaviours i.e. undo all disable calls - at the global, node and class level.

The change applies ONLY to the current transaction.


isEnabled

boolean isEnabled(org.alfresco.service.namespace.QName className)
Determine if behaviour is enabled across all nodes.

The change applies ONLY to the current transaction.

Parameters:
className - the behaviour to test for
Returns:
true => behaviour is enabled

isEnabled

boolean isEnabled(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                  org.alfresco.service.namespace.QName className)
Determine if behaviour is enabled for specific node.

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 for
className - the behaviour to test for
Returns:
true => behaviour is enabled

isActivated

boolean isActivated()
Determine if any behaviours have been disabled?

The change applies ONLY to the current transaction.

Returns:
true => behaviours have been filtered


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.