Search in sources :

Example 1 with DataConfigPager

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

the class ApiAdminDataconfigAction method settings.

// ===================================================================================
//                                                                      Search Execute
//                                                                      ==============
// GET /api/admin/dataconfig/settings
// POST /api/admin/dataconfig/settings
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final DataConfigPager pager = copyBeanToNewBean(body, DataConfigPager.class);
    final List<DataConfig> list = dataConfigService.getDataConfigList(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) DataConfig(org.codelibs.fess.es.config.exentity.DataConfig) AdminDataconfigAction.getDataConfig(org.codelibs.fess.app.web.admin.dataconfig.AdminDataconfigAction.getDataConfig) DataConfigPager(org.codelibs.fess.app.pager.DataConfigPager) Execute(org.lastaflute.web.Execute)

Aggregations

DataConfigPager (org.codelibs.fess.app.pager.DataConfigPager)1 AdminDataconfigAction.getDataConfig (org.codelibs.fess.app.web.admin.dataconfig.AdminDataconfigAction.getDataConfig)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 DataConfig (org.codelibs.fess.es.config.exentity.DataConfig)1 Execute (org.lastaflute.web.Execute)1