use of org.codelibs.fess.app.pager.BadWordPager in project fess by codelibs.
the class ApiAdminBadwordAction method settings.
// GET /api/admin/badword
// POST /api/admin/badword
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
validateApi(body, messages -> {
});
final BadWordPager pager = copyBeanToNewBean(body, BadWordPager.class);
final List<BadWord> list = badWordService.getBadWordList(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