Search in sources :

Example 1 with GroupPager

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

the class ApiAdminGroupAction method settings.

// GET /api/admin/group
// POST /api/admin/group
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final GroupPager pager = copyBeanToNewBean(body, GroupPager.class);
    final List<Group> list = groupService.getGroupList(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 : AdminGroupAction.getGroup(org.codelibs.fess.app.web.admin.group.AdminGroupAction.getGroup) Group(org.codelibs.fess.es.user.exentity.Group) GroupPager(org.codelibs.fess.app.pager.GroupPager) ApiResult(org.codelibs.fess.app.web.api.ApiResult) Execute(org.lastaflute.web.Execute)

Aggregations

GroupPager (org.codelibs.fess.app.pager.GroupPager)1 AdminGroupAction.getGroup (org.codelibs.fess.app.web.admin.group.AdminGroupAction.getGroup)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 Group (org.codelibs.fess.es.user.exentity.Group)1 Execute (org.lastaflute.web.Execute)1