Package org.alfresco.repo.policy
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
-
-
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
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TgetInterface(java.lang.Class<T> policy)Gets the requested policy interface onto the behaviourjava.lang.StringtoString()-
Methods inherited from class org.alfresco.repo.policy.BaseBehaviour
disable, enable, getNotificationFrequency, isEnabled, setNotificationFrequency
-
-
-
-
Constructor Detail
-
JavaBehaviour
public JavaBehaviour(java.lang.Object instance, java.lang.String method)Construct.- Parameters:
instance- the object instance holding the methodmethod- 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 methodmethod- the method name
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getInterface
public <T> T getInterface(java.lang.Class<T> policy)
Description copied from interface:BehaviourGets the requested policy interface onto the behaviour- Parameters:
policy- the policy interface class- Returns:
- the policy interface
-
-