Class JavaBehaviour

java.lang.Object
org.alfresco.repo.policy.BaseBehaviour
org.alfresco.repo.policy.JavaBehaviour
All Implemented Interfaces:
Behaviour

@AlfrescoPublicApi public class JavaBehaviour extends BaseBehaviour
Java based Behaviour. A behavior acts like a delegate (a method pointer). The pointer is represented by an instance object and method name.
Author:
David Caruana
  • Constructor Details

    • JavaBehaviour

      public JavaBehaviour(Object instance, String method)
      Construct.
      Parameters:
      instance - the object instance holding the method
      method - the method name
    • JavaBehaviour

      public JavaBehaviour(Object instance, String method, Behaviour.NotificationFrequency frequency)
      Construct.
      Parameters:
      instance - the object instance holding the method
      method - the method name
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getInterface

      public <T> T getInterface(Class<T> policy)
      Description copied from interface: Behaviour
      Gets the requested policy interface onto the behaviour
      Parameters:
      policy - the policy interface class
      Returns:
      the policy interface