Search in sources :

Example 1 with RelatedQueryPager

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());
}
Also used : ApiResult(org.codelibs.fess.app.web.api.ApiResult) AdminRelatedqueryAction.getRelatedQuery(org.codelibs.fess.app.web.admin.relatedquery.AdminRelatedqueryAction.getRelatedQuery) RelatedQuery(org.codelibs.fess.es.config.exentity.RelatedQuery) RelatedQueryPager(org.codelibs.fess.app.pager.RelatedQueryPager) Execute(org.lastaflute.web.Execute)

Aggregations

RelatedQueryPager (org.codelibs.fess.app.pager.RelatedQueryPager)1 AdminRelatedqueryAction.getRelatedQuery (org.codelibs.fess.app.web.admin.relatedquery.AdminRelatedqueryAction.getRelatedQuery)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 RelatedQuery (org.codelibs.fess.es.config.exentity.RelatedQuery)1 Execute (org.lastaflute.web.Execute)1