Search in sources :

Example 1 with UserPager

use of org.codelibs.fess.app.pager.UserPager in project fess by codelibs.

the class ApiAdminUserAction method settings.

// GET /api/admin/user
// POST /api/admin/user
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final UserPager pager = copyBeanToNewBean(body, UserPager.class);
    final List<User> list = userService.getUserList(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());
}
Also used : AdminUserAction.getUser(org.codelibs.fess.app.web.admin.user.AdminUserAction.getUser) User(org.codelibs.fess.es.user.exentity.User) ApiResult(org.codelibs.fess.app.web.api.ApiResult) UserPager(org.codelibs.fess.app.pager.UserPager) Execute(org.lastaflute.web.Execute)

Aggregations

UserPager (org.codelibs.fess.app.pager.UserPager)1 AdminUserAction.getUser (org.codelibs.fess.app.web.admin.user.AdminUserAction.getUser)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 User (org.codelibs.fess.es.user.exentity.User)1 Execute (org.lastaflute.web.Execute)1