@RestController @RequestMapping(value="/jobs/executions") @ExposesResourceFor(value=JobExecutionResource.class) public class JobExecutionController extends Object
JobExecution. This
includes obtaining Job execution information from the job explorer.| Constructor and Description |
|---|
JobExecutionController(TaskJobService taskJobService)
Creates a
JobExecutionController that retrieves Job Execution information from
a the JobService |
| Modifier and Type | Method and Description |
|---|---|
ResponseEntity<Void> |
restartJobExecution(long jobExecutionId,
String schemaTarget)
Restart the Job Execution with the given jobExecutionId.
|
org.springframework.hateoas.PagedModel<JobExecutionResource> |
retrieveJobsByParameters(String jobName,
org.springframework.batch.core.BatchStatus status,
org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler)
Retrieve all task job executions with the task name specified
|
ResponseEntity<Void> |
stopJobExecution(long jobExecutionId,
String schemaTarget)
Stop a Job Execution with the given jobExecutionId.
|
JobExecutionResource |
view(long id,
String schemaTarget)
View the details of a single task execution, specified by id.
|
public JobExecutionController(TaskJobService taskJobService)
JobExecutionController that retrieves Job Execution information from
a the JobServicetaskJobService - the service this controller will use for retrieving job execution
information. Must not be null.@RequestMapping(value="", method=GET, produces="application/json") @ResponseStatus(value=OK) public org.springframework.hateoas.PagedModel<JobExecutionResource> retrieveJobsByParameters(@RequestParam(value="name",required=false) String jobName, @RequestParam(value="status",required=false) org.springframework.batch.core.BatchStatus status, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) throws org.springframework.batch.core.launch.NoSuchJobException, org.springframework.batch.core.launch.NoSuchJobExecutionException
jobName - name of the job. SQL server specific wildcards are enabled (eg.: myJob%,
m_Job, ...)status - Optional status criteria.pageable - page-able collection of TaskJobExecutions.assembler - for the TaskJobExecutionsorg.springframework.batch.core.launch.NoSuchJobException - if the job with the given name does not exist.org.springframework.batch.core.launch.NoSuchJobExecutionException - if the job execution doesn't exist.@RequestMapping(value="/{id}", method=GET, produces="application/json") @ResponseStatus(value=OK) public JobExecutionResource view(@PathVariable(value="id") long id, @RequestParam(name="schemaTarget",required=false) String schemaTarget) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
id - the id of the requested JobExecutionJobExecutionorg.springframework.batch.core.launch.NoSuchJobExecutionException - if the specified job execution for the id does not
exist.@RequestMapping(value="/{executionId}", method=PUT, params="stop=true") public ResponseEntity<Void> stopJobExecution(@PathVariable(value="executionId") long jobExecutionId, @RequestParam(value="schemaTarget",required=false) String schemaTarget) throws org.springframework.batch.core.launch.NoSuchJobExecutionException, org.springframework.batch.core.launch.JobExecutionNotRunningException
stop=true in order to invoke this endpoint.jobExecutionId - the executionId of the job execution to stop.org.springframework.batch.core.launch.JobExecutionNotRunningException - if a stop is requested on a job that is not
running.org.springframework.batch.core.launch.NoSuchJobExecutionException - if the job execution id specified does not exist.@RequestMapping(value="/{executionId}", method=PUT, params="restart=true") @ResponseStatus(value=OK) public ResponseEntity<Void> restartJobExecution(@PathVariable(value="executionId") long jobExecutionId, @RequestParam(value="schemaTarget",required=false) String schemaTarget) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
restart=true in order to invoke this endpoint.jobExecutionId - the executionId of the job execution to restartorg.springframework.batch.core.launch.NoSuchJobExecutionException - if the job execution for the jobExecutionId
specified does not exist.Copyright © 2023 Pivotal Software, Inc.. All rights reserved.