Class BatchJobController

java.lang.Object
com.espacogeek.geek.controllers.BatchJobController

@Controller public class BatchJobController extends Object
  • Constructor Details

    • BatchJobController

      public BatchJobController()
  • Method Details

    • getBatchJobs

      @QueryMapping(name="getBatchJobs") @PreAuthorize("hasRole(\'admin\')") public BatchJobPage getBatchJobs(@Argument(name="page") int page, @Argument(name="size") int size, @Argument(name="status") String status)
      Returns paginated Spring Batch job executions, optionally filtered by status.

      Note: Spring Batch's JobExplorer does not expose native cross-job pagination or status-based filtering at the query level, so all matching executions are collected in memory before slicing. This is acceptable for typical admin panel workloads where job history is bounded.

      Parameters:
      page - Zero-based page number.
      size - Number of items per page.
      status - Optional status filter (e.g. COMPLETED, FAILED, STARTED).
      Returns:
      A BatchJobPage with the matching executions and pagination metadata.