org.springframework.batch.core.jsr.configuration.xml

## Class StepFactoryBean<I,O>

- java.lang.Object
- - org.springframework.batch.core.configuration.xml.StepParserStepFactoryBean<I,O>
  - - org.springframework.batch.core.jsr.configuration.xml.StepFactoryBean<I,O>

- All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.FactoryBean<Step>

      public class StepFactoryBean<I,O>
      extends StepParserStepFactoryBean<I,O>

  This `FactoryBean` is used by the JSR-352 namespace parser to create `Step` objects. It stores all of the properties that are configurable on the <step/>.
  Since:
    3.0
  Author:
    Michael Minella, Chris Schaefer

- - ### Field Summary

    - ### Fields inherited from interface org.springframework.beans.factory.FactoryBean

      `OBJECT_TYPE_ATTRIBUTE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StepFactoryBean()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Step` | `createPartitionStep()`
    `protected TaskletStep` | `createTaskletStep()`
    `protected FaultTolerantStepBuilder<I,O>` | `getFaultTolerantStepBuilder(java.lang.String stepName)`
    `Step` | `getObject()` Create a `Step` from the configuration provided.
    `protected SimpleStepBuilder<I,O>` | `getSimpleStepBuilder(java.lang.String stepName)`
    `void` | `setBatchPropertyContext(BatchPropertyContext context)`
    `protected void` | `setChunk(SimpleStepBuilder<I,O> builder)`
    `void` | `setPartitionReducer(javax.batch.api.partition.PartitionReducer reducer)`
    `void` | `setPartitions(int partitions)`
    `void` | `setStepChunkCompletionPolicy(java.lang.Object chunkCompletionPolicy)` Wraps a `CheckpointAlgorithm` in a `CheckpointAlgorithmAdapter` if required for consumption by the rest of the framework.
    `void` | `setStepItemProcessor(java.lang.Object itemProcessor)` Wraps a `ItemProcessor` in a `ItemProcessorAdapter` if required for consumption by the rest of the framework.
    `void` | `setStepItemReader(java.lang.Object itemReader)` Wraps a `ItemReader` in a `ItemReaderAdapter` if required for consumption by the rest of the framework.
    `void` | `setStepItemWriter(java.lang.Object itemWriter)` Wraps a `ItemWriter` in a `ItemWriterAdapter` if required for consumption by the rest of the framework.
    `void` | `setStepTasklet(java.lang.Object tasklet)` Wraps a `Batchlet` in a `BatchletAdapter` if required for consumption by the rest of the framework.
    `void` | `setTimeout(java.lang.Integer timeout)`

    - ### Methods inherited from class org.springframework.batch.core.configuration.xml.StepParserStepFactoryBean

      `createFaultTolerantStep, createFlowStep, createSimpleStep, enhanceCommonStep, enhanceTaskletStepBuilder, getCommitInterval, getCompletionPolicy, getJobRepository, getName, getObjectType, getPartitionHandler, getStepExecutionAggergator, getTasklet, getTransactionManager, hasChunkElement, hasPartitionElement, hasTasklet, isFaultTolerant, isSingleton, registerItemListeners, requiresTransactionManager, setAllowStartIfComplete, setBackOffPolicy, setBeanName, setCacheCapacity, setChunkCompletionPolicy, setCommitInterval, setFlow, setGridSize, setHasChunkElement, setIsolation, setIsReaderTransactionalQueue, setItemProcessor, setItemReader, setItemWriter, setJob, setJobLauncher, setJobParametersExtractor, setJobRepository, setKeyGenerator, setListeners, setName, setNoRollbackExceptionClasses, setPartitioner, setPartitionHandler, setPartitionLock, setPartitionQueue, setProcessorTransactional, setPropagation, setRetryableExceptionClasses, setRetryContextCache, setRetryLimit, setRetryListeners, setRetryPolicy, setSkipLimit, setSkippableExceptionClasses, setSkipPolicy, setStartLimit, setStep, setStepExecutionAggregator, setStreams, setTaskExecutor, setTasklet, setThrottleLimit, setTransactionManager, setTransactionTimeout, validateFaultTolerantSettings`

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

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

