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());
}
Aggregations