use of org.codelibs.fess.app.pager.SchedulerPager in project fess by codelibs.
the class ApiAdminSchedulerAction method settings.
// GET /api/admin/scheduler
// POST /api/admin/scheduler
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
validateApi(body, messages -> {
});
final SchedulerPager pager = copyBeanToNewBean(body, SchedulerPager.class);
final List<ScheduledJob> list = scheduledJobService.getScheduledJobList(pager);
return asJson(new ApiResult.ApiConfigsResponse<EditBody>().settings(list.stream().map(entity -> createEditBody(entity)).collect(Collectors.toList())).total(pager.getAllRecordCount()).status(ApiResult.Status.OK).result());
}
Aggregations