org.camunda.bpm.engine.impl.cfg.multitenancy
Class TenantCommandChecker

java.lang.Object
  extended by org.camunda.bpm.engine.impl.cfg.multitenancy.TenantCommandChecker
All Implemented Interfaces:
CommandChecker

public class TenantCommandChecker
extends Object
implements CommandChecker

CommandChecker to ensure that commands are only executed for entities which belongs to one of the authenticated tenants.


Field Summary
protected static CommandLogger LOG
           
 
Constructor Summary
TenantCommandChecker()
           
 
Method Summary
 void checkActivateBatch(BatchEntity batch)
          Check if it is allowed to activate a batch
 void checkCreateCaseInstance(CaseDefinition caseDefinition)
          Checks if it is allowed to create an instance of the given case definition.
 void checkCreateDeployment()
          Checks if it is allowed to create a deployment.
 void checkCreateMigrationPlan(ProcessDefinition sourceProcessDefinition, ProcessDefinition targetProcessDefinition)
           
 void checkCreateProcessInstance(ProcessDefinition processDefinition)
          Checks if it is allowed to create an instance of the given process definition.
 void checkCreateTask()
          Check if it is allowed to create a task
 void checkCreateTask(TaskEntity task)
          Check if it is allowed to create a task
 void checkDeleteBatch(BatchEntity batch)
          Check if it is allowed to delete a batch
 void checkDeleteDeployment(String deploymentId)
          Checks if it is allowed to delete a deployment of the given deployment id.
 void checkDeleteHistoricBatch(HistoricBatchEntity batch)
          Check if it is allowed to delete a historic batch
 void checkDeleteHistoricCaseInstance(HistoricCaseInstance instance)
          Checks if it is allowed to delete the given historic case instance.
 void checkDeleteHistoricDecisionInstance(HistoricDecisionInstance decisionInstance)
          Checks if it is allowed to delete the given historic decision instance.
 void checkDeleteHistoricDecisionInstance(String decisionDefinitionKey)
          Checks if it is allowed to delete the historic decision instance of the given decision definition key.
 void checkDeleteHistoricProcessInstance(HistoricProcessInstance instance)
          Checks if it is allowed to delete the given historic process instance.
 void checkDeleteHistoricTaskInstance(HistoricTaskInstanceEntity task)
          Checks if it is allowed to delete the given historic task instance.
 void checkDeleteProcessDefinitionById(String processDefinitionId)
          Checks if it is allowed to delete a process definition, which corresponds to the given id.
 void checkDeleteProcessDefinitionByKey(String processDefinitionKey)
          Checks if it is allowed to delete a process definition, which corresponds to the given key.
 void checkDeleteProcessInstance(ExecutionEntity execution)
          Check if it is allowed to delete a process instance of the given execution.
 void checkDeleteTask(TaskEntity task)
          Check if it is allowed to delete a task
 void checkDeleteUserOperationLog(UserOperationLogEntry entry)
          Check if it is allowed to delete the user operation log of the given user operation log entry.
 void checkEvaluateDecision(DecisionDefinition decisionDefinition)
          Checks if it is allowed to evaluate the given decision.
 void checkMigrateProcessInstance(ExecutionEntity processInstance, ProcessDefinition targetProcessDefinition)
           
 void checkReadCaseDefinition(CaseDefinition caseDefinition)
          Checks if it is allowed to read the given case definition.
 void checkReadCaseInstance(CaseExecution caseExecution)
          Check if it is allowed to read a case instance of the given case execution.
 void checkReadDecisionDefinition(DecisionDefinitionEntity decisionDefinition)
          Checks if it is allowed to read the given decision definition.
 void checkReadDecisionRequirementsDefinition(DecisionRequirementsDefinitionEntity decisionRequirementsDefinition)
          Checks if it is allowed to read the given decision requirements definition.
 void checkReadDeployment(String deploymentId)
          Checks if it is allowed to read a deployment of the given deployment id.
 void checkReadHistoricExternalTaskLog(HistoricExternalTaskLogEntity historicExternalTaskLog)
          Checks if it is allowed to read the given historic external task log.
 void checkReadHistoricJobLog(HistoricJobLogEventEntity historicJobLog)
          Checks if it is allowed to read the given historic job log.
 void checkReadHistoryAnyProcessDefinition()
          Check if it is allowed to read the history for any process definition.
 void checkReadHistoryAnyTaskInstance()
          Check if it is allowed to read the history for any task instance
 void checkReadJob(JobEntity job)
          Checks if it is allowed to read the given job.
 void checkReadProcessDefinition(ProcessDefinition processDefinition)
          Checks if it is allowed to read the given process definition.
 void checkReadProcessInstance(ExecutionEntity execution)
          Checks if it is allowed to read a process instance of the given execution.
 void checkReadProcessInstance(String processInstanceId)
           
 void checkReadTask(TaskEntity task)
          Check if it is allowed to read a task.
 void checkSuspendBatch(BatchEntity batch)
          Check if it is allowed to suspend a batch
 void checkTaskAssign(TaskEntity task)
          Check if it is allowed to assign a task
 void checkTaskWork(TaskEntity task)
          Check if it is allowed to work on a task
 void checkUpdateCaseDefinition(CaseDefinition caseDefinition)
          Checks if it is allowed to update the given case definition.
 void checkUpdateCaseInstance(CaseExecution caseExecution)
          Check if it is allowed to update a case instance of the given case execution.
 void checkUpdateDecisionDefinitionById(String decisionDefinitionId)
          Checks if it is allowed to update a decision definition with given id.
 void checkUpdateJob(JobEntity job)
          Checks if it is allowed to update the given job.
 void checkUpdateProcessDefinitionById(String processDefinitionId)
          Checks if it is allowed to update a process definition of the given process definition id.
 void checkUpdateProcessDefinitionByKey(String processDefinitionKey)
          Checks if it is allowed to update a process definition of the given process definition key.
 void checkUpdateProcessInstance(ExecutionEntity execution)
          Checks if it is allowed to update a process instance of the given execution.
 void checkUpdateProcessInstanceById(String processInstanceId)
          Checks if it is allowed to update a process instance of the given process instance id.
 void checkUpdateProcessInstanceByProcessDefinitionId(String processDefinitionId)
          Checks if it is allowed to update a process instance of the given process definition id.
 void checkUpdateProcessInstanceByProcessDefinitionKey(String processDefinitionKey)
          Checks if it is allowed to update a process instance of the given process definition key.
 void checkUpdateTask(TaskEntity task)
          Check if it is allowed to update a task
