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());
}
Aggregations