luigidemasi commented on code in PR #26684: URL: https://github.com/apache/camel/pull/26684#discussion_r4069920147
########## components/camel-ai/camel-jev/src/main/java/org/apache/camel/component/jev/JevPredicate.java: ########## @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.jev; + +import java.util.Map; +import java.util.Objects; + +import org.apache.camel.CamelContext; +import org.apache.camel.Exchange; +import org.apache.camel.Expression; +import org.apache.camel.Predicate; +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.util.json.JsonObject; + +/** + * A synchronous Noul predicate. Each invocation submits freshly selected state, preserves the message body and stores + * the complete response in {@link #RESULT}. The supplied state expression must be thread-safe. + */ +public final class JevPredicate implements Predicate { Review Comment: Addressed in [742fcb02c9b6](https://github.com/apache/camel/commit/742fcb02c9b6330b81849baa5c5fad6a45522759). Replaced the public JevPredicate with a component-provided JevLanguage. Expression text is only the question; Java/XML/YAML use the existing generic language form, and Camel Main settings bind through camel.language.jev.* with endpoint/component fallback and per-use Java overrides. Threshold, uncertainty, result preservation, lifecycle, concurrency and cancellation coverage carry over. The metadata assumption needed an explicit tooling change: PackageLanguageMojo previously required a matching core model JSON. Added an opt-in @Language(modelName = "language") and class-level descriptive metadata so Jev reuses LanguageExpression. There is no Jev core model, XSD element, YAML schema key or EIP metadata expansion. Catalog discovery and offline validation have regression coverage. The catalog describes generic DSL options; implementation settings are separate, so downstream configuration generators need corresponding support rather than treating those settings as native expression attributes. Also documented the downstream boundary explicitly: Camel Spring Boot currently generates language configuration from model options, so generating camel.language.jev.* settings needs a separate runtime-configuration metadata/generator follow-up. The default jev:default endpoint can instead inherit the component-level threshold, uncertainty, policy and state properties. I kept that limitation visible rather than putting non-model settings into the generic DSL schema. Validation: 128 component tests on Java 17 and 21, all 73 packaging-plugin tests, YAML routing and catalog validation regressions, and the full 693-module root build with tests skipped. Documentation cross-reference checks pass. _Generated by Codex on behalf of @luigidemasi via /oss-address-review._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