protected  DeploymentEntity findDeploymentById(String deploymentId)
           
protected  ExecutionEntity findExecutionById(String processInstanceId)
           
protected  DecisionDefinitionEntity findLatestDecisionDefinitionById(String decisionDefinitionId)
           
protected  ProcessDefinitionEntity findLatestProcessDefinitionById(String processDefinitionId)
           
protected  TenantManager getTenantManager()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final CommandLogger LOG
Constructor Detail

TenantCommandChecker

public TenantCommandChecker()
Method Detail

checkEvaluateDecision

public void checkEvaluateDecision(DecisionDefinition decisionDefinition)
Description copied from interface: CommandChecker
Checks if it is allowed to evaluate the given decision.

Specified by:
checkEvaluateDecision in interface CommandChecker

checkCreateProcessInstance

public void checkCreateProcessInstance(ProcessDefinition processDefinition)
Description copied from interface: CommandChecker
Checks if it is allowed to create an instance of the given process definition.

Specified by:
checkCreateProcessInstance in interface CommandChecker

checkReadProcessDefinition

public void checkReadProcessDefinition(ProcessDefinition processDefinition)
Description copied from interface: CommandChecker
Checks if it is allowed to read the given process definition.

Specified by:
checkReadProcessDefinition in interface CommandChecker

checkCreateCaseInstance

public void checkCreateCaseInstance(CaseDefinition caseDefinition)
Description copied from interface: CommandChecker
Checks if it is allowed to create an instance of the given case definition.

Specified by:
checkCreateCaseInstance in interface CommandChecker

checkUpdateProcessDefinitionById

public void checkUpdateProcessDefinitionById(String processDefinitionId)
Description copied from interface: CommandChecker
Checks if it is allowed to update a process definition of the given process definition id.

