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