org.alfresco.repo.policy
Class BehaviourFilterImpl

java.lang.Object
  extended by org.alfresco.repo.policy.BehaviourFilterImpl
All Implemented Interfaces:
BehaviourFilter

public class BehaviourFilterImpl
extends java.lang.Object
implements BehaviourFilter

Implementation of Behaviour Filter. All methods operate on transactionally-bound resources. Behaviour will therefore never span transactions; the filter state has the same lifespan as the transaction in which it was created.

Multitenancy and disabling by NodeRef:
Conversions based on the current tenant context are done automatically.


Constructor Summary
BehaviourFilterImpl()
           
 
Method Summary
 void disableAllBehaviours()
          Deprecated. 
 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. 
 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. 
 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.
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
           
 void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BehaviourFilterImpl

public BehaviourFilterImpl()
Method Detail

setDictionaryService

public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Parameters:
dictionaryService - dictionary service

setTenantService

public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
Parameters:
tenantService - dictionary service

enableBehaviours

@Deprecated
public void enableBehaviours(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Deprecated. 

Specified by:
enableBehaviours in interface BehaviourFilter

disableAllBehaviours

@Deprecated
public void disableAllBehaviours()
Deprecated. 

Specified by:
disableAllBehaviours in interface BehaviourFilter

enableAllBehaviours

@Deprecated
public void enableAllBehaviours()
Deprecated. 

Specified by:
enableAllBehaviours in interface BehaviourFilter

disableBehaviour

public void disableBehaviour()
Description copied from interface: BehaviourFilter
Disable behaviour for all types

The change applies ONLY to the current transaction.

Specified by:
disableBehaviour in interface BehaviourFilter

disableBehaviour

public void disableBehaviour(org.alfresco.service.namespace.QName className)
Description copied from interface: BehaviourFilter
Disable behaviour for a type or aspect for all nodes.

The change applies ONLY to the current transaction.

Specified by:
disableBehaviour in interface BehaviourFilter
Parameters:
className - the type/aspect behaviour to disable

disableBehaviour

public void disableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                             org.alfresco.service.namespace.QName className)
Description copied from interface: BehaviourFilter
Disable behaviour for specific node and class

The change applies ONLY to the current transaction.

Specified by:
disableBehaviour in interface BehaviourFilter
Parameters:
nodeRef - the node to disable for
className - the type/aspect behaviour to disable

disableBehaviour

public void disableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface: BehaviourFilter
Disable all behaviours for a given node

Specified by:
disableBehaviour in interface BehaviourFilter
Parameters:
nodeRef - the node to disable for

enableBehaviour

public void enableBehaviour()
Description copied from interface: BehaviourFilter
Enable behaviours for all classes.

The change applies ONLY to the current transaction.

Specified by:
enableBehaviour in interface BehaviourFilter

enableBehaviour

public void enableBehaviour(org.alfresco.service.namespace.QName className)
Description copied from interface: BehaviourFilter
Enable behaviour for all nodes

The change applies ONLY to the current transaction.

Specified by:
enableBehaviour in interface BehaviourFilter
Parameters:
className - the type/aspect behaviour to enable

enableBehaviour

public void enableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                            org.alfresco.service.namespace.QName className)
Description copied from interface: BehaviourFilter
Enable behaviour for specific node

The change applies ONLY to the current transaction.

Specified by:
enableBehaviour in interface BehaviourFilter
Parameters:
nodeRef - the node to enable for
className - the type/aspect behaviour to enable or null for all classes

enableBehaviour

public void enableBehaviour(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface: BehaviourFilter
Enable behaviour for a specific node

The change applies ONLY to the current transaction.

Specified by:
enableBehaviour in interface BehaviourFilter
Parameters:
nodeRef - the node to enable for

isEnabled

public boolean isEnabled()
Description copied from interface: BehaviourFilter
Determine if behaviour is globally enabled.

The change applies ONLY to the current transaction.

Specified by:
isEnabled in interface BehaviourFilter
Returns:
true => behaviour is enabled

isEnabled

public boolean isEnabled(org.alfresco.service.namespace.QName className)
Description copied from interface: BehaviourFilter
Determine if behaviour is enabled for a class.

The change applies ONLY to the current transaction.

Specified by:
isEnabled in interface BehaviourFilter
Parameters:
className - the behaviour to test for
Returns:
true => behaviour is enabled

isEnabled

public boolean isEnabled(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                         org.alfresco.service.namespace.QName className)
Description copied from interface: BehaviourFilter
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.

Specified by:
isEnabled in interface BehaviourFilter
Parameters:
nodeRef - the node to test for
className - the behaviour to test for
Returns:
true => behaviour is enabled

isEnabled

public boolean isEnabled(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface: BehaviourFilter
Determine if behaviour is enabled for a specific node.

The change applies ONLY to the current transaction.

Specified by:
isEnabled in interface BehaviourFilter
Parameters:
nodeRef - the node to test for
Returns:
true => behaviour is enabled

isActivated

public boolean isActivated()
Description copied from interface: BehaviourFilter
Determine if any behaviours have been disabled or altered.

The change applies ONLY to the current transaction.

Specified by:
isActivated in interface BehaviourFilter
Returns:
true => behaviours have been altered


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