Class CommandContext
- java.lang.Object
-
- org.activiti.engine.impl.interceptor.CommandContext
-
public class CommandContext extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ActivitiEngineAgendaagendaprotected java.util.Map<java.lang.String,java.lang.Object>attributesprotected java.util.List<CommandContextCloseListener>closeListenersprotected Command<?>commandprotected java.lang.Throwableexceptionprotected FailedJobCommandFactoryfailedJobCommandFactoryprotected java.util.Map<java.lang.String,ExecutionEntity>involvedExecutionsprotected ProcessEngineConfigurationImplprocessEngineConfigurationprotected java.util.LinkedList<java.lang.Object>resultStackprotected booleanreusedprotected java.util.Map<java.lang.Class<?>,SessionFactory>sessionFactoriesprotected java.util.Map<java.lang.Class<?>,Session>sessions
-
Constructor Summary
Constructors Constructor Description CommandContext(Command<?> command, ProcessEngineConfigurationImpl processEngineConfiguration)
-
Method Summary
-
-
-
Field Detail
-
command
protected Command<?> command
-
sessionFactories
protected java.util.Map<java.lang.Class<?>,SessionFactory> sessionFactories
-
sessions
protected java.util.Map<java.lang.Class<?>,Session> sessions
-
exception
protected java.lang.Throwable exception
-
processEngineConfiguration
protected ProcessEngineConfigurationImpl processEngineConfiguration
-
failedJobCommandFactory
protected FailedJobCommandFactory failedJobCommandFactory
-
closeListeners
protected java.util.List<CommandContextCloseListener> closeListeners
-
attributes
protected java.util.Map<java.lang.String,java.lang.Object> attributes
-
reused
protected boolean reused
-
agenda
protected ActivitiEngineAgenda agenda
-
involvedExecutions
protected java.util.Map<java.lang.String,ExecutionEntity> involvedExecutions
-
resultStack
protected java.util.LinkedList<java.lang.Object> resultStack
-
-
Constructor Detail
-
CommandContext
public CommandContext(Command<?> command, ProcessEngineConfigurationImpl processEngineConfiguration)
-
-
Method Detail
-
close
public void close()
-
logException
protected void logException()
-
rethrowExceptionIfNeeded
protected void rethrowExceptionIfNeeded() throws java.lang.Error- Throws:
java.lang.Error
-
addCloseListener
public void addCloseListener(CommandContextCloseListener commandContextCloseListener)
-
getCloseListeners
public java.util.List<CommandContextCloseListener> getCloseListeners()
-
hasCloseListener
public boolean hasCloseListener(java.lang.Class<?> type)
-
executeCloseListenersClosing
protected void executeCloseListenersClosing()
-
executeCloseListenersAfterSessionFlushed
protected void executeCloseListenersAfterSessionFlushed()
-
executeCloseListenersClosed
protected void executeCloseListenersClosed()
-
executeCloseListenersCloseFailure
protected void executeCloseListenersCloseFailure()
-
flushSessions
protected void flushSessions()
-
closeSessions
protected void closeSessions()
-
exception
public void exception(java.lang.Throwable exception)
Stores the provided exception on thisCommandContextinstance. That exception will be rethrown at the end of closing theCommandContextinstance.If there is already an exception being stored, a 'masked exception' message will be logged.
-
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
-
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
-
getGenericAttribute
public <T> T getGenericAttribute(java.lang.String key)
-
getSession
public <T> T getSession(java.lang.Class<T> sessionClass)
-
getSessionFactories
public java.util.Map<java.lang.Class<?>,SessionFactory> getSessionFactories()
-
getDbSqlSession
public DbSqlSession getDbSqlSession()
-
getEntityCache
public EntityCache getEntityCache()
-
getDeploymentEntityManager
public DeploymentEntityManager getDeploymentEntityManager()
-
getResourceEntityManager
public ResourceEntityManager getResourceEntityManager()
-
getByteArrayEntityManager
public ByteArrayEntityManager getByteArrayEntityManager()
-
getProcessDefinitionEntityManager
public ProcessDefinitionEntityManager getProcessDefinitionEntityManager()
-
getModelEntityManager
public ModelEntityManager getModelEntityManager()
-
getProcessDefinitionInfoEntityManager
public ProcessDefinitionInfoEntityManager getProcessDefinitionInfoEntityManager()
-
getExecutionEntityManager
public ExecutionEntityManager getExecutionEntityManager()
-
getTaskEntityManager
public TaskEntityManager getTaskEntityManager()
-
getIdentityLinkEntityManager
public IdentityLinkEntityManager getIdentityLinkEntityManager()
-
getVariableInstanceEntityManager
public VariableInstanceEntityManager getVariableInstanceEntityManager()
-
getHistoricProcessInstanceEntityManager
public HistoricProcessInstanceEntityManager getHistoricProcessInstanceEntityManager()
-
getHistoricDetailEntityManager
public HistoricDetailEntityManager getHistoricDetailEntityManager()
-
getHistoricVariableInstanceEntityManager
public HistoricVariableInstanceEntityManager getHistoricVariableInstanceEntityManager()
-
getHistoricActivityInstanceEntityManager
public HistoricActivityInstanceEntityManager getHistoricActivityInstanceEntityManager()
-
getHistoricTaskInstanceEntityManager
public HistoricTaskInstanceEntityManager getHistoricTaskInstanceEntityManager()
-
getHistoricIdentityLinkEntityManager
public HistoricIdentityLinkEntityManager getHistoricIdentityLinkEntityManager()
-
getEventLogEntryEntityManager
public EventLogEntryEntityManager getEventLogEntryEntityManager()
-
getJobEntityManager
public JobEntityManager getJobEntityManager()
-
getTimerJobEntityManager
public TimerJobEntityManager getTimerJobEntityManager()
-
getSuspendedJobEntityManager
public SuspendedJobEntityManager getSuspendedJobEntityManager()
-
getDeadLetterJobEntityManager
public DeadLetterJobEntityManager getDeadLetterJobEntityManager()
-
getAttachmentEntityManager
public AttachmentEntityManager getAttachmentEntityManager()
-
getTableDataManager
public TableDataManager getTableDataManager()
-
getCommentEntityManager
public CommentEntityManager getCommentEntityManager()
-
getPropertyEntityManager
public PropertyEntityManager getPropertyEntityManager()
-
getEventSubscriptionEntityManager
public EventSubscriptionEntityManager getEventSubscriptionEntityManager()
-
getHistoryManager
public HistoryManager getHistoryManager()
-
getJobManager
public JobManager getJobManager()
-
addInvolvedExecution
public void addInvolvedExecution(ExecutionEntity executionEntity)
-
hasInvolvedExecutions
public boolean hasInvolvedExecutions()
-
getInvolvedExecutions
public java.util.Collection<ExecutionEntity> getInvolvedExecutions()
-
getCommand
public Command<?> getCommand()
-
getSessions
public java.util.Map<java.lang.Class<?>,Session> getSessions()
-
getException
public java.lang.Throwable getException()
-
getFailedJobCommandFactory
public FailedJobCommandFactory getFailedJobCommandFactory()
-
getProcessEngineConfiguration
public ProcessEngineConfigurationImpl getProcessEngineConfiguration()
-
getEventDispatcher
public ActivitiEventDispatcher getEventDispatcher()
-
getAgenda
public ActivitiEngineAgenda getAgenda()
-
getResult
public java.lang.Object getResult()
-
setResult
public void setResult(java.lang.Object result)
-
isReused
public boolean isReused()
-
setReused
public void setReused(boolean reused)
-
-