use of org.codelibs.fess.app.pager.RolePager in project fess by codelibs.
the class ApiAdminRoleAction method settings.
// GET /api/admin/role/settings
// POST /api/admin/role/settings
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
validateApi(body, messages -> {
});
final RolePager pager = copyBeanToNewBean(body, RolePager.class);
final List<Role> list = roleService.getRoleList(pager);
return asJson(new ApiResult.ApiConfigsResponse<EditBody>().settings(list.stream().map(this::createEditBody).collect(Collectors.toList())).total(pager.getAllRecordCount()).status(ApiResult.Status.OK).result());
}
Aggregations