Package com.espacogeek.geek.controllers
Class BatchJobController
java.lang.Object
com.espacogeek.geek.controllers.BatchJobController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBatchJobs(int page, int size, String status) Returns paginated Spring Batch job executions, optionally filtered by status.
-
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
JobExplorerdoes 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
BatchJobPagewith the matching executions and pagination metadata.
-