Search in sources :

Example 1 with SynonymPager

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

the class ApiAdminDictSynonymAction method get$settings.

// GET /api/admin/dict/synonym/settings/{dictId}
@Execute
public JsonResponse<ApiResult> get$settings(final String dictId, final SearchBody body) {
    body.dictId = dictId;
    validateApi(body, messages -> {
    });
    final SynonymPager pager = copyBeanToNewBean(body, SynonymPager.class);
    return asJson(new ApiResult.ApiConfigsResponse<EditBody>().settings(synonymService.getSynonymList(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) SynonymItem(org.codelibs.fess.dict.synonym.SynonymItem) IOException(java.io.IOException) JsonResponse(org.lastaflute.web.response.JsonResponse) SynonymFile(org.codelibs.fess.dict.synonym.SynonymFile) AdminDictSynonymAction.createSynonymItem(org.codelibs.fess.app.web.admin.dict.synonym.AdminDictSynonymAction.createSynonymItem) Collectors(java.util.stream.Collectors) ApiResult(org.codelibs.fess.app.web.api.ApiResult) File(java.io.File) UploadForm(org.codelibs.fess.app.web.admin.dict.synonym.UploadForm) SynonymPager(org.codelibs.fess.app.pager.SynonymPager) StreamResponse(org.lastaflute.web.response.StreamResponse) CrudMode(org.codelibs.fess.app.web.CrudMode) Execute(org.lastaflute.web.Execute) SynonymService(org.codelibs.fess.app.service.SynonymService) InputStream(java.io.InputStream) SynonymPager(org.codelibs.fess.app.pager.SynonymPager) Execute(org.lastaflute.web.Execute)

Aggregations

File (java.io.File)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Collectors (java.util.stream.Collectors)1 Resource (javax.annotation.Resource)1 SynonymPager (org.codelibs.fess.app.pager.SynonymPager)1 SynonymService (org.codelibs.fess.app.service.SynonymService)1 CrudMode (org.codelibs.fess.app.web.CrudMode)1 AdminDictSynonymAction.createSynonymItem (org.codelibs.fess.app.web.admin.dict.synonym.AdminDictSynonymAction.createSynonymItem)1 UploadForm (org.codelibs.fess.app.web.admin.dict.synonym.UploadForm)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 FessApiAdminAction (org.codelibs.fess.app.web.api.admin.FessApiAdminAction)1 SynonymFile (org.codelibs.fess.dict.synonym.SynonymFile)1 SynonymItem (org.codelibs.fess.dict.synonym.SynonymItem)1 Execute (org.lastaflute.web.Execute)1 JsonResponse (org.lastaflute.web.response.JsonResponse)1 StreamResponse (org.lastaflute.web.response.StreamResponse)1