Example usage for org.springframework.batch.core.partition.support PartitionStep PartitionStep

List of usage examples for org.springframework.batch.core.partition.support PartitionStep PartitionStep

Introduction

In this page you can find the example usage for org.springframework.batch.core.partition.support PartitionStep PartitionStep.

Prototype

PartitionStep

Source Link

Usage

From source file:org.springframework.batch.core.configuration.xml.StepParserStepFactoryBean.java

/**
 * Create a {@link Step} from the configuration provided.
 * //from w  w w. j  av a 2s .  c  o  m
 * @see FactoryBean#getObject()
 */
public final Object getObject() throws Exception {
    if (hasChunkElement) {
        Assert.isNull(tasklet, "Step [" + name
                + "] has both a <chunk/> element and a 'ref' attribute  referencing a Tasklet.");

        validateFaultTolerantSettings();
        if (isFaultTolerant()) {
            FaultTolerantStepFactoryBean<I, O> fb = new FaultTolerantStepFactoryBean<I, O>();
            configureSimple(fb);
            configureFaultTolerant(fb);
            return fb.getObject();
        } else {
            SimpleStepFactoryBean<I, O> fb = new SimpleStepFactoryBean<I, O>();
            configureSimple(fb);
            return fb.getObject();
        }
    } else if (tasklet != null) {
        TaskletStep ts = new TaskletStep();
        configureTaskletStep(ts);
        return ts;
    } else if (flow != null) {
        FlowStep ts = new FlowStep();
        configureFlowStep(ts);
        return ts;
    } else if (job != null) {
        JobStep ts = new JobStep();
        configureJobStep(ts);
        return ts;
    } else {
        PartitionStep ts = new PartitionStep();
        configurePartitionStep(ts);
        return ts;
    }
}