Class ClassPolicyDelegate<P extends ClassPolicy>

java.lang.Object
org.alfresco.repo.policy.ClassPolicyDelegate<P>
Type Parameters:
P - the policy interface

@AlfrescoPublicApi public class ClassPolicyDelegate<P extends ClassPolicy> extends Object
Delegate for a Class-level Policy. Provides access to Policy Interface implementations which invoke the appropriate bound behaviours.
Author:
David Caruana
  • Method Summary

    Modifier and Type
    Method
    Description
    get(Set<QName> classQNames)
    Gets the policy implementation for the given classes.
    get(NodeRef nodeRef, Set<QName> classQNames)
    Gets the policy implementation for the given classes.
    get(NodeRef nodeRef, QName classQName)
    Gets the Policy implementation for the specified Class
    get(QName classQName)
    Gets the Policy implementation for the specified Class When multiple behaviours are bound to the policy for the class, an aggregate policy implementation is returned which invokes each policy in turn.
    getList(Set<QName> classQNames)
    Gets the collection of Policy implementations for the given classes
    getList(NodeRef nodeRef, Set<QName> classQNames)
    Gets the collection of Policy implementations for the given classes
    getList(NodeRef nodeRef, QName classQName)
    Gets the collection of Policy implementations for the specified Class
    getList(QName classQName)
    Gets the collection of Policy implementations for the specified Class

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      public P get(QName classQName)
      Gets the Policy implementation for the specified Class When multiple behaviours are bound to the policy for the class, an aggregate policy implementation is returned which invokes each policy in turn.
      Parameters:
      classQName - the class qualified name
      Returns:
      the policy
    • get

      public P get(NodeRef nodeRef, QName classQName)
      Gets the Policy implementation for the specified Class
      Parameters:
      nodeRef - the node reference
      classQName - the class name
      Returns:
      the policy
    • getList

      public Collection<P> getList(QName classQName)
      Gets the collection of Policy implementations for the specified Class
      Parameters:
      classQName - the class qualified name
      Returns:
      the collection of policies
    • getList

      public Collection<P> getList(NodeRef nodeRef, QName classQName)
      Gets the collection of Policy implementations for the specified Class
      Parameters:
      nodeRef - the node reference
      classQName - the class qualified name
      Returns:
      the collection of policies
    • get

      public P get(Set<QName> classQNames)
      Gets the policy implementation for the given classes. The single Policy will be a wrapper of multiple appropriate policies.
      Parameters:
      classQNames - the class qualified names
      Returns:
      Returns the policy
    • get

      public P get(NodeRef nodeRef, Set<QName> classQNames)
      Gets the policy implementation for the given classes. The single Policy will be a wrapper of multiple appropriate policies.
      Parameters:
      nodeRef - the node reference
      classQNames - the class qualified names
      Returns:
      Returns the policy
    • getList

      public Collection<P> getList(Set<QName> classQNames)
      Gets the collection of Policy implementations for the given classes
      Parameters:
      classQNames - the class qualified names
      Returns:
      Returns the collection of policies
    • getList

      public Collection<P> getList(NodeRef nodeRef, Set<QName> classQNames)
      Gets the collection of Policy implementations for the given classes
      Parameters:
      classQNames - the class qualified names
      Returns:
      Returns the collection of policies