@RestController @RequestMapping(value="/jobs/executions") @ExposesResourceFor(value=JobExecutionInfoResource.class) public class BatchJobExecutionsController extends AbstractBatchJobsController
jobExecutionInfoResourceAssembler, jobInfoResourceAssembler, jobInstanceInfoResourceAssembler, jobService, progressInfoResourceAssembler, stepExecutionInfoResourceAssembler, timeZone, xdJobDefinitionRepository, xdJobrepository| Constructor and Description |
|---|
BatchJobExecutionsController() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<JobExecutionInfoResource> |
executionsForJob(java.lang.String jobName,
int startJobExecution,
int pageSize)
Return a paged collection of job executions for a given job.
|
JobExecutionInfoResource |
getJobExecutionInfo(long executionId) |
void |
launchJob(java.lang.String name,
java.lang.String jobParameters)
Send the request to launch Job.
|
org.springframework.hateoas.PagedResources<JobExecutionInfoResource> |
list(org.springframework.data.domain.Pageable pageable)
List all job executions in a given range.
|
void |
restartJobExecution(long jobExecutionId)
Restart the Job Execution with the given executionId.
|
void |
stopAll()
Stop all job executions.
|
void |
stopJobExecution(long jobExecutionId)
Stop Job Execution by the given executionId.
|
setTimeZone@RequestMapping(value="",
method=GET,
produces="application/json")
@ResponseStatus(value=OK)
public org.springframework.hateoas.PagedResources<JobExecutionInfoResource> list(org.springframework.data.domain.Pageable pageable)
PageRequest(0, 20) is passed in. See PageableHandlerMethodArgumentResolver
for details.pageable - If not provided will default to page 0 and a page size of 20@RequestMapping(value="",
method=GET,
params="jobname",
produces="application/json")
@ResponseStatus(value=OK)
public java.util.Collection<JobExecutionInfoResource> executionsForJob(@RequestParam(value="jobname")
java.lang.String jobName,
@RequestParam(defaultValue="0")
int startJobExecution,
@RequestParam(defaultValue="20")
int pageSize)
jobName - name of the jobstartJobExecution - start index for the job execution listpageSize - page size for the list@RequestMapping(value="",
method=POST,
params="jobname")
@ResponseStatus(value=CREATED)
public void launchJob(@RequestParam(value="jobname")
java.lang.String name,
@RequestParam(required=false)
java.lang.String jobParameters)
name - the name of the jobjobParameters - the job parameters in JSON string@RequestMapping(value="/{executionId}",
method=GET)
@ResponseStatus(value=OK)
public JobExecutionInfoResource getJobExecutionInfo(@PathVariable
long executionId)
executionId - Id of the JobExecutionNoSuchJobExecutionException - Thrown if the JobExecution does not exist@RequestMapping(value="/{executionId}",
method=PUT,
params="stop=true")
@ResponseStatus(value=OK)
public void stopJobExecution(@PathVariable(value="executionId")
long jobExecutionId)
jobExecutionId - the executionId of the job execution to stop@RequestMapping(value="/{executionId}",
method=PUT,
params="restart=true")
@ResponseStatus(value=OK)
public void restartJobExecution(@PathVariable(value="executionId")
long jobExecutionId)
jobExecutionId - the executionId of the job execution to restart@RequestMapping(value="",
method=PUT,
params="stop=true")
@ResponseStatus(value=OK)
public void stopAll()