org.springframework.batch.admin.service
Class JobLocatorStepLocator

java.lang.Object
  extended by org.springframework.batch.admin.service.JobLocatorStepLocator
All Implemented Interfaces:
StepLocator

public class JobLocatorStepLocator
extends Object
implements StepLocator

Author:
Dave Syer

Constructor Summary
JobLocatorStepLocator()
          Convenience constructor for declarative configuration.
JobLocatorStepLocator(ListableJobLocator jobLocator)
          Create an instance from this JobLocator.
 
Method Summary
 Step getStep(String path)
          Locate a step by referencing it through its parent job with a separator, e.g.
 Collection<String> getStepNames()
          Loop through all the jobs and pull out their step names.
 void setJobLocator(ListableJobLocator jobLocator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobLocatorStepLocator

public JobLocatorStepLocator(ListableJobLocator jobLocator)
Create an instance from this JobLocator.

Parameters:
jobLocator - a JobLocator

JobLocatorStepLocator

public JobLocatorStepLocator()
Convenience constructor for declarative configuration.

Method Detail

setJobLocator

public void setJobLocator(ListableJobLocator jobLocator)
Parameters:
jobLocator - the jobLocator to set

getStep

public Step getStep(String path)
             throws NoSuchStepException
Locate a step by referencing it through its parent job with a separator, e.g. job-name/step-name. The separator defaults to a forward slash.

Specified by:
getStep in interface StepLocator
Throws:
NoSuchStepException
See Also:
StepLocator.getStep(String)

getStepNames

public Collection<String> getStepNames()
Loop through all the jobs and pull out their step names. The result is in the form that would be appropriate for getStep(String) (i.e. with a separator).

Specified by:
getStepNames in interface StepLocator
See Also:
StepLocator.getStepNames()


Copyright © 2011. All Rights Reserved.