Search in sources :

Example 1 with RolePager

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());
}
Also used : RolePager(org.codelibs.fess.app.pager.RolePager) Role(org.codelibs.fess.es.user.exentity.Role) AdminRoleAction.getRole(org.codelibs.fess.app.web.admin.role.AdminRoleAction.getRole) ApiResult(org.codelibs.fess.app.web.api.ApiResult) Execute(org.lastaflute.web.Execute)

Aggregations

RolePager (org.codelibs.fess.app.pager.RolePager)1 AdminRoleAction.getRole (org.codelibs.fess.app.web.admin.role.AdminRoleAction.getRole)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 Role (org.codelibs.fess.es.user.exentity.Role)1 Execute (org.lastaflute.web.Execute)1