Search in sources :

Example 1 with AccessTokenPager

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());
}
Also used : AdminAccesstokenAction.getAccessToken(org.codelibs.fess.app.web.admin.accesstoken.AdminAccesstokenAction.getAccessToken) AccessToken(org.codelibs.fess.es.config.exentity.AccessToken) AccessTokenPager(org.codelibs.fess.app.pager.AccessTokenPager) Execute(org.lastaflute.web.Execute)

Aggregations

AccessTokenPager (org.codelibs.fess.app.pager.AccessTokenPager)1 AdminAccesstokenAction.getAccessToken (org.codelibs.fess.app.web.admin.accesstoken.AdminAccesstokenAction.getAccessToken)1 AccessToken (org.codelibs.fess.es.config.exentity.AccessToken)1 Execute (org.lastaflute.web.Execute)1