Search in sources :

Example 1 with KuromojiPager

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

the class ApiAdminDictKuromojiAction method get$settings.

// GET /api/admin/dict/kuromoji/settings/{dictId}
@Execute
public JsonResponse<ApiResult> get$settings(final String dictId, final SearchBody body) {
    body.dictId = dictId;
    validateApi(body, messages -> {
    });
    final KuromojiPager pager = copyBeanToNewBean(body, KuromojiPager.class);
    return asJson(new ApiResult.ApiConfigsResponse<EditBody>().settings(kuromojiService.getKuromojiList(body.dictId, pager).stream().map(protwordsItem -> createEditBody(protwordsItem, dictId)).collect(Collectors.toList())).status(ApiResult.Status.OK).result());
}
Also used : FessApiAdminAction(org.codelibs.fess.app.web.api.admin.FessApiAdminAction) Resource(javax.annotation.Resource) JsonResponse(org.lastaflute.web.response.JsonResponse) Collectors(java.util.stream.Collectors) ApiResult(org.codelibs.fess.app.web.api.ApiResult) File(java.io.File) KuromojiItem(org.codelibs.fess.dict.kuromoji.KuromojiItem) StreamResponse(org.lastaflute.web.response.StreamResponse) KuromojiPager(org.codelibs.fess.app.pager.KuromojiPager) CrudMode(org.codelibs.fess.app.web.CrudMode) KuromojiFile(org.codelibs.fess.dict.kuromoji.KuromojiFile) Execute(org.lastaflute.web.Execute) AdminDictKuromojiAction.createKuromojiItem(org.codelibs.fess.app.web.admin.dict.kuromoji.AdminDictKuromojiAction.createKuromojiItem) KuromojiService(org.codelibs.fess.app.service.KuromojiService) InputStream(java.io.InputStream) UploadForm(org.codelibs.fess.app.web.admin.dict.kuromoji.UploadForm) KuromojiPager(org.codelibs.fess.app.pager.KuromojiPager) Execute(org.lastaflute.web.Execute)

Aggregations

File (java.io.File)1 InputStream (java.io.InputStream)1 Collectors (java.util.stream.Collectors)1 Resource (javax.annotation.Resource)1 KuromojiPager (org.codelibs.fess.app.pager.KuromojiPager)1 KuromojiService (org.codelibs.fess.app.service.KuromojiService)1 CrudMode (org.codelibs.fess.app.web.CrudMode)1 AdminDictKuromojiAction.createKuromojiItem (org.codelibs.fess.app.web.admin.dict.kuromoji.AdminDictKuromojiAction.createKuromojiItem)1 UploadForm (org.codelibs.fess.app.web.admin.dict.kuromoji.UploadForm)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 FessApiAdminAction (org.codelibs.fess.app.web.api.admin.FessApiAdminAction)1 KuromojiFile (org.codelibs.fess.dict.kuromoji.KuromojiFile)1 KuromojiItem (org.codelibs.fess.dict.kuromoji.KuromojiItem)1 Execute (org.lastaflute.web.Execute)1 JsonResponse (org.lastaflute.web.response.JsonResponse)1 StreamResponse (org.lastaflute.web.response.StreamResponse)1