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 Details

    • JobExecutionThinController

      public JobExecutionThinController(TaskJobService taskJobService)
      Creates a JobExecutionThinController that retrieves Job Execution information from a the JobService
      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 of JobExecutionThinResource defined jobs that do not contain step execution detail.
      Parameters:
      pageable - page-able collection of TaskJobExecutions.
      assembler - for the TaskJobExecutions
      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 job
      pageable - page-able collection of TaskJobExecutions.
      assembler - for the TaskJobExecutions
      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 of TaskJobExecutions.
      assembler - for the TaskJobExecutions
      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 of TaskJobExecutions.
      assembler - for the TaskJobExecutions
      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 of TaskJobExecutions.
      assembler - for the TaskJobExecutions
      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.