use of org.codelibs.fess.app.pager.CrawlingInfoPager in project fess by codelibs.
the class ApiAdminCrawlinginfoAction method logs.
// ===================================================================================
// Search Execute
// ==============
// GET /api/admin/crawlinginfo/logs
// POST /api/admin/crawlinginfo/logs
@Execute
public JsonResponse<ApiResult> logs(final SearchBody body) {
validateApi(body, messages -> {
});
final CrawlingInfoPager pager = copyBeanToNewBean(body, CrawlingInfoPager.class);
final List<CrawlingInfo> list = crawlingInfoService.getCrawlingInfoList(pager);
return asJson(new ApiResult.ApiLogsResponse<EditBody>().logs(list.stream().map(this::createEditBody).collect(Collectors.toList())).total(pager.getAllRecordCount()).status(ApiResult.Status.OK).result());
}
Aggregations