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());
}
Aggregations