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