Search in sources :

Example 1 with BadWordPager

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());
}
Also used : ApiResult(org.codelibs.fess.app.web.api.ApiResult) BadWord(org.codelibs.fess.es.config.exentity.BadWord) AdminBadwordAction.getBadWord(org.codelibs.fess.app.web.admin.badword.AdminBadwordAction.getBadWord) BadWordPager(org.codelibs.fess.app.pager.BadWordPager) Execute(org.lastaflute.web.Execute)

Aggregations

BadWordPager (org.codelibs.fess.app.pager.BadWordPager)1 AdminBadwordAction.getBadWord (org.codelibs.fess.app.web.admin.badword.AdminBadwordAction.getBadWord)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 BadWord (org.codelibs.fess.es.config.exentity.BadWord)1 Execute (org.lastaflute.web.Execute)1