Search in sources :

Example 1 with KeyMatchPager

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());
}
Also used : ApiResult(org.codelibs.fess.app.web.api.ApiResult) KeyMatch(org.codelibs.fess.es.config.exentity.KeyMatch) AdminKeymatchAction.getKeyMatch(org.codelibs.fess.app.web.admin.keymatch.AdminKeymatchAction.getKeyMatch) KeyMatchPager(org.codelibs.fess.app.pager.KeyMatchPager) Execute(org.lastaflute.web.Execute)

Aggregations

KeyMatchPager (org.codelibs.fess.app.pager.KeyMatchPager)1 AdminKeymatchAction.getKeyMatch (org.codelibs.fess.app.web.admin.keymatch.AdminKeymatchAction.getKeyMatch)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 KeyMatch (org.codelibs.fess.es.config.exentity.KeyMatch)1 Execute (org.lastaflute.web.Execute)1