This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 95860a3a49dba6fbdb046a78d91f5ed06cede71a Author: Claus Ibsen <[email protected]> AuthorDate: Fri Nov 27 16:25:55 2026 +0100 CAMEL-23832: camel-stax - improve the component and option descriptions Rewrote the component description (it now says that a StAX reader parses the XML and sends the events to a SAX ContentHandler) and the contentHandlerClass path option (per-message instance from the class, set as the body, or one shared bean with the #beanName syntax). There are no headers. Documentation only, no behavior change. The component JSON, the catalog copy, the doc page header and the DSL are regenerated. camel-stax is marked as done in tasks/component-descriptions.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../org/apache/camel/catalog/components/stax.json | 4 ++-- .../apache/camel/catalog/docs/stax-component.adoc | 2 +- .../org/apache/camel/component/stax/stax.json | 4 ++-- .../camel-stax/src/main/docs/stax-component.adoc | 2 +- .../apache/camel/component/stax/StAXEndpoint.java | 10 +++++----- .../builder/component/ComponentsBuilderFactory.java | 3 ++- .../component/dsl/StaxComponentBuilderFactory.java | 6 ++++-- .../builder/endpoint/StaticEndpointBuilders.java | 18 ++++++++++++++---- .../endpoint/dsl/StAXEndpointBuilderFactory.java | 21 ++++++++++++++++----- tasks/component-descriptions.md | 2 +- 10 files changed, 48 insertions(+), 24 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/stax.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/stax.json index c348e4175b47..6763274a2fe3 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/stax.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/stax.json @@ -3,7 +3,7 @@ "kind": "component", "name": "stax", "title": "StAX", - "description": "Process XML payloads by a SAX ContentHandler.", + "description": "Parse XML payloads with a StAX reader and send the parse events to a SAX ContentHandler.", "deprecated": false, "firstVersion": "2.9.0", "label": "transformation", @@ -32,7 +32,7 @@ "producerOut": { "carriers": [ "pojo" ], "dependsOn": [ "contentHandlerClass" ], "description": "The ContentHandler after the parse: a new instance of contentHandlerClass per message, or the one bean of a #bean reference" } }, "properties": { - "contentHandlerClass": { "index": 0, "kind": "path", "displayName": "Content Handler Class", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The FQN class name for the ContentHandler implementation to use." }, + "contentHandlerClass": { "index": 0, "kind": "path", "displayName": "Content Handler Class", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The fully qualified class name of the org.xml.sax.ContentHandler that receives the parse events. The producer creates a new instance per message with the no-argument constructor and sets it as the message body after the [...] "lazyStartProducer": { "index": 1, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produc [...] } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/stax-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/stax-component.adoc index 100ae3468e78..92d34dc82ce3 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/stax-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/stax-component.adoc @@ -2,7 +2,7 @@ :doctitle: StAX :shortname: stax :artifactid: camel-stax -:description: Process XML payloads by a SAX ContentHandler. +:description: Parse XML payloads with a StAX reader and send the parse events to a SAX ContentHandler. :since: 2.9 :supportlevel: Stable :tabs-sync-option: diff --git a/components/camel-stax/src/generated/resources/META-INF/org/apache/camel/component/stax/stax.json b/components/camel-stax/src/generated/resources/META-INF/org/apache/camel/component/stax/stax.json index c348e4175b47..6763274a2fe3 100644 --- a/components/camel-stax/src/generated/resources/META-INF/org/apache/camel/component/stax/stax.json +++ b/components/camel-stax/src/generated/resources/META-INF/org/apache/camel/component/stax/stax.json @@ -3,7 +3,7 @@ "kind": "component", "name": "stax", "title": "StAX", - "description": "Process XML payloads by a SAX ContentHandler.", + "description": "Parse XML payloads with a StAX reader and send the parse events to a SAX ContentHandler.", "deprecated": false, "firstVersion": "2.9.0", "label": "transformation", @@ -32,7 +32,7 @@ "producerOut": { "carriers": [ "pojo" ], "dependsOn": [ "contentHandlerClass" ], "description": "The ContentHandler after the parse: a new instance of contentHandlerClass per message, or the one bean of a #bean reference" } }, "properties": { - "contentHandlerClass": { "index": 0, "kind": "path", "displayName": "Content Handler Class", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The FQN class name for the ContentHandler implementation to use." }, + "contentHandlerClass": { "index": 0, "kind": "path", "displayName": "Content Handler Class", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The fully qualified class name of the org.xml.sax.ContentHandler that receives the parse events. The producer creates a new instance per message with the no-argument constructor and sets it as the message body after the [...] "lazyStartProducer": { "index": 1, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produc [...] } } diff --git a/components/camel-stax/src/main/docs/stax-component.adoc b/components/camel-stax/src/main/docs/stax-component.adoc index 100ae3468e78..92d34dc82ce3 100644 --- a/components/camel-stax/src/main/docs/stax-component.adoc +++ b/components/camel-stax/src/main/docs/stax-component.adoc @@ -2,7 +2,7 @@ :doctitle: StAX :shortname: stax :artifactid: camel-stax -:description: Process XML payloads by a SAX ContentHandler. +:description: Parse XML payloads with a StAX reader and send the parse events to a SAX ContentHandler. :since: 2.9 :supportlevel: Stable :tabs-sync-option: diff --git a/components/camel-stax/src/main/java/org/apache/camel/component/stax/StAXEndpoint.java b/components/camel-stax/src/main/java/org/apache/camel/component/stax/StAXEndpoint.java index f7619a88b88c..85beadaf318b 100644 --- a/components/camel-stax/src/main/java/org/apache/camel/component/stax/StAXEndpoint.java +++ b/components/camel-stax/src/main/java/org/apache/camel/component/stax/StAXEndpoint.java @@ -31,7 +31,7 @@ import org.apache.camel.support.EndpointHelper; import org.apache.camel.support.ProcessorEndpoint; /** - * Process XML payloads by a SAX ContentHandler. + * Parse XML payloads with a StAX reader and send the parse events to a SAX ContentHandler. */ @UriEndpoint(firstVersion = "2.9.0", scheme = "stax", title = "StAX", syntax = "stax:contentHandlerClass", producerOnly = true, remote = false, category = { Category.TRANSFORMATION }) @@ -44,7 +44,10 @@ import org.apache.camel.support.ProcessorEndpoint; + " per message, or the one bean of a #bean reference")) public class StAXEndpoint extends ProcessorEndpoint { - @UriPath + @UriPath(description = "The fully qualified class name of the org.xml.sax.ContentHandler that receives the parse events." + + " The producer creates a new instance per message with the no-argument constructor and" + + " sets it as the message body after the parse. Use the #beanName syntax to use one" + + " ContentHandler bean from the registry for all messages instead.") @Metadata(required = true) private String contentHandlerClass; @@ -61,9 +64,6 @@ public class StAXEndpoint extends ProcessorEndpoint { return contentHandlerClass; } - /** - * The FQN class name for the ContentHandler implementation to use. - */ public void setContentHandlerClass(String contentHandlerClass) { this.contentHandlerClass = contentHandlerClass; } diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java index 0f0de23c87d8..10b69dd4b220 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java @@ -5098,7 +5098,8 @@ public interface ComponentsBuilderFactory { } /** * StAX (camel-stax) - * Process XML payloads by a SAX ContentHandler. + * Parse XML payloads with a StAX reader and send the parse events to a SAX + * ContentHandler. * * Category: transformation * Since: 2.9 diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/StaxComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/StaxComponentBuilderFactory.java index c4045d354b7c..6e0d6e2a62bd 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/StaxComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/StaxComponentBuilderFactory.java @@ -24,7 +24,8 @@ import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.stax.StAXComponent; /** - * Process XML payloads by a SAX ContentHandler. + * Parse XML payloads with a StAX reader and send the parse events to a SAX + * ContentHandler. * * Generated by camel build tools - do NOT edit this file! */ @@ -33,7 +34,8 @@ public interface StaxComponentBuilderFactory { /** * StAX (camel-stax) - * Process XML payloads by a SAX ContentHandler. + * Parse XML payloads with a StAX reader and send the parse events to a SAX + * ContentHandler. * * Category: transformation * Since: 2.9 diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 02bfc42541b8..ad81178ace3f 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -17371,7 +17371,8 @@ public class StaticEndpointBuilders { } /** * StAX (camel-stax) - * Process XML payloads by a SAX ContentHandler. + * Parse XML payloads with a StAX reader and send the parse events to a SAX + * ContentHandler. * * Category: transformation * Since: 2.9 @@ -17380,7 +17381,11 @@ public class StaticEndpointBuilders { * Syntax: <code>stax:contentHandlerClass</code> * * Path parameter: contentHandlerClass (required) - * The FQN class name for the ContentHandler implementation to use. + * The fully qualified class name of the org.xml.sax.ContentHandler that + * receives the parse events. The producer creates a new instance per + * message with the no-argument constructor and sets it as the message body + * after the parse. Use the #beanName syntax to use one ContentHandler bean + * from the registry for all messages instead. * * @param path contentHandlerClass * @return the dsl builder @@ -17390,7 +17395,8 @@ public class StaticEndpointBuilders { } /** * StAX (camel-stax) - * Process XML payloads by a SAX ContentHandler. + * Parse XML payloads with a StAX reader and send the parse events to a SAX + * ContentHandler. * * Category: transformation * Since: 2.9 @@ -17399,7 +17405,11 @@ public class StaticEndpointBuilders { * Syntax: <code>stax:contentHandlerClass</code> * * Path parameter: contentHandlerClass (required) - * The FQN class name for the ContentHandler implementation to use. + * The fully qualified class name of the org.xml.sax.ContentHandler that + * receives the parse events. The producer creates a new instance per + * message with the no-argument constructor and sets it as the message body + * after the parse. Use the #beanName syntax to use one ContentHandler bean + * from the registry for all messages instead. * * @param componentName to use a custom component name for the endpoint * instead of the default name diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StAXEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StAXEndpointBuilderFactory.java index cf766cec24ae..b99096b5c0ab 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StAXEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StAXEndpointBuilderFactory.java @@ -27,7 +27,8 @@ import org.apache.camel.builder.EndpointProducerBuilder; import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; /** - * Process XML payloads by a SAX ContentHandler. + * Parse XML payloads with a StAX reader and send the parse events to a SAX + * ContentHandler. * * Generated by camel build tools - do NOT edit this file! */ @@ -107,7 +108,8 @@ public interface StAXEndpointBuilderFactory { public interface StAXBuilders { /** * StAX (camel-stax) - * Process XML payloads by a SAX ContentHandler. + * Parse XML payloads with a StAX reader and send the parse events to a + * SAX ContentHandler. * * Category: transformation * Since: 2.9 @@ -116,7 +118,11 @@ public interface StAXEndpointBuilderFactory { * Syntax: <code>stax:contentHandlerClass</code> * * Path parameter: contentHandlerClass (required) - * The FQN class name for the ContentHandler implementation to use. + * The fully qualified class name of the org.xml.sax.ContentHandler that + * receives the parse events. The producer creates a new instance per + * message with the no-argument constructor and sets it as the message + * body after the parse. Use the #beanName syntax to use one + * ContentHandler bean from the registry for all messages instead. * * @param path contentHandlerClass * @return the dsl builder @@ -126,7 +132,8 @@ public interface StAXEndpointBuilderFactory { } /** * StAX (camel-stax) - * Process XML payloads by a SAX ContentHandler. + * Parse XML payloads with a StAX reader and send the parse events to a + * SAX ContentHandler. * * Category: transformation * Since: 2.9 @@ -135,7 +142,11 @@ public interface StAXEndpointBuilderFactory { * Syntax: <code>stax:contentHandlerClass</code> * * Path parameter: contentHandlerClass (required) - * The FQN class name for the ContentHandler implementation to use. + * The fully qualified class name of the org.xml.sax.ContentHandler that + * receives the parse events. The producer creates a new instance per + * message with the no-argument constructor and sets it as the message + * body after the parse. Use the #beanName syntax to use one + * ContentHandler bean from the registry for all messages instead. * * @param componentName to use a custom component name for the endpoint * instead of the default name diff --git a/tasks/component-descriptions.md b/tasks/component-descriptions.md index cbecf77c9151..dd6de41087ba 100644 --- a/tasks/component-descriptions.md +++ b/tasks/component-descriptions.md @@ -357,7 +357,7 @@ or removes its row. | camel-sql | sql, sql-stored | | | camel-ssh | ssh | | | camel-state-store | state-store | | -| camel-stax | stax | | +| camel-stax | stax | yes | | camel-stitch | stitch | | | camel-stream | stream | yes | | camel-stringtemplate | string-template | |
