use of org.codelibs.fess.app.pager.LabelTypePager in project fess by codelibs.
the class ApiAdminLabeltypeAction method settings.
// ===================================================================================
// Search Execute
// ==============
// GET /api/admin/labeltype/settings
// POST /api/admin/labeltype/settings
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
validateApi(body, messages -> {
});
final LabelTypePager pager = copyBeanToNewBean(body, LabelTypePager.class);
final List<LabelType> list = labelTypeService.getLabelTypeList(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