Example usage for org.springframework.batch.core.step.job JobStep JobStep

List of usage examples for org.springframework.batch.core.step.job JobStep JobStep

Introduction

In this page you can find the example usage for org.springframework.batch.core.step.job JobStep JobStep.

Prototype

JobStep

Source Link

Usage

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

/**
 * Create a {@link Step} from the configuration provided.
 * /*w  w  w . j a  va2 s . 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;
    }
}