Search in sources :

Example 1 with ReqHeaderPager

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

the class ApiAdminReqheaderAction method settings.

// ===================================================================================
// Search Execute
// ==============
// GET /api/admin/reqheader/settings
// POST /api/admin/reqheader/settings
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final ReqHeaderPager pager = copyBeanToNewBean(body, ReqHeaderPager.class);
    final List<RequestHeader> list = reqHeaderService.getRequestHeaderList(pager);
    return asJson(new ApiResult.ApiConfigsResponse<EditBody>().settings(list.stream().map(this::createEditBody).collect(Collectors.toList())).total(pager.getAllRecordCount()).status(ApiResult.Status.OK).result());
}
Also used : ReqHeaderPager(org.codelibs.fess.app.pager.ReqHeaderPager) ApiResult(org.codelibs.fess.app.web.api.ApiResult) AdminReqheaderAction.getRequestHeader(org.codelibs.fess.app.web.admin.reqheader.AdminReqheaderAction.getRequestHeader) RequestHeader(org.codelibs.fess.es.config.exentity.RequestHeader) Execute(org.lastaflute.web.Execute)

Aggregations

ReqHeaderPager (org.codelibs.fess.app.pager.ReqHeaderPager)1 AdminReqheaderAction.getRequestHeader (org.codelibs.fess.app.web.admin.reqheader.AdminReqheaderAction.getRequestHeader)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 RequestHeader (org.codelibs.fess.es.config.exentity.RequestHeader)1 Execute (org.lastaflute.web.Execute)1