org.springframework.batch.core.step.builder

## Class JobStepBuilder

- java.lang.Object
- - org.springframework.batch.core.step.builder.StepBuilderHelper<JobStepBuilder>
  - - org.springframework.batch.core.step.builder.JobStepBuilder

-     public class JobStepBuilder
      extends StepBuilderHelper<JobStepBuilder>

  A step builder for `JobStep` instances. A job step executes a nested `Job` with parameters taken from the parent job or from the step execution.
  Since:
    2.2
  Author:
    Dave Syer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.springframework.batch.core.step.builder.StepBuilderHelper

      `StepBuilderHelper.CommonStepProperties`

  - ### Field Summary

    - ### Fields inherited from class org.springframework.batch.core.step.builder.StepBuilderHelper

      `logger, properties`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JobStepBuilder(StepBuilderHelper<?> parent)` Create a new builder initialized with any properties in the parent.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Step` | `build()` Build a step from the job provided.
    `JobStepBuilder` | `job(Job job)` Provide a job to execute during the step.
    `JobStepBuilder` | `launcher(JobLauncher jobLauncher)` Add a job launcher.
    `JobStepBuilder` | `parametersExtractor(JobParametersExtractor jobParametersExtractor)` Provide a job parameters extractor.

    - ### Methods inherited from class org.springframework.batch.core.step.builder.StepBuilderHelper

      `allowStartIfComplete, enhance, getJobRepository, getName, getTransactionManager, isAllowStartIfComplete, listener, listener, repository, startLimit, transactionManager`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JobStepBuilder

          public JobStepBuilder(StepBuilderHelper<?> parent)

      Create a new builder initialized with any properties in the parent. The parent is copied, so it can be re-used.
      Parameters:
        `parent` - a parent helper containing common step properties

  - ### Method Detail

    - #### job

          public JobStepBuilder job(Job job)

      Provide a job to execute during the step.
      Parameters:
        `job` - the job to execute
      Returns:
        this for fluent chaining

    - #### launcher

          public JobStepBuilder launcher(JobLauncher jobLauncher)

      Add a job launcher. Defaults to a simple job launcher.
      Parameters:
        `jobLauncher` - the job launcher to use
      Returns:
        this for fluent chaining

    - #### parametersExtractor

          public JobStepBuilder parametersExtractor(JobParametersExtractor jobParametersExtractor)

      Provide a job parameters extractor. Useful for extracting job parameters from the parent step execution context or job parameters.
      Parameters:
        `jobParametersExtractor` - the job parameters extractor to use
      Returns:
        this for fluent chaining

    - #### build

          public Step build()

      Build a step from the job provided.
      Returns:
        a new job step