Specified by:
checkUpdateProcessDefinitionById in interface CommandChecker

checkUpdateProcessDefinitionByKey

public void checkUpdateProcessDefinitionByKey(String processDefinitionKey)
Description copied from interface: CommandChecker
Checks if it is allowed to update a process definition of the given process definition key.

Specified by:
checkUpdateProcessDefinitionByKey in interface CommandChecker

checkDeleteProcessDefinitionById

public void checkDeleteProcessDefinitionById(String processDefinitionId)
Description copied from interface: CommandChecker
Checks if it is allowed to delete a process definition, which corresponds to the given id.

Specified by:
checkDeleteProcessDefinitionById in interface CommandChecker
Parameters:
processDefinitionId - the id which corresponds to the process definition

checkDeleteProcessDefinitionByKey

public void checkDeleteProcessDefinitionByKey(String processDefinitionKey)
Description copied from interface: CommandChecker
Checks if it is allowed to delete a process definition, which corresponds to the given key.

Specified by:
checkDeleteProcessDefinitionByKey in interface CommandChecker
Parameters:
processDefinitionKey - the key which corresponds to the process definition

checkUpdateProcessInstanceByProcessDefinitionId

public void checkUpdateProcessInstanceByProcessDefinitionId(String processDefinitionId)
Description copied from interface: CommandChecker
Checks if it is allowed to update a process instance of the given process definition id.

Specified by:
checkUpdateProcessInstanceByProcessDefinitionId in interface CommandChecker

checkUpdateProcessInstance

public void checkUpdateProcessInstance(ExecutionEntity execution)
Description copied from interface: CommandChecker
Checks if it is allowed to update a process instance of the given execution.

Specified by:
checkUpdateProcessInstance in interface CommandChecker

checkUpdateJob

public void checkUpdateJob(JobEntity job)
Description copied from interface: CommandChecker
Checks if it is allowed to update the given job.

Specified by:
checkUpdateJob in interface CommandChecker

checkUpdateProcessInstanceByProcessDefinitionKey

public void checkUpdateProcessInstanceByProcessDefinitionKey(String processDefinitionKey)
Description copied from interface: CommandChecker
Checks if it is allowed to update a process instance of the given process definition key.

Specified by:
checkUpdateProcessInstanceByProcessDefinitionKey in interface CommandChecker

checkUpdateProcessInstanceById

public void checkUpdateProcessInstanceById(String processInstanceId)
Description copied from interface: CommandChecker
Checks if it is allowed to update a process instance of the given process instance id.

Specified by:
checkUpdateProcessInstanceById in interface CommandChecker

checkCreateMigrationPlan

public void checkCreateMigrationPlan(ProcessDefinition sourceProcessDefinition,
                                     ProcessDefinition targetProcessDefinition)
Specified by:
checkCreateMigrationPlan in interface CommandChecker

checkReadProcessInstance

public void checkReadProcessInstance(String processInstanceId)
Specified by:
checkReadProcessInstance in interface CommandChecker

checkReadJob

public void checkReadJob(JobEntity job)
Description copied from interface: CommandChecker
Checks if it is allowed to read the given job.

Specified by:
checkReadJob in interface CommandChecker

checkReadProcessInstance

public void checkReadProcessInstance(ExecutionEntity execution)
Description copied from interface: CommandChecker
Checks if it is allowed to read a process instance of the given execution.

Specified by:
checkReadProcessInstance in interface CommandChecker

checkDeleteProcessInstance

public void checkDeleteProcessInstance(ExecutionEntity execution)
Description copied from interface: CommandChecker
Check if it is allowed to delete a process instance of the given execution.

Specified by:
checkDeleteProcessInstance in interface CommandChecker

checkMigrateProcessInstance

public void checkMigrateProcessInstance(ExecutionEntity processInstance,
                                        ProcessDefinition targetProcessDefinition)
Specified by:
checkMigrateProcessInstance in interface CommandChecker

checkReadTask

public void checkReadTask(TaskEntity task)
Description copied from interface: CommandChecker
Check if it is allowed to read a task.

Specified by:
checkReadTask in interface CommandChecker

