Search in sources :

Example 1 with CopyOptions

use of org.codelibs.core.beans.util.CopyOptions in project fess by codelibs.

the class ApiAdminGeneralAction method post$index.

// POST /api/admin/general
@Execute
public JsonResponse<ApiResult> post$index(final EditBody body) {
    validateApi(body, messages -> {
    });
    final EditBody newBody = new EditBody();
    AdminGeneralAction.updateForm(fessConfig, newBody);
    BeanUtil.copyBeanToBean(body, newBody, CopyOptions::excludeNull);
    AdminGeneralAction.updateConfig(fessConfig, newBody);
    return asJson(new ApiResponse().status(Status.OK).result());
}
Also used : CopyOptions(org.codelibs.core.beans.util.CopyOptions) ApiResponse(org.codelibs.fess.app.web.api.ApiResult.ApiResponse) Execute(org.lastaflute.web.Execute)

Aggregations

CopyOptions (org.codelibs.core.beans.util.CopyOptions)1 ApiResponse (org.codelibs.fess.app.web.api.ApiResult.ApiResponse)1 Execute (org.lastaflute.web.Execute)1