Class CommandContext
- java.lang.Object
-
- org.camunda.bpm.engine.impl.interceptor.CommandContext
-
public class CommandContext extends java.lang.Object
- Author:
- Tom Baeyens, Agim Emruli, Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
authorizationCheckEnabled
protected java.util.List<CommandContextListener>
commandContextListeners
protected JobEntity
currentJob
protected FailedJobCommandFactory
failedJobCommandFactory
protected java.lang.String
operationId
protected ProcessEngineConfigurationImpl
processEngineConfiguration
protected boolean
restrictUserOperationLogToAuthenticatedUsers
protected java.util.Map<java.lang.Class<?>,SessionFactory>
sessionFactories
protected java.util.List<Session>
sessionList
protected java.util.Map<java.lang.Class<?>,Session>
sessions
protected boolean
tenantCheckEnabled
protected TransactionContext
transactionContext
protected boolean
userOperationLogEnabled
-
Constructor Summary
Constructors Constructor Description CommandContext(ProcessEngineConfigurationImpl processEngineConfiguration)
CommandContext(ProcessEngineConfigurationImpl processEngineConfiguration, TransactionContextFactory transactionContextFactory)
-
Method Summary
-
-
-
Field Detail
-
authorizationCheckEnabled
protected boolean authorizationCheckEnabled
-
userOperationLogEnabled
protected boolean userOperationLogEnabled
-
tenantCheckEnabled
protected boolean tenantCheckEnabled
-
restrictUserOperationLogToAuthenticatedUsers
protected boolean restrictUserOperationLogToAuthenticatedUsers
-
transactionContext
protected TransactionContext transactionContext
-
sessionFactories
protected java.util.Map<java.lang.Class<?>,SessionFactory> sessionFactories
-
sessions
protected java.util.Map<java.lang.Class<?>,Session> sessions
-
sessionList
protected java.util.List<Session> sessionList
-
processEngineConfiguration
protected ProcessEngineConfigurationImpl processEngineConfiguration
-
failedJobCommandFactory
protected FailedJobCommandFactory failedJobCommandFactory
-
currentJob
protected JobEntity currentJob
-
commandContextListeners
protected java.util.List<CommandContextListener> commandContextListeners
-
operationId
protected java.lang.String operationId
-
-
Constructor Detail
-
CommandContext
public CommandContext(ProcessEngineConfigurationImpl processEngineConfiguration)
-
CommandContext
public CommandContext(ProcessEngineConfigurationImpl processEngineConfiguration, TransactionContextFactory transactionContextFactory)
-
-
Method Detail
-
performOperation
public void performOperation(CmmnAtomicOperation executionOperation, CaseExecutionEntity execution)
-
getProcessEngineConfiguration
public ProcessEngineConfigurationImpl getProcessEngineConfiguration()
-
getTargetProcessApplication
protected ProcessApplicationReference getTargetProcessApplication(CaseExecutionEntity execution)
-
requiresContextSwitch
protected boolean requiresContextSwitch(ProcessApplicationReference processApplicationReference)
-
close
public void close(CommandInvocationContext commandInvocationContext)
-
shouldLogInfo
protected boolean shouldLogInfo(java.lang.Throwable exception)
-
shouldLogFine
protected boolean shouldLogFine(java.lang.Throwable exception)
-
shouldLogCmdException
protected boolean shouldLogCmdException()
-
fireCommandContextClose
protected void fireCommandContextClose()
-
fireCommandFailed
protected void fireCommandFailed(java.lang.Throwable t)
-
flushSessions
protected void flushSessions()
-
closeSessions
protected void closeSessions(CommandInvocationContext commandInvocationContext)
-
getSession
public <T> T getSession(java.lang.Class<T> sessionClass)
-
getDbEntityManager
public DbEntityManager getDbEntityManager()
-
getDbSqlSession
public DbSqlSession getDbSqlSession()
-
getDeploymentManager
public DeploymentManager getDeploymentManager()
-
getResourceManager
public ResourceManager getResourceManager()
-
getByteArrayManager
public ByteArrayManager getByteArrayManager()
-
getProcessDefinitionManager
public ProcessDefinitionManager getProcessDefinitionManager()
-
getExecutionManager
public ExecutionManager getExecutionManager()
-
getTaskManager
public TaskManager getTaskManager()
-
getTaskReportManager
public TaskReportManager getTaskReportManager()
-
getMeterLogManager
public MeterLogManager getMeterLogManager()
-
getIdentityLinkManager
public IdentityLinkManager getIdentityLinkManager()
-
getVariableInstanceManager
public VariableInstanceManager getVariableInstanceManager()
-
getHistoricProcessInstanceManager
public HistoricProcessInstanceManager getHistoricProcessInstanceManager()
-
getHistoricCaseInstanceManager
public HistoricCaseInstanceManager getHistoricCaseInstanceManager()
-
getHistoricDetailManager
public HistoricDetailManager getHistoricDetailManager()
-
getOperationLogManager
public UserOperationLogManager getOperationLogManager()
-
getHistoricVariableInstanceManager
public HistoricVariableInstanceManager getHistoricVariableInstanceManager()
-
getHistoricActivityInstanceManager
public HistoricActivityInstanceManager getHistoricActivityInstanceManager()
-
getHistoricCaseActivityInstanceManager
public HistoricCaseActivityInstanceManager getHistoricCaseActivityInstanceManager()
-
getHistoricTaskInstanceManager
public HistoricTaskInstanceManager getHistoricTaskInstanceManager()
-
getHistoricIncidentManager
public HistoricIncidentManager getHistoricIncidentManager()
-
getHistoricIdentityLinkManager
public HistoricIdentityLinkLogManager getHistoricIdentityLinkManager()
-
getJobManager
public JobManager getJobManager()
-
getBatchManager
public BatchManager getBatchManager()
-
getHistoricBatchManager
public HistoricBatchManager getHistoricBatchManager()
-
getJobDefinitionManager
public JobDefinitionManager getJobDefinitionManager()
-
getIncidentManager
public IncidentManager getIncidentManager()
-
getIdentityInfoManager
public IdentityInfoManager getIdentityInfoManager()
-
getAttachmentManager
public AttachmentManager getAttachmentManager()
-
getTableDataManager
public TableDataManager getTableDataManager()
-
getCommentManager
public CommentManager getCommentManager()
-
getEventSubscriptionManager
public EventSubscriptionManager getEventSubscriptionManager()
-
getSessionFactories
public java.util.Map<java.lang.Class<?>,SessionFactory> getSessionFactories()
-
getPropertyManager
public PropertyManager getPropertyManager()
-
getStatisticsManager
public StatisticsManager getStatisticsManager()
-
getHistoricStatisticsManager
public HistoricStatisticsManager getHistoricStatisticsManager()
-
getHistoricJobLogManager
public HistoricJobLogManager getHistoricJobLogManager()
-
getHistoricExternalTaskLogManager
public HistoricExternalTaskLogManager getHistoricExternalTaskLogManager()
-
getHistoricReportManager
public ReportManager getHistoricReportManager()
-
getAuthorizationManager
public AuthorizationManager getAuthorizationManager()
-
getReadOnlyIdentityProvider
public ReadOnlyIdentityProvider getReadOnlyIdentityProvider()
-
getWritableIdentityProvider
public WritableIdentityProvider getWritableIdentityProvider()
-
getTenantManager
public TenantManager getTenantManager()
-
getSchemaLogManager
public SchemaLogManager getSchemaLogManager()
-
getCamundaFormDefinitionManager
public CamundaFormDefinitionManager getCamundaFormDefinitionManager()
-
getCaseDefinitionManager
public CaseDefinitionManager getCaseDefinitionManager()
-
getCaseExecutionManager
public CaseExecutionManager getCaseExecutionManager()
-
getCaseSentryPartManager
public CaseSentryPartManager getCaseSentryPartManager()
-
getDecisionDefinitionManager
public DecisionDefinitionManager getDecisionDefinitionManager()
-
getDecisionRequirementsDefinitionManager
public DecisionRequirementsDefinitionManager getDecisionRequirementsDefinitionManager()
-
getHistoricDecisionInstanceManager
public HistoricDecisionInstanceManager getHistoricDecisionInstanceManager()
-
getFilterManager
public FilterManager getFilterManager()
-
getExternalTaskManager
public ExternalTaskManager getExternalTaskManager()
-
registerCommandContextListener
public void registerCommandContextListener(CommandContextListener commandContextListener)
-
getTransactionContext
public TransactionContext getTransactionContext()
-
getSessions
public java.util.Map<java.lang.Class<?>,Session> getSessions()
-
getFailedJobCommandFactory
public FailedJobCommandFactory getFailedJobCommandFactory()
-
getAuthentication
public Authentication getAuthentication()
-
runWithoutAuthorization
public <T> T runWithoutAuthorization(java.util.concurrent.Callable<T> runnable)
-
runWithoutAuthorization
public <T> T runWithoutAuthorization(Command<T> command)
-
runWithoutAuthorization
protected <T> T runWithoutAuthorization(java.util.concurrent.Callable<T> runnable, CommandContext commandContext)
-
getAuthenticatedUserId
public java.lang.String getAuthenticatedUserId()
-
getAuthenticatedGroupIds
public java.util.List<java.lang.String> getAuthenticatedGroupIds()
-
enableAuthorizationCheck
public void enableAuthorizationCheck()
-
disableAuthorizationCheck
public void disableAuthorizationCheck()
-
isAuthorizationCheckEnabled
public boolean isAuthorizationCheckEnabled()
-
setAuthorizationCheckEnabled
public void setAuthorizationCheckEnabled(boolean authorizationCheckEnabled)
-
enableUserOperationLog
public void enableUserOperationLog()
-
disableUserOperationLog
public void disableUserOperationLog()
-
isUserOperationLogEnabled
public boolean isUserOperationLogEnabled()
-
setLogUserOperationEnabled
public void setLogUserOperationEnabled(boolean userOperationLogEnabled)
-
enableTenantCheck
public void enableTenantCheck()
-
disableTenantCheck
public void disableTenantCheck()
-
setTenantCheckEnabled
public void setTenantCheckEnabled(boolean tenantCheckEnabled)
-
isTenantCheckEnabled
public boolean isTenantCheckEnabled()
-
getCurrentJob
public JobEntity getCurrentJob()
-
setCurrentJob
public void setCurrentJob(JobEntity currentJob)
-
isRestrictUserOperationLogToAuthenticatedUsers
public boolean isRestrictUserOperationLogToAuthenticatedUsers()
-
setRestrictUserOperationLogToAuthenticatedUsers
public void setRestrictUserOperationLogToAuthenticatedUsers(boolean restrictUserOperationLogToAuthenticatedUsers)
-
getOperationId
public java.lang.String getOperationId()
-
setOperationId
public void setOperationId(java.lang.String operationId)
-
getOptimizeManager
public OptimizeManager getOptimizeManager()
-
executeWithOperationLogPrevented
public <T> void executeWithOperationLogPrevented(Command<T> command)
-
-