Class JobExecutionThinController
java.lang.Object
org.springframework.cloud.dataflow.server.controller.JobExecutionThinController
@RestController
@RequestMapping("/jobs/thinexecutions")
@ExposesResourceFor(JobExecutionThinResource.class)
public class JobExecutionThinController
extends Object
Controller for retrieving
JobExecutions where the step executions are
not included in the results that are returned.- Since:
- 2.0
- Author:
- Glenn Renfro, Corneil du Plessis
-
Constructor Summary
ConstructorsConstructorDescriptionJobExecutionThinController(TaskJobService taskJobService) Creates aJobExecutionThinControllerthat retrieves Job Execution information from a theJobService -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.hateoas.PagedModel<JobExecutionThinResource>listJobsOnly(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) Return a page-able list ofJobExecutionThinResourcedefined jobs that do not contain step execution detail.org.springframework.hateoas.PagedModel<JobExecutionThinResource>retrieveJobsByDateRange(Date fromDate, Date toDate, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) Retrieve all task job executions filtered with the date range specifiedorg.springframework.hateoas.PagedModel<JobExecutionThinResource>retrieveJobsByJobInstanceId(int jobInstanceId, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) Retrieve all task job executions filtered with the job instance id specifiedorg.springframework.hateoas.PagedModel<JobExecutionThinResource>retrieveJobsByName(String jobName, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) Retrieve all task job executions with the task name specifiedorg.springframework.hateoas.PagedModel<JobExecutionThinResource>retrieveJobsByTaskExecutionId(int taskExecutionId, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) Retrieve all task job executions filtered with the task execution id specified
-
Constructor Details
-
JobExecutionThinController
Creates aJobExecutionThinControllerthat retrieves Job Execution information from a theJobService- Parameters:
taskJobService- the service this controller will use for retrieving job execution information. Must not be null.
-
-
Method Details
-
listJobsOnly
@GetMapping(value="", produces="application/json") @ResponseStatus(OK) public org.springframework.hateoas.PagedModel<JobExecutionThinResource> listJobsOnly(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) throws org.springframework.batch.core.launch.NoSuchJobExecutionException Return a page-able list ofJobExecutionThinResourcedefined jobs that do not contain step execution detail.- Parameters:
pageable- page-able collection ofTaskJobExecutions.assembler- for theTaskJobExecutions- Returns:
- a list of Task/Job executions(job executions do not contain step executions.
- Throws:
org.springframework.batch.core.launch.NoSuchJobExecutionException- in the event that a job execution id specified is not present when looking up stepExecutions for the result.
-
retrieveJobsByName
@GetMapping(value="", params="name", produces="application/json") @ResponseStatus(OK) public org.springframework.hateoas.PagedModel<JobExecutionThinResource> retrieveJobsByName(@RequestParam("name") String jobName, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) throws org.springframework.batch.core.launch.NoSuchJobException Retrieve all task job executions with the task name specified- Parameters:
jobName- name of the jobpageable- page-able collection ofTaskJobExecutions.assembler- for theTaskJobExecutions- Returns:
- list task/job executions with the specified jobName.
- Throws:
org.springframework.batch.core.launch.NoSuchJobException- if the job with the given name does not exist.
-
retrieveJobsByDateRange
@GetMapping(value="", params={"fromDate","toDate"}, produces="application/json") @ResponseStatus(OK) public org.springframework.hateoas.PagedModel<JobExecutionThinResource> retrieveJobsByDateRange(@RequestParam @DateTimeFormat(pattern="yyyy-MM-dd\'T\'HH:mm:ss,SSS") Date fromDate, @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd\'T\'HH:mm:ss,SSS") Date toDate, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) throws org.springframework.batch.core.launch.NoSuchJobException Retrieve all task job executions filtered with the date range specified- Parameters:
fromDate- the date which start date must be greater than.toDate- the date which start date must be less than.pageable- page-able collection ofTaskJobExecutions.assembler- for theTaskJobExecutions- Returns:
- list task/job executions with the specified jobName.
- Throws:
org.springframework.batch.core.launch.NoSuchJobException- if the job with the given name does not exist.
-
retrieveJobsByJobInstanceId
@GetMapping(value="", params="jobInstanceId", produces="application/json") @ResponseStatus(OK) public org.springframework.hateoas.PagedModel<JobExecutionThinResource> retrieveJobsByJobInstanceId(@RequestParam int jobInstanceId, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) throws org.springframework.batch.core.launch.NoSuchJobException Retrieve all task job executions filtered with the job instance id specified- Parameters:
jobInstanceId- the job instance id associated with the execution.pageable- page-able collection ofTaskJobExecutions.assembler- for theTaskJobExecutions- Returns:
- list task/job executions with the specified jobName.
- Throws:
org.springframework.batch.core.launch.NoSuchJobException- if the job with the given name does not exist.
-
retrieveJobsByTaskExecutionId
@GetMapping(value="", params="taskExecutionId", produces="application/json") @ResponseStatus(OK) public org.springframework.hateoas.PagedModel<JobExecutionThinResource> retrieveJobsByTaskExecutionId(@RequestParam int taskExecutionId, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler) throws org.springframework.batch.core.launch.NoSuchJobException Retrieve all task job executions filtered with the task execution id specified- Parameters:
taskExecutionId- the task execution id associated with the execution.pageable- page-able collection ofTaskJobExecutions.assembler- for theTaskJobExecutions- Returns:
- list task/job executions with the specified jobName.
- Throws:
org.springframework.batch.core.launch.NoSuchJobException- if the job with the given name does not exist.
-