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