Search in sources :

Example 1 with FileAuthPager

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

the class ApiAdminFileauthAction method settings.

// ===================================================================================
//                                                                      Search Execute
//                                                                      ==============
// GET /api/admin/fileauth/settings
// POST /api/admin/fileauth/settings
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final FileAuthPager pager = copyBeanToNewBean(body, FileAuthPager.class);
    final List<FileAuthentication> list = fileAuthService.getFileAuthenticationList(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 : FileAuthPager(org.codelibs.fess.app.pager.FileAuthPager) ApiResult(org.codelibs.fess.app.web.api.ApiResult) AdminFileauthAction.getFileAuthentication(org.codelibs.fess.app.web.admin.fileauth.AdminFileauthAction.getFileAuthentication) FileAuthentication(org.codelibs.fess.es.config.exentity.FileAuthentication) Execute(org.lastaflute.web.Execute)

Aggregations

FileAuthPager (org.codelibs.fess.app.pager.FileAuthPager)1 AdminFileauthAction.getFileAuthentication (org.codelibs.fess.app.web.admin.fileauth.AdminFileauthAction.getFileAuthentication)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 FileAuthentication (org.codelibs.fess.es.config.exentity.FileAuthentication)1 Execute (org.lastaflute.web.Execute)1