Search in sources :

Example 1 with ProtwordsPager

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

the class ApiAdminDictProtwordsAction method get$settings.

// GET /api/admin/dict/protwords/settings/{dictId}
@Execute
public JsonResponse<ApiResult> get$settings(final String dictId, final SearchBody body) {
    body.dictId = dictId;
    validateApi(body, messages -> {
    });
    final ProtwordsPager pager = copyBeanToNewBean(body, ProtwordsPager.class);
    return asJson(new ApiResult.ApiConfigsResponse<EditBody>().settings(protwordsService.getProtwordsList(body.dictId, pager).stream().map(protwordsItem -> createEditBody(protwordsItem, dictId)).collect(Collectors.toList())).status(ApiResult.Status.OK).result());
}
Also used : AdminDictProtwordsAction.createProtwordsItem(org.codelibs.fess.app.web.admin.dict.protwords.AdminDictProtwordsAction.createProtwordsItem) FessApiAdminAction(org.codelibs.fess.app.web.api.admin.FessApiAdminAction) ProtwordsPager(org.codelibs.fess.app.pager.ProtwordsPager) Resource(javax.annotation.Resource) IOException(java.io.IOException) UploadForm(org.codelibs.fess.app.web.admin.dict.protwords.UploadForm) JsonResponse(org.lastaflute.web.response.JsonResponse) Collectors(java.util.stream.Collectors) ApiResult(org.codelibs.fess.app.web.api.ApiResult) File(java.io.File) StreamResponse(org.lastaflute.web.response.StreamResponse) CrudMode(org.codelibs.fess.app.web.CrudMode) ProtwordsItem(org.codelibs.fess.dict.protwords.ProtwordsItem) ProtwordsService(org.codelibs.fess.app.service.ProtwordsService) Execute(org.lastaflute.web.Execute) ProtwordsFile(org.codelibs.fess.dict.protwords.ProtwordsFile) InputStream(java.io.InputStream) ProtwordsPager(org.codelibs.fess.app.pager.ProtwordsPager) 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 ProtwordsPager (org.codelibs.fess.app.pager.ProtwordsPager)1 ProtwordsService (org.codelibs.fess.app.service.ProtwordsService)1 CrudMode (org.codelibs.fess.app.web.CrudMode)1 AdminDictProtwordsAction.createProtwordsItem (org.codelibs.fess.app.web.admin.dict.protwords.AdminDictProtwordsAction.createProtwordsItem)1 UploadForm (org.codelibs.fess.app.web.admin.dict.protwords.UploadForm)1 ApiResult (org.codelibs.fess.app.web.api.ApiResult)1 FessApiAdminAction (org.codelibs.fess.app.web.api.admin.FessApiAdminAction)1 ProtwordsFile (org.codelibs.fess.dict.protwords.ProtwordsFile)1 ProtwordsItem (org.codelibs.fess.dict.protwords.ProtwordsItem)1 Execute (org.lastaflute.web.Execute)1 JsonResponse (org.lastaflute.web.response.JsonResponse)1 StreamResponse (org.lastaflute.web.response.StreamResponse)1