org.springframework.batch.core.step.builder

## Class StepBuilderHelper<B extends StepBuilderHelper<B>>

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

- Direct Known Subclasses:
    AbstractTaskletStepBuilder, FlowStepBuilder, JobStepBuilder, PartitionStepBuilder, StepBuilder

      public abstract class StepBuilderHelper<B extends StepBuilderHelper<B>>
      extends java.lang.Object

  A base class and utility for other step builders providing access to common properties like job repository and transaction manager.
  Since:
    2.2
  Author:
    Dave Syer, Michael Minella

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `StepBuilderHelper.CommonStepProperties`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.commons.logging.Log` | `logger`
    `protected StepBuilderHelper.CommonStepProperties` | `properties`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `StepBuilderHelper(StepBuilderHelper<?> parent)` Create a new builder initialized with any properties in the parent.
    `` | `StepBuilderHelper(java.lang.String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `B` | `allowStartIfComplete(boolean allowStartIfComplete)`
    `protected void` | `enhance(Step target)`
    `protected JobRepository` | `getJobRepository()`
    `protected java.lang.String` | `getName()`
    `protected org.springframework.transaction.PlatformTransactionManager` | `getTransactionManager()`
    `protected boolean` | `isAllowStartIfComplete()`
    `B` | `listener(java.lang.Object listener)` Registers objects using the annotation based listener configuration.
    `B` | `listener(StepExecutionListener listener)`
    `B` | `repository(JobRepository jobRepository)`
    `B` | `startLimit(int startLimit)`
    `B` | `transactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)`

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

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

- - ### Field Detail

    - #### logger

          protected final org.apache.commons.logging.Log logger

    - #### properties

          protected final StepBuilderHelper.CommonStepProperties properties

  - ### Constructor Detail

    - #### StepBuilderHelper

          public StepBuilderHelper(java.lang.String name)

    - #### StepBuilderHelper

          protected StepBuilderHelper(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

    - #### repository

          public B repository(JobRepository jobRepository)

    - #### transactionManager

          public B transactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)

    - #### startLimit

          public B startLimit(int startLimit)

    - #### listener

          public B listener(java.lang.Object listener)

      Registers objects using the annotation based listener configuration.
      Parameters:
        `listener` - the object that has a method configured with listener annotation
      Returns:
        this for fluent chaining

    - #### listener

          public B listener(StepExecutionListener listener)

    - #### allowStartIfComplete

          public B allowStartIfComplete(boolean allowStartIfComplete)

    - #### getName

          protected java.lang.String getName()

    - #### getJobRepository

          protected JobRepository getJobRepository()

    - #### getTransactionManager

          protected org.springframework.transaction.PlatformTransactionManager getTransactionManager()

    - #### isAllowStartIfComplete

          protected boolean isAllowStartIfComplete()

    - #### enhance

          protected void enhance(Step target)