org.camunda.bpm.engine.impl.bpmn.helper
Class ClassDelegate
java.lang.Object
org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
org.camunda.bpm.engine.impl.bpmn.helper.ClassDelegate
- All Implemented Interfaces:
- DelegateListener<DelegateExecution>, ExecutionListener, TaskListener, CoreActivityBehavior<ActivityExecution>, ActivityBehavior, SignallableActivityBehavior
public class ClassDelegate
- extends AbstractBpmnActivityBehavior
- implements TaskListener, ExecutionListener
Helper class for bpmn constructs that allow class delegation.
This class will lazily instantiate the referenced classes when needed at runtime.
- Author:
- Joram Barrez, Falko Menge
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
className
protected String className
fieldDeclarations
protected List<FieldDeclaration> fieldDeclarations
ClassDelegate
public ClassDelegate(String className,
List<FieldDeclaration> fieldDeclarations)
ClassDelegate
public ClassDelegate(Class<?> clazz,
List<FieldDeclaration> fieldDeclarations)
notify
public void notify(DelegateExecution execution)
throws Exception
- Specified by:
notify in interface DelegateListener<DelegateExecution>- Specified by:
notify in interface ExecutionListener
- Throws:
Exception
getExecutionListenerInstance
protected ExecutionListener getExecutionListenerInstance()
notify
public void notify(DelegateTask delegateTask)
- Specified by:
notify in interface TaskListener
getTaskListenerInstance
protected TaskListener getTaskListenerInstance()
execute
public void execute(ActivityExecution execution)
throws Exception
- Description copied from class:
FlowNodeActivityBehavior
- Default behaviour: just leave the activity with no extra functionality.
- Specified by:
execute in interface CoreActivityBehavior<ActivityExecution>- Specified by:
execute in interface ActivityBehavior- Overrides:
execute in class FlowNodeActivityBehavior
- Throws:
Exception
signal
public void signal(ActivityExecution execution,
String signalName,
Object signalData)
throws Exception
- Specified by:
signal in interface SignallableActivityBehavior- Overrides:
signal in class AbstractBpmnActivityBehavior
- Throws:
Exception
getActivityBehaviorInstance
protected ActivityBehavior getActivityBehaviorInstance(ActivityExecution execution)
determineBehaviour
protected ActivityBehavior determineBehaviour(ActivityBehavior delegateInstance,
ActivityExecution execution)
instantiateDelegate
public static Object instantiateDelegate(Class<?> clazz,
List<FieldDeclaration> fieldDeclarations)
instantiateDelegate
public static Object instantiateDelegate(String className,
List<FieldDeclaration> fieldDeclarations)
applyFieldDeclaration
public static void applyFieldDeclaration(List<FieldDeclaration> fieldDeclarations,
Object target)
applyFieldDeclaration
public static void applyFieldDeclaration(FieldDeclaration declaration,
Object target)
fieldTypeCompatible
public static boolean fieldTypeCompatible(FieldDeclaration declaration,
Field field)
getClassName
public String getClassName()
- returns the class name this
ClassDelegate is configured to. Comes in handy if you want to
check which delegates you already have e.g. in a list of listeners
Copyright © 2014 camunda services GmbH. All Rights Reserved.