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