Search in sources :

Example 1 with JobLogPager

use of org.codelibs.fess.app.pager.JobLogPager in project fess by codelibs.

the class ApiAdminJoblogAction method logs.

// ===================================================================================
//                                                                      Search Execute
//                                                                      ==============
// GET /api/admin/joblog/logs
@Execute
public JsonResponse<ApiResult> logs(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final JobLogPager pager = copyBeanToNewBean(body, JobLogPager.class);
    final List<JobLog> list = jobLogService.getJobLogList(pager);
    return asJson(new ApiResult.ApiLogsResponse<EditBody>().logs(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) JobLogPager(org.codelibs.fess.app.pager.JobLogPager) JobLog(org.codelibs.fess.es.config.exentity.JobLog) Execute(org.lastaflute.web.Execute)

Aggregations

JobLogPager (org.codelibs.fess.app.pager.JobLogPager)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 JobLog (org.codelibs.fess.es.config.exentity.JobLog)1 Execute (org.lastaflute.web.Execute)1