org.camunda.bpm.engine.impl.context
Class Context

java.lang.Object
  extended by org.camunda.bpm.engine.impl.context.Context

public class Context
extends Object

Author:
Tom Baeyens, Daniel Meyer, Thorben Lindhauer

Field Summary
protected static ThreadLocal<Stack<CommandContext>> commandContextThreadLocal
           
protected static ThreadLocal<Stack<CommandInvocationContext>> commandInvocationContextThreadLocal
           
protected static ThreadLocal<Stack<CoreExecutionContext<? extends CoreExecution>>> executionContextStackThreadLocal
           
protected static ThreadLocal<JobExecutorContext> jobExecutorContextThreadLocal
           
protected static ThreadLocal<Stack<ProcessApplicationReference>> processApplicationContext
           
protected static ThreadLocal<Stack<ProcessEngineConfigurationImpl>> processEngineConfigurationStackThreadLocal
           
 
Constructor Summary
Context()
           
 
Method Summary
static
<T> T
executeWithinProcessApplication(Callable<T> callback, ProcessApplicationReference processApplicationReference)
          Use executeWithinProcessApplication(Callable, ProcessApplicationReference, InvocationContext) instead if an InvocationContext is available.
static
<T> T
executeWithinProcessApplication(Callable<T> callback, ProcessApplicationReference processApplicationReference, InvocationContext invocationContext)
           
static BpmnExecutionContext getBpmnExecutionContext()
           
static CaseExecutionContext getCaseExecutionContext()
           
static CommandContext getCommandContext()
           
static CommandInvocationContext getCommandInvocationContext()
           
static CoreExecutionContext<? extends CoreExecution> getCoreExecutionContext()
           
static ProcessApplicationReference getCurrentProcessApplication()
           
static ExecutionContext getExecutionContext()
          Deprecated. since 7.2, use getBpmnExecutionContext()
static JobExecutorContext getJobExecutorContext()
           
static ProcessEngineConfigurationImpl getProcessEngineConfiguration()
           
protected static
<T> Stack<T>
getStack(ThreadLocal<Stack<T>> threadLocal)
           
static void removeCommandContext()
           
static void removeCommandInvocationContext()
           
static void removeCurrentProcessApplication()
           
static void removeExecutionContext()
           
static void removeJobExecutorContext()
           
static void removeProcessEngineConfiguration()
           
static void setCommandContext(CommandContext commandContext)
           
static void setCommandInvocationContext(CommandInvocationContext commandInvocationContext)
           
static void setCurrentProcessApplication(ProcessApplicationReference reference)
           
static void setExecutionContext(CaseExecutionEntity execution)
           
static void setExecutionContext(ExecutionEntity execution)
           
static void setJobExecutorContext(JobExecutorContext jobExecutorContext)
           
static void setProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandContextThreadLocal

protected static ThreadLocal<Stack<CommandContext>> commandContextThreadLocal

commandInvocationContextThreadLocal

protected static ThreadLocal<Stack<CommandInvocationContext>> commandInvocationContextThreadLocal

processEngineConfigurationStackThreadLocal

protected static ThreadLocal<Stack<ProcessEngineConfigurationImpl>> processEngineConfigurationStackThreadLocal

executionContextStackThreadLocal

protected static ThreadLocal<Stack<CoreExecutionContext<? extends CoreExecution>>> executionContextStackThreadLocal

jobExecutorContextThreadLocal

protected static ThreadLocal<JobExecutorContext> jobExecutorContextThreadLocal

processApplicationContext

protected static ThreadLocal<Stack<ProcessApplicationReference>> processApplicationContext
Constructor Detail

Context

public Context()
Method Detail

getCommandContext

public static CommandContext getCommandContext()

setCommandContext

public static void setCommandContext(CommandContext commandContext)

removeCommandContext

public static void removeCommandContext()

getCommandInvocationContext

public static CommandInvocationContext getCommandInvocationContext()

setCommandInvocationContext

public static void setCommandInvocationContext(CommandInvocationContext commandInvocationContext)

removeCommandInvocationContext

public static void removeCommandInvocationContext()

getProcessEngineConfiguration

public static ProcessEngineConfigurationImpl getProcessEngineConfiguration()

setProcessEngineConfiguration

public static void setProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration)

removeProcessEngineConfiguration

public static void removeProcessEngineConfiguration()

getExecutionContext

@Deprecated
public static ExecutionContext getExecutionContext()
Deprecated. since 7.2, use getBpmnExecutionContext()


getBpmnExecutionContext

public static BpmnExecutionContext getBpmnExecutionContext()

getCaseExecutionContext

public static CaseExecutionContext getCaseExecutionContext()

getCoreExecutionContext

public static CoreExecutionContext<? extends CoreExecution> getCoreExecutionContext()

setExecutionContext

public static void setExecutionContext(ExecutionEntity execution)

setExecutionContext

public static void setExecutionContext(CaseExecutionEntity execution)

removeExecutionContext

public static void removeExecutionContext()

getStack

protected static <T> Stack<T> getStack(ThreadLocal<Stack<T>> threadLocal)

getJobExecutorContext

public static JobExecutorContext getJobExecutorContext()

setJobExecutorContext

public static void setJobExecutorContext(JobExecutorContext jobExecutorContext)

removeJobExecutorContext

public static void removeJobExecutorContext()

getCurrentProcessApplication

public static ProcessApplicationReference getCurrentProcessApplication()

setCurrentProcessApplication

public static void setCurrentProcessApplication(ProcessApplicationReference reference)

removeCurrentProcessApplication

public static void removeCurrentProcessApplication()

executeWithinProcessApplication

public static <T> T executeWithinProcessApplication(Callable<T> callback,
                                                    ProcessApplicationReference processApplicationReference)
Use executeWithinProcessApplication(Callable, ProcessApplicationReference, InvocationContext) instead if an InvocationContext is available.


executeWithinProcessApplication

public static <T> T executeWithinProcessApplication(Callable<T> callback,
                                                    ProcessApplicationReference processApplicationReference,
                                                    InvocationContext invocationContext)


Copyright © 2017 camunda services GmbH. All rights reserved.