org.springframework.cloud.dataflow.server.controller

## Class JobExecutionThinController

- java.lang.Object
- - org.springframework.cloud.dataflow.server.controller.JobExecutionThinController

-     @RestController
       @RequestMapping(value="/jobs/thinexecutions")
       @ExposesResourceFor(value=JobExecutionThinResource.class)
      public class JobExecutionThinController
      extends Object

  Controller for retrieving `JobExecution`s where the step executions are not included in the results that are returned.
  Since:
    2.0
  Author:
    Glenn Renfro

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JobExecutionThinController(TaskJobService taskJobService)` Creates a `JobExecutionThinController` that retrieves Job Execution information from a the `JobService`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.hateoas.PagedModel<JobExecutionThinResource>` | `listJobsOnly(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<TaskJobExecution> assembler)` Return a page-able list of `JobExecutionThinResource` defined 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 specified
    `org.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 specified
    `org.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 specified
    `org.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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JobExecutionThinController

          @Autowired
          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 Detail

    - #### listJobsOnly

          @RequestMapping(value="",
                          method=GET,
                          produces="application/json")
           @ResponseStatus(value=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 `TaskJobExecution`s.
        `assembler` - for the `TaskJobExecution`s
      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

          @RequestMapping(value="",
                          method=GET,
                          params="name",
                          produces="application/json")
           @ResponseStatus(value=OK)
          public org.springframework.hateoas.PagedModel<JobExecutionThinResource> retrieveJobsByName(@RequestParam(value="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 `TaskJobExecution`s.
        `assembler` - for the `TaskJobExecution`s
      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

          @RequestMapping(value="",
                          method=GET,
                          params={"fromDate","toDate"},
                          produces="application/json")
           @ResponseStatus(value=OK)
          public org.springframework.hateoas.PagedModel<JobExecutionThinResource> retrieveJobsByDateRange(@RequestParam(value="fromDate") @DateTimeFormat(pattern="yyyy-MM-dd\'T\'HH:mm:ss,SSS")
                                                                                                                                                                                                                                                                                      Date fromDate,
                                                                                                                                                                                                                                                                                      @RequestParam(value="toDate") @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 `TaskJobExecution`s.
        `assembler` - for the `TaskJobExecution`s
      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

          @RequestMapping(value="",
                          method=GET,
                          params="jobInstanceId",
                          produces="application/json")
           @ResponseStatus(value=OK)
          public org.springframework.hateoas.PagedModel<JobExecutionThinResource> retrieveJobsByJobInstanceId(@RequestParam(value="jobInstanceId")
                                                                                                                                                                                                                                                                                    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 `TaskJobExecution`s.
        `assembler` - for the `TaskJobExecution`s
      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

          @RequestMapping(value="",
                          method=GET,
                          params="taskExecutionId",
                          produces="application/json")
           @ResponseStatus(value=OK)
          public org.springframework.hateoas.PagedModel<JobExecutionThinResource> retrieveJobsByTaskExecutionId(@RequestParam(value="taskExecutionId")
                                                                                                                                                                                                                                                                                        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 `TaskJobExecution`s.
        `assembler` - for the `TaskJobExecution`s
      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.

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.