protected void checkAccess(CommandChecker checker, BatchEntity batch) { checker.checkActivateBatch(batch); }
protected void checkPermissions(CommandContext commandContext) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkCreateBatch(BatchPermissions.CREATE_BATCH_RESTART_PROCESS_INSTANCES); } }
protected void checkCreateAndReadDeployments(CommandContext commandContext, Set<String> deploymentIds) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkCreateDeployment(); for (String deploymentId : deploymentIds) { checker.checkReadDeployment(deploymentId); } } }
private void checkAuthorizationOfStartSignals(final CommandContext commandContext, List<EventSubscriptionEntity> startSignalEventSubscriptions, Map<String, ProcessDefinitionEntity> processDefinitions) { // check authorization for process definition for (EventSubscriptionEntity signalStartEventSubscription : startSignalEventSubscriptions) { ProcessDefinitionEntity processDefinition = processDefinitions.get(signalStartEventSubscription.getId()); if (processDefinition != null) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkCreateProcessInstance(processDefinition); } } } }
protected void checkAuthorization(CorrelationHandlerResult correlation) { CommandContext commandContext = Context.getCommandContext(); for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { if (MessageCorrelationResultType.Execution.equals(correlation.getResultType())) { ExecutionEntity execution = correlation.getExecutionEntity(); checker.checkUpdateProcessInstanceById(execution.getProcessInstanceId()); } else { ProcessDefinitionEntity definition = correlation.getProcessDefinitionEntity(); checker.checkCreateProcessInstance(definition); } } }
protected void checkCreateTask(TaskEntity task, CommandContext commandContext) { for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkCreateTask(task); } } }
protected void checkAccess(CommandContext commandContext, HistoricBatchEntity batch) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricBatch(batch); } }
public CaseInstance execute(CommandContext commandContext) { ensureAtLeastOneNotNull("caseDefinitionId and caseDefinitionKey are null", caseDefinitionId, caseDefinitionKey); CaseDefinitionEntity caseDefinition = find(commandContext); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkCreateCaseInstance(caseDefinition); } // Start the case instance CaseExecutionEntity caseInstance = (CaseExecutionEntity) caseDefinition.createCaseInstance(businessKey); caseInstance.create(variables); return caseInstance; }
protected void checkAccess(CommandContext commandContext, BatchEntity batch) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteBatch(batch); } }
protected void checkAuthorization(CommandContext commandContext, ProcessDefinitionEntity sourceProcessDefinition, ProcessDefinitionEntity targetProcessDefinition) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkCreateMigrationPlan(sourceProcessDefinition, targetProcessDefinition); } }
checker.checkDeleteDeployment(deploymentId);
private void checkAuthorizationOfStartSignals(final CommandContext commandContext, List<EventSubscriptionEntity> startSignalEventSubscriptions, Map<String, ProcessDefinitionEntity> processDefinitions) { // check authorization for process definition for (EventSubscriptionEntity signalStartEventSubscription : startSignalEventSubscriptions) { ProcessDefinitionEntity processDefinition = processDefinitions.get(signalStartEventSubscription.getId()); if (processDefinition != null) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkCreateProcessInstance(processDefinition); } } } }
protected void checkAuthorization(CorrelationHandlerResult correlation) { CommandContext commandContext = Context.getCommandContext(); for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { if (MessageCorrelationResultType.Execution.equals(correlation.getResultType())) { ExecutionEntity execution = correlation.getExecutionEntity(); checker.checkUpdateProcessInstanceById(execution.getProcessInstanceId()); } else { ProcessDefinitionEntity definition = correlation.getProcessDefinitionEntity(); checker.checkCreateProcessInstance(definition); } } }
protected void checkCreateTask(CommandContext commandContext) { for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkCreateTask(); } } }
protected void checkAccess(CommandContext commandContext, HistoricBatchEntity batch) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricBatch(batch); } }
public CaseInstance execute(CommandContext commandContext) { ensureAtLeastOneNotNull("caseDefinitionId and caseDefinitionKey are null", caseDefinitionId, caseDefinitionKey); CaseDefinitionEntity caseDefinition = find(commandContext); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkCreateCaseInstance(caseDefinition); } // Start the case instance CaseExecutionEntity caseInstance = (CaseExecutionEntity) caseDefinition.createCaseInstance(businessKey); caseInstance.create(variables); return caseInstance; }
protected void checkAccess(CommandContext commandContext, BatchEntity batch) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteBatch(batch); } }
protected void checkAuthorization(CommandContext commandContext, ProcessDefinitionEntity sourceProcessDefinition, ProcessDefinitionEntity targetProcessDefinition) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkCreateMigrationPlan(sourceProcessDefinition, targetProcessDefinition); } }
checker.checkDeleteDeployment(deploymentId);
protected void checkAuthorization(CommandContext commandContext, ConditionHandlerResult result) { for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { ProcessDefinitionEntity definition = result.getProcessDefinition(); checker.checkCreateProcessInstance(definition); } }