Exemple #1
0
 public override T execute <T>(Command <T> command)
 {
     try
     {
         count++;   // only catch exception if we are at the top of the command stack
         // (there may be multiple nested command invocations and we need
         // to prevent that this intercepter swallows an exception)
         T result = next.execute(command);
         count--;
         return(result);
     }
     catch (AuthorizationException e)
     {
         count--;
         if (count == 0 && isActive)
         {
             lastException = e;
             LOG.info("Caught authorization exception; storing for assertion in test", e);
         }
         else
         {
             throw e;
         }
     }
     return(default(T));
 }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") public <T> T execute(final org.camunda.bpm.engine.impl.interceptor.Command<T> command)
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
        public override T execute <T>(Command <T> command)
        {
            TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager);

            transactionTemplate.PropagationBehavior = transactionPropagation;
            T result = (T)transactionTemplate.execute(new TransactionCallbackAnonymousInnerClass(this, command));

            return(result);
        }
Exemple #3
0
 public SelfAssertingCommand(CommandInvocationContextTest outerInstance, Command <Void> innerCommand)
 {
     this.outerInstance = outerInstance;
     this.innerCommand  = innerCommand;
 }
Exemple #4
0
 public TransactionCallbackAnonymousInnerClass(SpringTransactionInterceptor outerInstance, Command <T> command)
 {
     this.outerInstance = outerInstance;
     this.command       = command;
 }
Exemple #5
0
 public CallableAnonymousInnerClass(ProcessApplicationContextInterceptor outerInstance, org.camunda.bpm.engine.impl.interceptor.Command <T> command)
 {
     this.outerInstance = outerInstance;
     this.command       = command;
 }
Exemple #6
0
 public ControlledCommand(ControllableThread controllableThread, Command <T> command)
 {
     this.controllableThread = controllableThread;
     this.command            = command;
 }