Search in sources :

Example 1 with PathMapPager

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

the class ApiAdminPathmapAction method settings.

// GET /api/admin/pathmap
// POST /api/admin/pathmap
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final PathMapPager pager = copyBeanToNewBean(body, PathMapPager.class);
    final List<PathMapping> list = pathMappingService.getPathMappingList(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) PathMapping(org.codelibs.fess.es.config.exentity.PathMapping) AdminPathmapAction.getPathMapping(org.codelibs.fess.app.web.admin.pathmap.AdminPathmapAction.getPathMapping) PathMapPager(org.codelibs.fess.app.pager.PathMapPager) Execute(org.lastaflute.web.Execute)

Aggregations

PathMapPager (org.codelibs.fess.app.pager.PathMapPager)1 AdminPathmapAction.getPathMapping (org.codelibs.fess.app.web.admin.pathmap.AdminPathmapAction.getPathMapping)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 PathMapping (org.codelibs.fess.es.config.exentity.PathMapping)1 Execute (org.lastaflute.web.Execute)1