Search in sources :

Example 1 with LabelTypePager

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());
}
Also used : ApiResult(org.codelibs.fess.app.web.api.ApiResult) AdminLabeltypeAction.getLabelType(org.codelibs.fess.app.web.admin.labeltype.AdminLabeltypeAction.getLabelType) LabelType(org.codelibs.fess.es.config.exentity.LabelType) LabelTypePager(org.codelibs.fess.app.pager.LabelTypePager) Execute(org.lastaflute.web.Execute)

Aggregations

LabelTypePager (org.codelibs.fess.app.pager.LabelTypePager)1 AdminLabeltypeAction.getLabelType (org.codelibs.fess.app.web.admin.labeltype.AdminLabeltypeAction.getLabelType)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 LabelType (org.codelibs.fess.es.config.exentity.LabelType)1 Execute (org.lastaflute.web.Execute)1