org.springframework.batch.core.step
Class StepSupport

java.lang.Object
  extended by org.springframework.batch.core.step.StepSupport
All Implemented Interfaces:
Step, BeanNameAware

public class StepSupport
extends Object
implements Step, BeanNameAware

Basic no-op support implementation for use as base class for Step. Implements BeanNameAware so that if no name is provided explicitly it will be inferred from the bean definition in Spring configuration.

Author:
Dave Syer

Constructor Summary
StepSupport()
          Default constructor for StepSupport.
StepSupport(String string)
           
 
Method Summary
 void execute(StepExecution stepExecution)
          Not supported but provided so that tests can easily create a step.
 String getName()
           
 int getStartLimit()
           
 boolean isAllowStartIfComplete()
           
 void setAllowStartIfComplete(boolean allowStartIfComplete)
          Public setter for the shouldAllowStartIfComplete.
 void setBeanName(String name)
          Set the name property if it is not already set.
 void setName(String name)
          Set the name property.
 void setStartLimit(int startLimit)
          Public setter for the startLimit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StepSupport

public StepSupport()
Default constructor for StepSupport.


StepSupport

public StepSupport(String string)
Parameters:
string -
Method Detail

getName

public String getName()
Specified by:
getName in interface Step

setBeanName

public void setBeanName(String name)
Set the name property if it is not already set. Because of the order of the callbacks in a Spring container the name property will be set first if it is present. Care is needed with bean definition inheritance - if a parent bean has a name, then its children need an explicit name as well, otherwise they will not be unique.

Specified by:
setBeanName in interface BeanNameAware
See Also:
BeanNameAware.setBeanName(java.lang.String)

setName

public void setName(String name)
Set the name property. Always overrides the default value if this object is a Spring bean.

See Also:
setBeanName(java.lang.String)

getStartLimit

public int getStartLimit()
Specified by:
getStartLimit in interface Step

setStartLimit

public void setStartLimit(int startLimit)
Public setter for the startLimit.

Parameters:
startLimit - the startLimit to set

isAllowStartIfComplete

public boolean isAllowStartIfComplete()
Specified by:
isAllowStartIfComplete in interface Step

setAllowStartIfComplete

public void setAllowStartIfComplete(boolean allowStartIfComplete)
Public setter for the shouldAllowStartIfComplete.

Parameters:
allowStartIfComplete - the shouldAllowStartIfComplete to set

execute

public void execute(StepExecution stepExecution)
             throws JobInterruptedException,
                    UnexpectedJobExecutionException
Not supported but provided so that tests can easily create a step.

Specified by:
execute in interface Step
Throws:
UnsupportedOperationException - always
JobInterruptedException
UnexpectedJobExecutionException
See Also:
Step.execute(org.springframework.batch.core.StepExecution)


Copyright © 2008 SpringSource. All Rights Reserved.