This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit f82f6705a7731efc03cd100a7b6f68bafebcda15 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu May 28 06:05:48 2020 +0200 Regen --- .../builder/component/dsl/JsltComponentBuilderFactory.java | 14 ++++++++++++++ docs/components/modules/ROOT/pages/jslt-component.adoc | 3 ++- docs/components/modules/ROOT/pages/xj-component.adoc | 9 ++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JsltComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JsltComponentBuilderFactory.java index 68a28c3..bbde1a4 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JsltComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JsltComponentBuilderFactory.java @@ -110,6 +110,19 @@ public interface JsltComponentBuilderFactory { doSetProperty("functions", functions); return this; } + /** + * JSLT can be extended by plugging in a custom jslt object filter. + * + * The option is a: + * <code>com.schibsted.spt.data.jslt.filters.JsonFilter</code> type. + * + * Group: advanced + */ + default JsltComponentBuilder objectFilter( + com.schibsted.spt.data.jslt.filters.JsonFilter objectFilter) { + doSetProperty("objectFilter", objectFilter); + return this; + } } class JsltComponentBuilderImpl @@ -131,6 +144,7 @@ public interface JsltComponentBuilderFactory { case "lazyStartProducer": ((JsltComponent) component).setLazyStartProducer((boolean) value); return true; case "basicPropertyBinding": ((JsltComponent) component).setBasicPropertyBinding((boolean) value); return true; case "functions": ((JsltComponent) component).setFunctions((java.util.Collection) value); return true; + case "objectFilter": ((JsltComponent) component).setObjectFilter((com.schibsted.spt.data.jslt.filters.JsonFilter) value); return true; default: return false; } } diff --git a/docs/components/modules/ROOT/pages/jslt-component.adoc b/docs/components/modules/ROOT/pages/jslt-component.adoc index 7e2ec3a..84752d0 100644 --- a/docs/components/modules/ROOT/pages/jslt-component.adoc +++ b/docs/components/modules/ROOT/pages/jslt-component.adoc @@ -52,7 +52,7 @@ format, `?option=value&option=value&...` // component options: START -The JSLT component supports 4 options, which are listed below. +The JSLT component supports 5 options, which are listed below. @@ -63,6 +63,7 @@ The JSLT component supports 4 options, which are listed below. | *lazyStartProducer* (producer) | 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 producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean | *functions* (advanced) | JSLT can be extended by plugging in functions written in Java. | | Collection +| *objectFilter* (advanced) | JSLT can be extended by plugging in a custom jslt object filter | | JsonFilter |=== // component options: END diff --git a/docs/components/modules/ROOT/pages/xj-component.adoc b/docs/components/modules/ROOT/pages/xj-component.adoc index 30db20e..4674357 100644 --- a/docs/components/modules/ROOT/pages/xj-component.adoc +++ b/docs/components/modules/ROOT/pages/xj-component.adoc @@ -33,7 +33,7 @@ for this component: == URI format ---- -xj:[templateName]?transformDirection=XML2JSON|JSON2XML[&options] +xj:templateName?transformDirection=XML2JSON|JSON2XML[&options] ---- [TIP] @@ -46,8 +46,7 @@ component as well. At least look at the XSLT component documentation how to conf The *transformDirection* option is mandatory and must be either XML2JSON or JSON2XML. -In contrary to the xslt component, the *templateName* parameter is optional. If not specified a so called -"identity transform" will be performed. +The *templateName* parameter allows to use _identify transforma_ by specifying the name `identity`. == Component options @@ -131,7 +130,7 @@ In case of XJ it means it transforms the json document to an equivalent xml repr [source,java] ---- from("direct:start"). - to("xj:?transformDirection=JSON2XML"); + to("xj:identity?transformDirection=JSON2XML"); ---- Sample: @@ -249,7 +248,7 @@ Based on the explanations above an "identity" transform will be performed when n [source,java] ---- from("direct:start"). - to("xj:?transformDirection=XML2JSON"); + to("xj:identity?transformDirection=XML2JSON"); ---- Given the sample input