org.unitils.spring.batch
Class UnitilsCommandLineJobRunner
java.lang.Object
org.unitils.spring.batch.UnitilsCommandLineJobRunner
public class UnitilsCommandLineJobRunner
- extends Object
- Since:
- 1.0.0
- Author:
- Jef Verelst, Jeroen Horemans, Thomas De Rycke, Willemijn Wouters
|
Field Summary |
protected static org.apache.commons.logging.Log |
LOGGER
|
|
Method Summary |
String |
getErrorMessage()
Retrieve the error message set by an instance of CommandLineJobRunner as it exits. |
protected org.springframework.batch.core.JobExecution |
getLastFailedJobExecution(String jobIdentifier)
|
protected org.springframework.batch.core.JobParameters |
getNextJobParameters(org.springframework.batch.core.Job job)
|
void |
setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)
Injection setter for JobExplorer. |
void |
setJobParametersConverter(org.springframework.batch.core.converter.JobParametersConverter jobParametersConverter)
Injection setter for JobParametersConverter. |
void |
setLauncher(org.springframework.batch.core.launch.JobLauncher launcher)
Injection setter for the JobLauncher. |
int |
start(String jobIdentifier,
String[] parameters,
Set<String> opts)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
protected static final org.apache.commons.logging.Log LOGGER
UnitilsCommandLineJobRunner
public UnitilsCommandLineJobRunner(org.springframework.context.ApplicationContext context)
- Parameters:
context -
start
public int start(String jobIdentifier,
String[] parameters,
Set<String> opts)
- Parameters:
jobIdentifier - parameters - opts -
- Returns:
- int
getLastFailedJobExecution
protected org.springframework.batch.core.JobExecution getLastFailedJobExecution(String jobIdentifier)
- Parameters:
jobIdentifier -
- Returns:
-
- Throws:
org.springframework.batch.core.launch.JobParametersNotFoundException
getNextJobParameters
protected org.springframework.batch.core.JobParameters getNextJobParameters(org.springframework.batch.core.Job job)
throws org.springframework.batch.core.launch.JobParametersNotFoundException
- Parameters:
job - the job that we need to find the next parameters for
- Returns:
- the next job parameters if they can be located
- Throws:
org.springframework.batch.core.launch.JobParametersNotFoundException - if there is a problem
setLauncher
public void setLauncher(org.springframework.batch.core.launch.JobLauncher launcher)
- Injection setter for the
JobLauncher.
- Parameters:
launcher - the launcher to set
setJobExplorer
public void setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)
- Injection setter for
JobExplorer.
- Parameters:
jobExplorer - the JobExplorer to set
getErrorMessage
public String getErrorMessage()
- Retrieve the error message set by an instance of
CommandLineJobRunner as it exits. Empty if the last job launched was
successful.
- Returns:
- the error message
setJobParametersConverter
public void setJobParametersConverter(org.springframework.batch.core.converter.JobParametersConverter jobParametersConverter)
- Injection setter for
JobParametersConverter.
- Parameters:
jobParametersConverter -
Copyright © 2014. All Rights Reserved.