Search in sources :

Example 1 with FileConfigPager

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

the class ApiAdminFileconfigAction method settings.

// ===================================================================================
//                                                                      Search Execute
//                                                                      ==============
// GET /api/admin/fileconfig/settings
// POST /api/admin/fileconfig/settings
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final FileConfigPager pager = copyBeanToNewBean(body, FileConfigPager.class);
    final List<FileConfig> list = fileConfigService.getFileConfigList(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 : AdminFileconfigAction.getFileConfig(org.codelibs.fess.app.web.admin.fileconfig.AdminFileconfigAction.getFileConfig) FileConfig(org.codelibs.fess.es.config.exentity.FileConfig) ApiResult(org.codelibs.fess.app.web.api.ApiResult) FileConfigPager(org.codelibs.fess.app.pager.FileConfigPager) Execute(org.lastaflute.web.Execute)

Aggregations

FileConfigPager (org.codelibs.fess.app.pager.FileConfigPager)1 AdminFileconfigAction.getFileConfig (org.codelibs.fess.app.web.admin.fileconfig.AdminFileconfigAction.getFileConfig)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 FileConfig (org.codelibs.fess.es.config.exentity.FileConfig)1 Execute (org.lastaflute.web.Execute)1