Search in sources :

Example 1 with SchedulerPager

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());
}
Also used : ApiResult(org.codelibs.fess.app.web.api.ApiResult) AdminSchedulerAction.getScheduledJob(org.codelibs.fess.app.web.admin.scheduler.AdminSchedulerAction.getScheduledJob) ScheduledJob(org.codelibs.fess.es.config.exentity.ScheduledJob) SchedulerPager(org.codelibs.fess.app.pager.SchedulerPager) Execute(org.lastaflute.web.Execute)

Aggregations

SchedulerPager (org.codelibs.fess.app.pager.SchedulerPager)1 AdminSchedulerAction.getScheduledJob (org.codelibs.fess.app.web.admin.scheduler.AdminSchedulerAction.getScheduledJob)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 ScheduledJob (org.codelibs.fess.es.config.exentity.ScheduledJob)1 Execute (org.lastaflute.web.Execute)1