Search in sources :

Example 1 with ElevateWordPager

use of org.codelibs.fess.app.pager.ElevateWordPager in project fess by codelibs.

the class ApiAdminElevatewordAction method settings.

// GET /api/admin/elevateword
// POST /api/admin/elevateword
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final ElevateWordPager pager = copyBeanToNewBean(body, ElevateWordPager.class);
    final List<ElevateWord> list = elevateWordService.getElevateWordList(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) AdminElevatewordAction.getElevateWord(org.codelibs.fess.app.web.admin.elevateword.AdminElevatewordAction.getElevateWord) ElevateWord(org.codelibs.fess.es.config.exentity.ElevateWord) ElevateWordPager(org.codelibs.fess.app.pager.ElevateWordPager) Execute(org.lastaflute.web.Execute)

Aggregations

ElevateWordPager (org.codelibs.fess.app.pager.ElevateWordPager)1 AdminElevatewordAction.getElevateWord (org.codelibs.fess.app.web.admin.elevateword.AdminElevatewordAction.getElevateWord)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 ElevateWord (org.codelibs.fess.es.config.exentity.ElevateWord)1 Execute (org.lastaflute.web.Execute)1