Search in sources :

Example 1 with WebConfigPager

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

the class ApiAdminWebconfigAction method settings.

// ===================================================================================
//                                                                      Search Execute
//                                                                      ==============
// GET /api/admin/webconfig/settings
// POST /api/admin/webconfig/settings
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final WebConfigPager pager = copyBeanToNewBean(body, WebConfigPager.class);
    final List<WebConfig> list = webConfigService.getWebConfigList(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) WebConfigPager(org.codelibs.fess.app.pager.WebConfigPager) AdminWebconfigAction.getWebConfig(org.codelibs.fess.app.web.admin.webconfig.AdminWebconfigAction.getWebConfig) WebConfig(org.codelibs.fess.es.config.exentity.WebConfig) Execute(org.lastaflute.web.Execute)

Aggregations

WebConfigPager (org.codelibs.fess.app.pager.WebConfigPager)1 AdminWebconfigAction.getWebConfig (org.codelibs.fess.app.web.admin.webconfig.AdminWebconfigAction.getWebConfig)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 WebConfig (org.codelibs.fess.es.config.exentity.WebConfig)1 Execute (org.lastaflute.web.Execute)1