org.springframework.batch.core.jsr.step

## Class PartitionStep

- java.lang.Object
- - org.springframework.batch.core.step.AbstractStep
  - - org.springframework.batch.core.partition.support.PartitionStep
    - - org.springframework.batch.core.jsr.step.PartitionStep

- All Implemented Interfaces:
    Step, StepLocator, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

      public class PartitionStep
      extends PartitionStep
      implements StepLocator

  An extension of the `PartitionStep` that provides additional semantics required by JSR-352. Specifically, this implementation adds the required lifecycle calls to the `PartitionReducer` if it is used.
  Since:
    3.0
  Author:
    Michael Minella

- - ### Field Summary

    - ### Fields inherited from interface org.springframework.batch.core.Step

      `STEP_TYPE_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PartitionStep()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `doExecute(StepExecution stepExecution)` Delegate execution to the `PartitionHandler` provided.
    `Step` | `getStep(java.lang.String stepName)`
    `java.util.Collection<java.lang.String>` | `getStepNames()`
    `void` | `setPartitionReducer(javax.batch.api.partition.PartitionReducer reducer)`

    - ### Methods inherited from class org.springframework.batch.core.partition.support.PartitionStep

      `afterPropertiesSet, getPartitionHandler, getStepExecutionSplitter, setPartitionHandler, setStepExecutionAggregator, setStepExecutionSplitter`

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

      `close, doExecutionRegistration, doExecutionRelease, execute, getCompositeListener, getJobRepository, getName, getStartLimit, isAllowStartIfComplete, open, registerStepExecutionListener, setAllowStartIfComplete, setBeanName, setJobRepository, setName, setStartLimit, setStepExecutionListeners, toString`

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

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

- - ### Constructor Detail

    - #### PartitionStep

          public PartitionStep()

  - ### Method Detail

    - #### setPartitionReducer

          public void setPartitionReducer(javax.batch.api.partition.PartitionReducer reducer)

    - #### doExecute

          protected void doExecute(StepExecution stepExecution)
                            throws java.lang.Exception

      Delegate execution to the `PartitionHandler` provided. The `StepExecution` passed in here becomes the parent or master execution for the partition, summarizing the status on exit of the logical grouping of work carried out by the `PartitionHandler`. The individual step executions and their input parameters (through `ExecutionContext`) for the partition elements are provided by the `StepExecutionSplitter`.
      Overrides:
        `doExecute` in class `PartitionStep`
      Parameters:
        `stepExecution` - the master step execution for the partition
      Throws:
        `java.lang.Exception`
      See Also:
        `Step.execute(StepExecution)`

    - #### getStepNames

          public java.util.Collection<java.lang.String> getStepNames()

      Specified by:
        `getStepNames` in interface `StepLocator`

    - #### getStep

          public Step getStep(java.lang.String stepName)
                       throws NoSuchStepException

      Specified by:
        `getStep` in interface `StepLocator`
      Throws:
        `NoSuchStepException`