use of org.codelibs.fess.app.pager.AccessTokenPager in project fess by codelibs.
the class ApiAdminAccesstokenAction method settings.
// ===================================================================================
// Search Execute
// ==============
// GET /api/admin/accesstoken
// POST /api/admin/accesstoken
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
validateApi(body, messages -> {
});
final AccessTokenPager pager = copyBeanToNewBean(body, AccessTokenPager.class);
final List<AccessToken> list = accessTokenService.getAccessTokenList(pager);
return asJson(new ApiConfigsResponse<EditBody>().settings(list.stream().map(entity -> createEditBody(entity)).collect(Collectors.toList())).total(pager.getAllRecordCount()).status(Status.OK).result());
}
Aggregations