Search in sources :

Example 1 with CrawlingInfoPager

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());
}
Also used : CrawlingInfoPager(org.codelibs.fess.app.pager.CrawlingInfoPager) CrawlingInfo(org.codelibs.fess.es.config.exentity.CrawlingInfo) ApiResult(org.codelibs.fess.app.web.api.ApiResult) Execute(org.lastaflute.web.Execute)

Aggregations

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