checkUpdateTask

public void checkUpdateTask(TaskEntity task)
Description copied from interface: CommandChecker
Check if it is allowed to update a task

Specified by:
checkUpdateTask in interface CommandChecker

checkDeleteBatch

public void checkDeleteBatch(BatchEntity batch)
Description copied from interface: CommandChecker
Check if it is allowed to delete a batch

Specified by:
checkDeleteBatch in interface CommandChecker

checkDeleteHistoricBatch

public void checkDeleteHistoricBatch(HistoricBatchEntity batch)
Description copied from interface: CommandChecker
Check if it is allowed to delete a historic batch

Specified by:
checkDeleteHistoricBatch in interface CommandChecker

checkSuspendBatch

public void checkSuspendBatch(BatchEntity batch)
Description copied from interface: CommandChecker
Check if it is allowed to suspend a batch

Specified by:
checkSuspendBatch in interface CommandChecker

checkActivateBatch

public void checkActivateBatch(BatchEntity batch)
Description copied from interface: CommandChecker
Check if it is allowed to activate a batch

Specified by:
checkActivateBatch in interface CommandChecker

checkCreateDeployment

public void checkCreateDeployment()
Description copied from interface: CommandChecker
Checks if it is allowed to create a deployment.

Specified by:
checkCreateDeployment in interface CommandChecker

checkReadDeployment

public void checkReadDeployment(String deploymentId)
Description copied from interface: CommandChecker
Checks if it is allowed to read a deployment of the given deployment id.

Specified by:
checkReadDeployment in interface CommandChecker

checkDeleteDeployment

public void checkDeleteDeployment(String deploymentId)
Description copied from interface: CommandChecker
Checks if it is allowed to delete a deployment of the given deployment id.

Specified by:
checkDeleteDeployment in interface CommandChecker

checkDeleteTask

public void checkDeleteTask(TaskEntity task)
Description copied from interface: CommandChecker
Check if it is allowed to delete a task

Specified by:
checkDeleteTask in interface CommandChecker

checkTaskAssign

public void checkTaskAssign(TaskEntity task)
Description copied from interface: CommandChecker
Check if it is allowed to assign a task

Specified by:
checkTaskAssign in interface CommandChecker

checkCreateTask

public void checkCreateTask(TaskEntity task)
Description copied from interface: CommandChecker
Check if it is allowed to create a task

Specified by:
checkCreateTask in interface CommandChecker

checkCreateTask

public void checkCreateTask()
Description copied from interface: CommandChecker
Check if it is allowed to create a task

Specified by:
checkCreateTask in interface CommandChecker

checkTaskWork

public void checkTaskWork(TaskEntity task)
Description copied from interface: CommandChecker
Check if it is allowed to work on a task

Specified by:
checkTaskWork in interface CommandChecker

checkReadDecisionDefinition

public void checkReadDecisionDefinition(DecisionDefinitionEntity decisionDefinition)
Description copied from interface: CommandChecker
Checks if it is allowed to read the given decision definition.

Specified by:
checkReadDecisionDefinition in interface CommandChecker

checkUpdateDecisionDefinitionById

public void checkUpdateDecisionDefinitionById(String decisionDefinitionId)
Description copied from interface: CommandChecker
Checks if it is allowed to update a decision definition with given id.

Specified by:
checkUpdateDecisionDefinitionById in interface CommandChecker

checkReadDecisionRequirementsDefinition

public void checkReadDecisionRequirementsDefinition(DecisionRequirementsDefinitionEntity decisionRequirementsDefinition)
Description copied from interface: CommandChecker
Checks if it is allowed to read the given decision requirements definition.

Specified by:
checkReadDecisionRequirementsDefinition in interface CommandChecker

checkReadCaseDefinition

public void checkReadCaseDefinition(CaseDefinition caseDefinition)
Description copied from interface: CommandChecker
Checks if it is allowed to read the given case definition.

Specified by:
checkReadCaseDefinition in interface CommandChecker

checkUpdateCaseDefinition

public void checkUpdateCaseDefinition(CaseDefinition caseDefinition)
Description copied from interface: CommandChecker
Checks if it is allowed to update the given case definition.

