Package org.springframework.batch.core.step

Examples of org.springframework.batch.core.step.AbstractStep


  protected void enhance(Step target) {

    if (target instanceof AbstractStep) {

      AbstractStep step = (AbstractStep) target;
      step.setJobRepository(properties.getJobRepository());

      Boolean allowStartIfComplete = properties.allowStartIfComplete;
      if (allowStartIfComplete != null) {
        step.setAllowStartIfComplete(allowStartIfComplete);
      }

      step.setStartLimit(properties.startLimit);

      List<StepExecutionListener> listeners = properties.stepExecutionListeners;
      if (!listeners.isEmpty()) {
        step.setStepExecutionListeners(listeners.toArray(new StepExecutionListener[0]));
      }

    }

    if (target instanceof TaskletStep) {
      TaskletStep step = (TaskletStep) target;
      step.setTransactionManager(properties.transactionManager);
    }

  }
View Full Code Here


  private ApplicationContext context;

  @Test
  public void test() throws Exception {
    //retrieve the step from the context and see that it's allow is set
    AbstractStep abstractStep = (AbstractStep) context.getBean("simpleJob.step1");
    assertTrue(abstractStep.isAllowStartIfComplete());
  }
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.step.AbstractStep

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.