org.alfresco.repo.policy
Class JavaBehaviour

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

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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Behaviour
Behaviour.NotificationFrequency
 
Field Summary
 
Fields inherited from class org.alfresco.repo.policy.BaseBehaviour
frequency, proxies
 
Constructor Summary
JavaBehaviour(java.lang.Object instance, java.lang.String method)
          Construct.
JavaBehaviour(java.lang.Object instance, java.lang.String method, Behaviour.NotificationFrequency frequency)
          Construct.
 
Method Summary
 java.lang.Object getInterface(java.lang.Class policy)
          Gets the requested policy interface onto the behaviour
 java.lang.String toString()
           
 
Methods inherited from class org.alfresco.repo.policy.BaseBehaviour
disable, enable, getNotificationFrequency, isEnabled, setNotificationFrequency
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaBehaviour

public JavaBehaviour(java.lang.Object instance,
                     java.lang.String method)
Construct.

Parameters:
instance - the object instance holding the method
method - the method name

JavaBehaviour

public JavaBehaviour(java.lang.Object instance,
                     java.lang.String method,
                     Behaviour.NotificationFrequency frequency)
Construct.

Parameters:
instance - the object instance holding the method
method - the method name
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getInterface

public java.lang.Object getInterface(java.lang.Class policy)
Description copied from interface: Behaviour
Gets the requested policy interface onto the behaviour

Parameters:
policy - the policy interface class
Returns:
the policy interface


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