Specified by:
checkUpdateCaseDefinition in interface CommandChecker

checkDeleteHistoricTaskInstance

public void checkDeleteHistoricTaskInstance(HistoricTaskInstanceEntity task)
Description copied from interface: CommandChecker
Checks if it is allowed to delete the given historic task instance.

Specified by:
checkDeleteHistoricTaskInstance in interface CommandChecker

checkDeleteHistoricProcessInstance

public void checkDeleteHistoricProcessInstance(HistoricProcessInstance instance)
Description copied from interface: CommandChecker
Checks if it is allowed to delete the given historic process instance.

Specified by:
checkDeleteHistoricProcessInstance in interface CommandChecker

checkDeleteHistoricCaseInstance

public void checkDeleteHistoricCaseInstance(HistoricCaseInstance instance)
Description copied from interface: CommandChecker
Checks if it is allowed to delete the given historic case instance.

Specified by:
checkDeleteHistoricCaseInstance in interface CommandChecker

checkDeleteHistoricDecisionInstance

public void checkDeleteHistoricDecisionInstance(String decisionDefinitionKey)
Description copied from interface: CommandChecker
Checks if it is allowed to delete the historic decision instance of the given decision definition key.

Specified by:
checkDeleteHistoricDecisionInstance in interface CommandChecker

checkDeleteHistoricDecisionInstance

public void checkDeleteHistoricDecisionInstance(HistoricDecisionInstance decisionInstance)
Description copied from interface: CommandChecker
Checks if it is allowed to delete the given historic decision instance.

Specified by:
checkDeleteHistoricDecisionInstance in interface CommandChecker

checkReadHistoricJobLog

public void checkReadHistoricJobLog(HistoricJobLogEventEntity historicJobLog)
Description copied from interface: CommandChecker
Checks if it is allowed to read the given historic job log.

Specified by:
checkReadHistoricJobLog in interface CommandChecker

checkReadHistoryAnyProcessDefinition

public void checkReadHistoryAnyProcessDefinition()
Description copied from interface: CommandChecker
Check if it is allowed to read the history for any process definition.

Specified by:
checkReadHistoryAnyProcessDefinition in interface CommandChecker

checkReadHistoryAnyTaskInstance

public void checkReadHistoryAnyTaskInstance()
Description copied from interface: CommandChecker
Check if it is allowed to read the history for any task instance

Specified by:
checkReadHistoryAnyTaskInstance in interface CommandChecker

checkUpdateCaseInstance

public void checkUpdateCaseInstance(CaseExecution caseExecution)
Description copied from interface: CommandChecker
Check if it is allowed to update a case instance of the given case execution.

Specified by:
checkUpdateCaseInstance in interface CommandChecker

checkReadCaseInstance

public void checkReadCaseInstance(CaseExecution caseExecution)
Description copied from interface: CommandChecker
Check if it is allowed to read a case instance of the given case execution.

Specified by:
checkReadCaseInstance in interface CommandChecker

getTenantManager

protected TenantManager getTenantManager()

findLatestProcessDefinitionById

protected ProcessDefinitionEntity findLatestProcessDefinitionById(String processDefinitionId)

findLatestDecisionDefinitionById

protected DecisionDefinitionEntity findLatestDecisionDefinitionById(String decisionDefinitionId)

findExecutionById

protected ExecutionEntity findExecutionById(String processInstanceId)

findDeploymentById

protected DeploymentEntity findDeploymentById(String deploymentId)

checkDeleteUserOperationLog

public void checkDeleteUserOperationLog(UserOperationLogEntry entry)
Description copied from interface: CommandChecker
Check if it is allowed to delete the user operation log of the given user operation log entry.

Specified by:
checkDeleteUserOperationLog in interface CommandChecker

checkReadHistoricExternalTaskLog

public void checkReadHistoricExternalTaskLog(HistoricExternalTaskLogEntity historicExternalTaskLog)
Description copied from interface: CommandChecker
Checks if it is allowed to read the given historic external task log.

Specified by:
checkReadHistoricExternalTaskLog in interface CommandChecker


Copyright © 2017 camunda services GmbH. All rights reserved.