use of org.codelibs.fess.app.pager.KeyMatchPager in project fess by codelibs.
the class ApiAdminKeymatchAction method settings.
// ===================================================================================
// Search Execute
// ==============
// GET /api/admin/keymatch/settings
// POST /api/admin/keymatch/settings
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
validateApi(body, messages -> {
});
final KeyMatchPager pager = copyBeanToNewBean(body, KeyMatchPager.class);
final List<KeyMatch> list = keyMatchService.getKeyMatchList(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());
}
Aggregations