Search in sources :

Example 1 with DuplicateHostPager

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

the class ApiAdminDuplicatehostAction method settings.

// ===================================================================================
//                                                                      Search Execute
//                                                                      ==============
// GET /api/admin/duplicatehost/settings
// POST /api/admin/duplicatehost/settings
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final DuplicateHostPager pager = copyBeanToNewBean(body, DuplicateHostPager.class);
    final List<DuplicateHost> list = duplicateHostService.getDuplicateHostList(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) DuplicateHostPager(org.codelibs.fess.app.pager.DuplicateHostPager) AdminDuplicatehostAction.getDuplicateHost(org.codelibs.fess.app.web.admin.duplicatehost.AdminDuplicatehostAction.getDuplicateHost) DuplicateHost(org.codelibs.fess.es.config.exentity.DuplicateHost) Execute(org.lastaflute.web.Execute)

Aggregations

DuplicateHostPager (org.codelibs.fess.app.pager.DuplicateHostPager)1 AdminDuplicatehostAction.getDuplicateHost (org.codelibs.fess.app.web.admin.duplicatehost.AdminDuplicatehostAction.getDuplicateHost)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 DuplicateHost (org.codelibs.fess.es.config.exentity.DuplicateHost)1 Execute (org.lastaflute.web.Execute)1