コード例 #1
0
 protected internal virtual void checkAccess(CommandContext commandContext, BatchEntity batch)
 {
     foreach (CommandChecker checker in commandContext.ProcessEngineConfiguration.CommandCheckers)
     {
         checkAccess(checker, batch);
     }
 }
コード例 #2
0
 public virtual void checkActivateBatch(BatchEntity batch)
 {
     if (batch != null && !TenantManager.isAuthenticatedTenant(batch.TenantId))
     {
         throw LOG.exceptionCommandWithUnauthorizedTenant("activate batch '" + batch.Id + "'");
     }
 }
コード例 #3
0
        public virtual Void execute(CommandContext commandContext)
        {
            ensureNotNull(typeof(BadUserRequestException), "Batch id must not be null", "batch id", batchId);

            BatchManager batchManager = commandContext.BatchManager;

            BatchEntity batch = batchManager.findBatchById(batchId);

            ensureNotNull(typeof(BadUserRequestException), "Batch for id '" + batchId + "' cannot be found", "batch", batch);

            checkAccess(commandContext, batch);

            setJobDefinitionState(commandContext, batch.SeedJobDefinitionId);
            setJobDefinitionState(commandContext, batch.MonitorJobDefinitionId);
            setJobDefinitionState(commandContext, batch.BatchJobDefinitionId);

            batchManager.updateBatchSuspensionStateById(batchId, NewSuspensionState);

            logUserOperation(commandContext);

            return(null);
        }
コード例 #4
0
 public virtual void checkActivateBatch(BatchEntity batch)
 {
     AuthorizationManager.checkAuthorization(UPDATE, BATCH, batch.Id);
 }
コード例 #5
0
 public virtual void checkDeleteBatch(BatchEntity batch)
 {
     AuthorizationManager.checkAuthorization(DELETE, BATCH, batch.Id);
 }
コード例 #6
0
 protected internal abstract void checkAccess(CommandChecker checker, BatchEntity batch);
コード例 #7
0
 protected internal override void checkAccess(CommandChecker checker, BatchEntity batch)
 {
     checker.checkSuspendBatch(batch);
 }