Search in sources :

Example 1 with WebAuthPager

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

the class ApiAdminWebauthAction method settings.

// ===================================================================================
//                                                                      Search Execute
//                                                                      ==============
// GET /api/admin/webauth/settings
// POST /api/admin/webauth/settings
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final WebAuthPager pager = copyBeanToNewBean(body, WebAuthPager.class);
    final List<WebAuthentication> list = webAuthService.getWebAuthenticationList(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 : ApiResult(org.codelibs.fess.app.web.api.ApiResult) WebAuthPager(org.codelibs.fess.app.pager.WebAuthPager) WebAuthentication(org.codelibs.fess.es.config.exentity.WebAuthentication) AdminWebauthAction.getWebAuthentication(org.codelibs.fess.app.web.admin.webauth.AdminWebauthAction.getWebAuthentication) Execute(org.lastaflute.web.Execute)

Aggregations

WebAuthPager (org.codelibs.fess.app.pager.WebAuthPager)1 AdminWebauthAction.getWebAuthentication (org.codelibs.fess.app.web.admin.webauth.AdminWebauthAction.getWebAuthentication)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 WebAuthentication (org.codelibs.fess.es.config.exentity.WebAuthentication)1 Execute (org.lastaflute.web.Execute)1