Package org.springframework.batch.core.step.job

Examples of org.springframework.batch.core.step.job.JobStep


   *
   * @return a new job step
   */
  public Step build() {

    JobStep step = new JobStep();
    step.setName(getName());
    super.enhance(step);
    if (job != null) {
      step.setJob(job);
    }
    if (jobParametersExtractor != null) {
      step.setJobParametersExtractor(jobParametersExtractor);
    }
    if (jobLauncher == null) {
      SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
      jobLauncher.setJobRepository(getJobRepository());
      try {
        jobLauncher.afterPropertiesSet();
      }
      catch (Exception e) {
        throw new StepBuilderException(e);
      }
      this.jobLauncher = jobLauncher;
    }
    step.setJobLauncher(jobLauncher);
    try {
      step.afterPropertiesSet();
    }
    catch (Exception e) {
      throw new StepBuilderException(e);
    }
    return step;
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.step.job.JobStep

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.