- - ### Constructor Detail

    - #### StepFactoryBean

          public StepFactoryBean()

  - ### Method Detail

    - #### setPartitionReducer

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

    - #### setBatchPropertyContext

          public void setBatchPropertyContext(BatchPropertyContext context)

    - #### setPartitions

          public void setPartitions(int partitions)

    - #### getObject

          public Step getObject()
                         throws java.lang.Exception

      Create a `Step` from the configuration provided.
      Specified by:
        `getObject` in interface `org.springframework.beans.factory.FactoryBean<Step>`
      Overrides:
        `getObject` in class `StepParserStepFactoryBean<I,O>`
      Throws:
        `java.lang.Exception`
      See Also:
        `FactoryBean.getObject()`

    - #### createTaskletStep

          protected TaskletStep createTaskletStep()

      Overrides:
        `createTaskletStep` in class `StepParserStepFactoryBean<I,O>`
      Returns:
        a new `TaskletStep`

    - #### setChunk

          protected void setChunk(SimpleStepBuilder<I,O> builder)

      Overrides:
        `setChunk` in class `StepParserStepFactoryBean<I,O>`

    - #### createPartitionStep

          protected Step createPartitionStep()

      Overrides:
        `createPartitionStep` in class `StepParserStepFactoryBean<I,O>`

    - #### setStepTasklet

          public void setStepTasklet(java.lang.Object tasklet)

      Wraps a `Batchlet` in a `BatchletAdapter` if required for consumption by the rest of the framework.
      Parameters:
        `tasklet` - `Tasklet` or `Batchlet` implementation
      Throws:
        `java.lang.IllegalArgumentException` - if tasklet does not implement either Tasklet or Batchlet

    - #### setStepItemReader

          public void setStepItemReader(java.lang.Object itemReader)

      Wraps a `ItemReader` in a `ItemReaderAdapter` if required for consumption by the rest of the framework.
      Parameters:
        `itemReader` - `ItemReader` or `ItemReader` implementation
      Throws:
        `java.lang.IllegalArgumentException` - if itemReader does not implement either version of ItemReader

    - #### setStepItemProcessor

          public void setStepItemProcessor(java.lang.Object itemProcessor)

      Wraps a `ItemProcessor` in a `ItemProcessorAdapter` if required for consumption by the rest of the framework.
      Parameters:
        `itemProcessor` - `ItemProcessor` or `ItemProcessor` implementation
      Throws:
        `java.lang.IllegalArgumentException` - if itemProcessor does not implement either version of ItemProcessor

    - #### setStepItemWriter

          public void setStepItemWriter(java.lang.Object itemWriter)

      Wraps a `ItemWriter` in a `ItemWriterAdapter` if required for consumption by the rest of the framework.
      Parameters:
        `itemWriter` - `ItemWriter` or `ItemWriter` implementation
      Throws:
        `java.lang.IllegalArgumentException` - if itemWriter does not implement either version of ItemWriter

    - #### setStepChunkCompletionPolicy

          public void setStepChunkCompletionPolicy(java.lang.Object chunkCompletionPolicy)

      Wraps a `CheckpointAlgorithm` in a `CheckpointAlgorithmAdapter` if required for consumption by the rest of the framework.
      Parameters:
        `chunkCompletionPolicy` - `CompletionPolicy` or `CheckpointAlgorithm` implementation
      Throws:
        `java.lang.IllegalArgumentException` - if chunkCompletionPolicy does not implement either CompletionPolicy or CheckpointAlgorithm

    - #### getFaultTolerantStepBuilder

          protected FaultTolerantStepBuilder<I,O> getFaultTolerantStepBuilder(java.lang.String stepName)

      Overrides:
        `getFaultTolerantStepBuilder` in class `StepParserStepFactoryBean<I,O>`

    - #### getSimpleStepBuilder

          protected SimpleStepBuilder<I,O> getSimpleStepBuilder(java.lang.String stepName)

      Overrides:
        `getSimpleStepBuilder` in class `StepParserStepFactoryBean<I,O>`

    - #### setTimeout

          public void setTimeout(java.lang.Integer timeout)