org.springframework.batch.core.job
Class AbstractJob

java.lang.Object
  extended by org.springframework.batch.core.job.AbstractJob
All Implemented Interfaces:
Job, BeanNameAware
Direct Known Subclasses:
SimpleJob

public abstract class AbstractJob
extends Object
implements BeanNameAware, Job

Batch domain object representing a job. Job is an explicit abstraction representing the configuration of a job specified by a developer. It should be noted that restart policy is applied to the job as a whole and not to a step.

Author:
Lucas Ward, Dave Syer

Constructor Summary
AbstractJob()
          Default constructor.
AbstractJob(String name)
          Convenience constructor to immediately add name (which is mandatory but not final).
 
Method Summary
 void addStep(Step step)
           
 String getName()
           
 List getSteps()
           
 boolean isRestartable()
           
 void setBeanName(String name)
          Set the name property if it is not already set.
 void setName(String name)
          Set the name property.
 void setRestartable(boolean restartable)
           
 void setSteps(List steps)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.batch.core.Job
execute
 

Constructor Detail

AbstractJob

public AbstractJob()
Default constructor.


AbstractJob

public AbstractJob(String name)
Convenience constructor to immediately add name (which is mandatory but not final).

Parameters:
name -
Method Detail

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)

getName

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

getSteps

public List getSteps()
Specified by:
getSteps in interface Job

setSteps

public void setSteps(List steps)

addStep

public void addStep(Step step)

setRestartable

public void setRestartable(boolean restartable)

isRestartable

public boolean isRestartable()
Specified by:
isRestartable in interface Job

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 SpringSource. All Rights Reserved.