This is an automated email from the ASF dual-hosted git repository. zhfeng pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new a5b6762b998 camel-fury: Improve to allow auto discovery Fury from the registry (#16214) a5b6762b998 is described below commit a5b6762b998cb9922e6035bd6665ebf1b62a769d Author: Zheng Feng <zh.f...@gmail.com> AuthorDate: Tue Nov 12 14:29:31 2024 +0800 camel-fury: Improve to allow auto discovery Fury from the registry (#16214) * replace to use BaseFury * add an option with allowAutoWiredFury * add FuryDataFormatReifier --- .../org/apache/camel/catalog/dataformats/fury.json | 5 +- .../apache/camel/catalog/models/dataFormats.json | 2 +- .../org/apache/camel/catalog/models/fury.json | 5 +- .../org/apache/camel/catalog/models/marshal.json | 2 +- .../org/apache/camel/catalog/models/unmarshal.json | 2 +- .../apache/camel/catalog/schemas/camel-spring.xsd | 63 ++++++++++++----- .../component/fury/FuryDataFormatConfigurer.java | 6 ++ .../org/apache/camel/component/fury/fury.json | 5 +- .../camel/component/fury/FuryDataFormat.java | 59 +++++++++++++--- .../org/apache/camel/component/fury/FuryTest.java | 7 +- .../apache/camel/model/dataformat/dataFormats.json | 2 +- .../org/apache/camel/model/dataformat/fury.json | 5 +- .../META-INF/org/apache/camel/model/marshal.json | 2 +- .../META-INF/org/apache/camel/model/unmarshal.json | 2 +- .../camel/builder/DataFormatBuilderFactory.java | 8 +++ .../org/apache/camel/model/MarshalDefinition.java | 2 + .../apache/camel/model/UnmarshalDefinition.java | 2 + .../model/dataformat/DataFormatsDefinition.java | 1 + .../camel/model/dataformat/FuryDataFormat.java | 80 +++++++++++++++++++--- .../DataFormatTransformerDefinition.java | 2 + .../reifier/dataformat/DataFormatReifier.java | 3 + .../reifier/dataformat/FuryDataFormatReifier.java | 37 ++++++++++ .../java/org/apache/camel/xml/in/ModelParser.java | 3 + .../java/org/apache/camel/xml/out/ModelWriter.java | 7 ++ .../org/apache/camel/yaml/out/ModelWriter.java | 7 ++ .../dsl/yaml/deserializers/ModelDeserializers.java | 47 +++++++++++++ .../generated/resources/schema/camelYamlDsl.json | 51 ++++++++++++++ 27 files changed, 369 insertions(+), 48 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fury.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fury.json index 6f4c41b0b83..d9aadb3f770 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fury.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fury.json @@ -17,6 +17,9 @@ }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, - "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class of the java type to use when unmarshalling" } + "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class of the java type to use when unmarshalling" }, + "requireClassRegistration": { "index": 2, "kind": "attribute", "displayName": "Require Class Registration", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to require register classes" }, + "threadSafe": { "index": 3, "kind": "attribute", "displayName": "Thread Safe", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to use the threadsafe fury" }, + "allowAutoWiredFury": { "index": 4, "kind": "attribute", "displayName": "Allow Auto Wired Fury", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to auto-discover Fury from the registry" } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormats.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormats.json index ea2b0bb8013..2428196ae02 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormats.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormats.json @@ -12,6 +12,6 @@ "output": false }, "properties": { - "dataFormats": { "index": 0, "kind": "element", "displayName": "Data Formats", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.DataFormatDefinition>", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf", "rss" [...] + "dataFormats": { "index": 0, "kind": "element", "displayName": "Data Formats", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.DataFormatDefinition>", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "fury", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf [...] } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fury.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fury.json index fdf3e5c1679..baa3c232da9 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fury.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fury.json @@ -14,6 +14,9 @@ }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, - "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class of the java type to use when unmarshalling" } + "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class of the java type to use when unmarshalling" }, + "requireClassRegistration": { "index": 2, "kind": "attribute", "displayName": "Require Class Registration", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to require register classes" }, + "threadSafe": { "index": 3, "kind": "attribute", "displayName": "Thread Safe", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to use the threadsafe fury" }, + "allowAutoWiredFury": { "index": 4, "kind": "attribute", "displayName": "Allow Auto Wired Fury", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to auto-discover Fury from the registry" } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/marshal.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/marshal.json index ecc749299c3..f788c6c0cc2 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/marshal.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/marshal.json @@ -15,7 +15,7 @@ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" }, "disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data Format Type", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf", "rss", "smook [...] + "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data Format Type", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "fury", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf", "rss" [...] "variableSend": { "index": 4, "kind": "attribute", "displayName": "Variable Send", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable as the source for the message body to send. This makes it handy to use variables for user data and to easily control what data to use for sending and receiving. Important: When using send variable then the message body is tak [...] "variableReceive": { "index": 5, "kind": "attribute", "displayName": "Variable Receive", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable to store the received message body (only body, not headers). This makes it handy to use variables for user data and to easily control what data to use for sending and receiving. Important: When using receive variable th [...] } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/unmarshal.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/unmarshal.json index fa3b561f0ea..fda77b17849 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/unmarshal.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/unmarshal.json @@ -15,7 +15,7 @@ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" }, "disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data Format Type", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf", "rss", "smook [...] + "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data Format Type", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "fury", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf", "rss" [...] "variableSend": { "index": 4, "kind": "attribute", "displayName": "Variable Send", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable as the source for the message body to send. This makes it handy to use variables for user data and to easily control what data to use for sending and receiving. Important: When using send variable then the message body is tak [...] "variableReceive": { "index": 5, "kind": "attribute", "displayName": "Variable Receive", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable to store the received message body (only body, not headers). This makes it handy to use variables for user data and to easily control what data to use for sending and receiving. Important: When using receive variable th [...] "allowNullBody": { "index": 6, "kind": "attribute", "displayName": "Allow Null Body", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Indicates whether null is allowed as value of a body to unmarshall." } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd index 91b9d197ed5..fb5ec4bf5a2 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd @@ -7415,6 +7415,7 @@ down. Default value: false <xs:element ref="tns:fhirJson"/> <xs:element ref="tns:fhirXml"/> <xs:element ref="tns:flatpack"/> + <xs:element ref="tns:fury"/> <xs:element ref="tns:grok"/> <xs:element ref="tns:gzipDeflater"/> <xs:element ref="tns:hl7"/> @@ -8693,6 +8694,49 @@ If the text is qualified with a character. Uses quote character by default. <xs:documentation xml:lang="en"> <![CDATA[ References to a custom parser factory to lookup in the registry. +]]> + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="furyDataFormat"> + <xs:complexContent> + <xs:extension base="tns:dataFormat"> + <xs:sequence/> + <xs:attribute name="unmarshalType" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"> +<![CDATA[ +Class of the java type to use when unmarshalling. +]]> + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="requireClassRegistration" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"> +<![CDATA[ +Whether to require register classes. Default value: true +]]> + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="threadSafe" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"> +<![CDATA[ +Whether to use the threadsafe fury. Default value: true +]]> + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="allowAutoWiredFury" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"> +<![CDATA[ +Whether to auto-discover Fury from the registry. Default value: true ]]> </xs:documentation> </xs:annotation> @@ -14603,6 +14647,7 @@ To type used as a target data type in the transformation. <xs:element ref="tns:fhirJson"/> <xs:element ref="tns:fhirXml"/> <xs:element ref="tns:flatpack"/> + <xs:element ref="tns:fury"/> <xs:element ref="tns:grok"/> <xs:element ref="tns:gzipDeflater"/> <xs:element ref="tns:hl7"/> @@ -16807,6 +16852,7 @@ Set a reference to a custom Expression to use. <xs:element ref="tns:fhirJson"/> <xs:element ref="tns:fhirXml"/> <xs:element ref="tns:flatpack"/> + <xs:element ref="tns:fury"/> <xs:element ref="tns:grok"/> <xs:element ref="tns:gzipDeflater"/> <xs:element ref="tns:hl7"/> @@ -16839,22 +16885,6 @@ Set a reference to a custom Expression to use. </xs:choice> </xs:sequence> </xs:complexType> - <xs:complexType name="furyDataFormat"> - <xs:complexContent> - <xs:extension base="tns:dataFormat"> - <xs:sequence/> - <xs:attribute name="unmarshalType" type="xs:string"> - <xs:annotation> - <xs:documentation xml:lang="en"> -<![CDATA[ -Class of the java type to use when unmarshalling. -]]> - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> <xs:complexType name="cSimpleExpression"> <xs:simpleContent> <xs:extension base="tns:typedExpressionDefinition"/> @@ -17612,6 +17642,7 @@ Sets the component name that this definition will apply to. <xs:element ref="tns:fhirJson"/> <xs:element ref="tns:fhirXml"/> <xs:element ref="tns:flatpack"/> + <xs:element ref="tns:fury"/> <xs:element ref="tns:grok"/> <xs:element ref="tns:gzipDeflater"/> <xs:element ref="tns:hl7"/> diff --git a/components/camel-fury/src/generated/java/org/apache/camel/component/fury/FuryDataFormatConfigurer.java b/components/camel-fury/src/generated/java/org/apache/camel/component/fury/FuryDataFormatConfigurer.java index 410e6907033..96152df1691 100644 --- a/components/camel-fury/src/generated/java/org/apache/camel/component/fury/FuryDataFormatConfigurer.java +++ b/components/camel-fury/src/generated/java/org/apache/camel/component/fury/FuryDataFormatConfigurer.java @@ -22,6 +22,12 @@ public class FuryDataFormatConfigurer extends PropertyConfigurerSupport implemen switch (ignoreCase ? name.toLowerCase() : name) { case "unmarshaltype": case "unmarshalType": dataformat.setUnmarshalType(property(camelContext, java.lang.Class.class, value)); return true; + case "requireclassregistration": + case "requireClassRegistration": dataformat.setRequireClassRegistration(property(camelContext, boolean.class, value)); return true; + case "threadsafe": + case "threadSafe": dataformat.setThreadSafe(property(camelContext, boolean.class, value)); return true; + case "allowautowiredfury": + case "allowAutoWiredFury": dataformat.setAllowAutoWiredFury(property(camelContext, boolean.class, value)); return true; default: return false; } } diff --git a/components/camel-fury/src/generated/resources/META-INF/org/apache/camel/component/fury/fury.json b/components/camel-fury/src/generated/resources/META-INF/org/apache/camel/component/fury/fury.json index 6f4c41b0b83..d9aadb3f770 100644 --- a/components/camel-fury/src/generated/resources/META-INF/org/apache/camel/component/fury/fury.json +++ b/components/camel-fury/src/generated/resources/META-INF/org/apache/camel/component/fury/fury.json @@ -17,6 +17,9 @@ }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, - "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class of the java type to use when unmarshalling" } + "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class of the java type to use when unmarshalling" }, + "requireClassRegistration": { "index": 2, "kind": "attribute", "displayName": "Require Class Registration", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to require register classes" }, + "threadSafe": { "index": 3, "kind": "attribute", "displayName": "Thread Safe", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to use the threadsafe fury" }, + "allowAutoWiredFury": { "index": 4, "kind": "attribute", "displayName": "Allow Auto Wired Fury", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to auto-discover Fury from the registry" } } } diff --git a/components/camel-fury/src/main/java/org/apache/camel/component/fury/FuryDataFormat.java b/components/camel-fury/src/main/java/org/apache/camel/component/fury/FuryDataFormat.java index d6c58cd17ca..30ef3c564ba 100644 --- a/components/camel-fury/src/main/java/org/apache/camel/component/fury/FuryDataFormat.java +++ b/components/camel-fury/src/main/java/org/apache/camel/component/fury/FuryDataFormat.java @@ -26,9 +26,13 @@ import org.apache.camel.spi.DataFormatName; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Dataformat; import org.apache.camel.support.service.ServiceSupport; +import org.apache.fury.BaseFury; import org.apache.fury.Fury; +import org.apache.fury.config.FuryBuilder; import org.apache.fury.config.Language; import org.apache.fury.io.FuryInputStream; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Serialize and deserialize messages using <a href="https://fury.apache.org">Apache Fury</a> @@ -36,15 +40,16 @@ import org.apache.fury.io.FuryInputStream; @Dataformat("fury") @Metadata(firstVersion = "4.9.0", title = "Fury") public class FuryDataFormat extends ServiceSupport implements DataFormat, DataFormatName, CamelContextAware { + private static final Logger LOG = LoggerFactory.getLogger(FuryDataFormat.class); private CamelContext camelContext; - /** - * Class of the java type to use when unmarshalling - */ private Class<?> unmarshalType; private String unmarshalTypeName; + private boolean requireClassRegistration = true; + private boolean threadSafe = true; + private boolean allowAutoWiredFury = true; - private Fury fury; + private BaseFury fury; public FuryDataFormat() { this(Object.class); @@ -85,7 +90,16 @@ public class FuryDataFormat extends ServiceSupport implements DataFormat, DataFo unmarshalType = camelContext.getClassResolver().resolveClass(unmarshalTypeName); } - fury = Fury.builder().withLanguage(Language.JAVA).requireClassRegistration(true).build(); + if (fury == null && isAllowAutoWiredFury()) { + fury = getCamelContext().getRegistry().findSingleByType(BaseFury.class); + } + + if (fury == null) { + FuryBuilder builder = Fury.builder().withLanguage(Language.JAVA); + builder.requireClassRegistration(requireClassRegistration); + fury = threadSafe ? builder.buildThreadSafeFury() : builder.build(); + } + if (unmarshalType != null) { fury.register(unmarshalType); } @@ -102,14 +116,18 @@ public class FuryDataFormat extends ServiceSupport implements DataFormat, DataFo // Properties // ------------------------------------------------------------------------- + public BaseFury getFury() { + return fury; + } + + public void setFury(BaseFury fury) { + this.fury = fury; + } public Class<?> getUnmarshalType() { - return this.unmarshalType; + return unmarshalType; } - /** - * Class of the java type to use when unmarshalling - */ public void setUnmarshalType(Class<?> unmarshalType) { this.unmarshalType = unmarshalType; } @@ -122,4 +140,27 @@ public class FuryDataFormat extends ServiceSupport implements DataFormat, DataFo this.unmarshalTypeName = unmarshalTypeName; } + public boolean isRequireClassRegistration() { + return requireClassRegistration; + } + + public void setRequireClassRegistration(boolean requireClassRegistration) { + this.requireClassRegistration = requireClassRegistration; + } + + public boolean isThreadSafe() { + return threadSafe; + } + + public void setThreadSafe(boolean threadSafe) { + this.threadSafe = threadSafe; + } + + public boolean isAllowAutoWiredFury() { + return allowAutoWiredFury; + } + + public void setAllowAutoWiredFury(boolean allowAutoWiredFury) { + this.allowAutoWiredFury = allowAutoWiredFury; + } } diff --git a/components/camel-fury/src/test/java/org/apache/camel/component/fury/FuryTest.java b/components/camel-fury/src/test/java/org/apache/camel/component/fury/FuryTest.java index 70e23687e42..bccf64d9655 100644 --- a/components/camel-fury/src/test/java/org/apache/camel/component/fury/FuryTest.java +++ b/components/camel-fury/src/test/java/org/apache/camel/component/fury/FuryTest.java @@ -44,11 +44,8 @@ public class FuryTest extends CamelTestSupport { return new RouteBuilder() { @Override public void configure() { - FuryDataFormat format = new FuryDataFormat(); - format.setUnmarshalType(TestPojo.class); - - from("direct:in").marshal(format); - from("direct:back").unmarshal(format).to("mock:reverse"); + from("direct:in").marshal().fury(TestPojo.class); + from("direct:back").unmarshal().fury(TestPojo.class).to("mock:reverse"); } }; } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/dataFormats.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/dataFormats.json index ea2b0bb8013..2428196ae02 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/dataFormats.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/dataFormats.json @@ -12,6 +12,6 @@ "output": false }, "properties": { - "dataFormats": { "index": 0, "kind": "element", "displayName": "Data Formats", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.DataFormatDefinition>", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf", "rss" [...] + "dataFormats": { "index": 0, "kind": "element", "displayName": "Data Formats", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.DataFormatDefinition>", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "fury", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf [...] } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fury.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fury.json index fdf3e5c1679..baa3c232da9 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fury.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fury.json @@ -14,6 +14,9 @@ }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, - "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class of the java type to use when unmarshalling" } + "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class of the java type to use when unmarshalling" }, + "requireClassRegistration": { "index": 2, "kind": "attribute", "displayName": "Require Class Registration", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to require register classes" }, + "threadSafe": { "index": 3, "kind": "attribute", "displayName": "Thread Safe", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to use the threadsafe fury" }, + "allowAutoWiredFury": { "index": 4, "kind": "attribute", "displayName": "Allow Auto Wired Fury", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to auto-discover Fury from the registry" } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/marshal.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/marshal.json index ecc749299c3..f788c6c0cc2 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/marshal.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/marshal.json @@ -15,7 +15,7 @@ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" }, "disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data Format Type", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf", "rss", "smook [...] + "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data Format Type", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "fury", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf", "rss" [...] "variableSend": { "index": 4, "kind": "attribute", "displayName": "Variable Send", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable as the source for the message body to send. This makes it handy to use variables for user data and to easily control what data to use for sending and receiving. Important: When using send variable then the message body is tak [...] "variableReceive": { "index": 5, "kind": "attribute", "displayName": "Variable Receive", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable to store the received message body (only body, not headers). This makes it handy to use variables for user data and to easily control what data to use for sending and receiving. Important: When using receive variable th [...] } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/unmarshal.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/unmarshal.json index fa3b561f0ea..fda77b17849 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/unmarshal.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/unmarshal.json @@ -15,7 +15,7 @@ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" }, "disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data Format Type", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf", "rss", "smook [...] + "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data Format Type", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv", "custom", "fhirJson", "fhirXml", "flatpack", "fury", "grok", "gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp", "protobuf", "rss" [...] "variableSend": { "index": 4, "kind": "attribute", "displayName": "Variable Send", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable as the source for the message body to send. This makes it handy to use variables for user data and to easily control what data to use for sending and receiving. Important: When using send variable then the message body is tak [...] "variableReceive": { "index": 5, "kind": "attribute", "displayName": "Variable Receive", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable to store the received message body (only body, not headers). This makes it handy to use variables for user data and to easily control what data to use for sending and receiving. Important: When using receive variable th [...] "allowNullBody": { "index": 6, "kind": "attribute", "displayName": "Allow Null Body", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Indicates whether null is allowed as value of a body to unmarshall." } diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatBuilderFactory.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatBuilderFactory.java index 71c55d83103..0fd32dff4a6 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatBuilderFactory.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatBuilderFactory.java @@ -29,6 +29,7 @@ import org.apache.camel.model.dataformat.CustomDataFormat; import org.apache.camel.model.dataformat.FhirJsonDataFormat; import org.apache.camel.model.dataformat.FhirXmlDataFormat; import org.apache.camel.model.dataformat.FlatpackDataFormat; +import org.apache.camel.model.dataformat.FuryDataFormat; import org.apache.camel.model.dataformat.GrokDataFormat; import org.apache.camel.model.dataformat.GzipDeflaterDataFormat; import org.apache.camel.model.dataformat.HL7DataFormat; @@ -155,6 +156,13 @@ public final class DataFormatBuilderFactory { return new FlatpackDataFormat.Builder(); } + /** + * Uses the Fury data format + */ + public FuryDataFormat.Builder fury() { + return new FuryDataFormat.Builder(); + } + /** * Uses the Grok data format */ diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/MarshalDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/MarshalDefinition.java index 8cf1457554a..c8c5ab21834 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/MarshalDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/MarshalDefinition.java @@ -36,6 +36,7 @@ import org.apache.camel.model.dataformat.CustomDataFormat; import org.apache.camel.model.dataformat.FhirJsonDataFormat; import org.apache.camel.model.dataformat.FhirXmlDataFormat; import org.apache.camel.model.dataformat.FlatpackDataFormat; +import org.apache.camel.model.dataformat.FuryDataFormat; import org.apache.camel.model.dataformat.GrokDataFormat; import org.apache.camel.model.dataformat.GzipDeflaterDataFormat; import org.apache.camel.model.dataformat.HL7DataFormat; @@ -89,6 +90,7 @@ public class MarshalDefinition extends NoOutputDefinition<MarshalDefinition> imp @XmlElement(name = "fhirJson", type = FhirJsonDataFormat.class), @XmlElement(name = "fhirXml", type = FhirXmlDataFormat.class), @XmlElement(name = "flatpack", type = FlatpackDataFormat.class), + @XmlElement(name = "fury", type = FuryDataFormat.class), @XmlElement(name = "grok", type = GrokDataFormat.class), @XmlElement(name = "gzipDeflater", type = GzipDeflaterDataFormat.class), @XmlElement(name = "hl7", type = HL7DataFormat.class), diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/UnmarshalDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/UnmarshalDefinition.java index 233ae83aca6..c979763b004 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/UnmarshalDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/UnmarshalDefinition.java @@ -36,6 +36,7 @@ import org.apache.camel.model.dataformat.CustomDataFormat; import org.apache.camel.model.dataformat.FhirJsonDataFormat; import org.apache.camel.model.dataformat.FhirXmlDataFormat; import org.apache.camel.model.dataformat.FlatpackDataFormat; +import org.apache.camel.model.dataformat.FuryDataFormat; import org.apache.camel.model.dataformat.GrokDataFormat; import org.apache.camel.model.dataformat.GzipDeflaterDataFormat; import org.apache.camel.model.dataformat.HL7DataFormat; @@ -89,6 +90,7 @@ public class UnmarshalDefinition extends NoOutputDefinition<UnmarshalDefinition> @XmlElement(name = "fhirJson", type = FhirJsonDataFormat.class), @XmlElement(name = "fhirXml", type = FhirXmlDataFormat.class), @XmlElement(name = "flatpack", type = FlatpackDataFormat.class), + @XmlElement(name = "fury", type = FuryDataFormat.class), @XmlElement(name = "grok", type = GrokDataFormat.class), @XmlElement(name = "gzipDeflater", type = GzipDeflaterDataFormat.class), @XmlElement(name = "hl7", type = HL7DataFormat.class), diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/DataFormatsDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/DataFormatsDefinition.java index 5f81808811c..606ea87eced 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/DataFormatsDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/DataFormatsDefinition.java @@ -57,6 +57,7 @@ public class DataFormatsDefinition implements CopyableDefinition<DataFormatsDefi @XmlElement(name = "fhirJson", type = FhirJsonDataFormat.class), @XmlElement(name = "fhirXml", type = FhirXmlDataFormat.class), @XmlElement(name = "flatpack", type = FlatpackDataFormat.class), + @XmlElement(name = "fury", type = FuryDataFormat.class), @XmlElement(name = "grok", type = GrokDataFormat.class), @XmlElement(name = "gzipDeflater", type = GzipDeflaterDataFormat.class), @XmlElement(name = "hl7", type = HL7DataFormat.class), diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FuryDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FuryDataFormat.java index dfe17fcfd4b..49d72a74355 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FuryDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FuryDataFormat.java @@ -40,6 +40,21 @@ public class FuryDataFormat extends DataFormatDefinition { @Metadata(description = "Class of the java type to use when unmarshalling") private String unmarshalTypeName; + @XmlAttribute + @Metadata(label = "advanced", description = "Whether to require register classes", defaultValue = "true", + javaType = "java.lang.Boolean") + private String requireClassRegistration; + + @XmlAttribute + @Metadata(label = "advanced", description = "Whether to use the threadsafe fury", defaultValue = "true", + javaType = "java.lang.Boolean") + private String threadSafe; + + @XmlAttribute + @Metadata(label = "advanced", description = "Whether to auto-discover Fury from the registry", defaultValue = "true", + javaType = "java.lang.Boolean") + private String allowAutoWiredFury; + public FuryDataFormat() { super("fury"); } @@ -48,10 +63,17 @@ public class FuryDataFormat extends DataFormatDefinition { super(source); this.unmarshalType = source.unmarshalType; this.unmarshalTypeName = source.unmarshalTypeName; + this.requireClassRegistration = source.requireClassRegistration; + this.threadSafe = source.threadSafe; + this.allowAutoWiredFury = source.allowAutoWiredFury; } private FuryDataFormat(Builder builder) { + this.unmarshalType = builder.unmarshalType; this.unmarshalTypeName = builder.unmarshalTypeName; + this.requireClassRegistration = builder.requireClassRegistration; + this.threadSafe = builder.threadSafe; + this.allowAutoWiredFury = builder.allowAutoWiredFury; } @Override @@ -63,9 +85,6 @@ public class FuryDataFormat extends DataFormatDefinition { return unmarshalType; } - /** - * Class of the java type to use when unmarshalling - */ public void setUnmarshalType(final Class<?> unmarshalType) { this.unmarshalType = unmarshalType; } @@ -78,18 +97,63 @@ public class FuryDataFormat extends DataFormatDefinition { this.unmarshalTypeName = unmarshalTypeName; } + public String getRequireClassRegistration() { + return requireClassRegistration; + } + + public void setRequireClassRegistration(String requireClassRegistration) { + this.requireClassRegistration = requireClassRegistration; + } + + public String getThreadSafe() { + return threadSafe; + } + + public void setThreadSafe(String threadSafe) { + this.threadSafe = threadSafe; + } + + public String getAllowAutoWiredFury() { + return allowAutoWiredFury; + } + + public void setAllowAutoWiredFury(String allowAutoWiredFury) { + this.allowAutoWiredFury = allowAutoWiredFury; + } + /** * {@code Builder} is a specific builder for {@link FuryDataFormat}. */ @XmlTransient public static class Builder implements DataFormatBuilder<FuryDataFormat> { + private Class<?> unmarshalType; private String unmarshalTypeName; + private String requireClassRegistration; + private String threadSafe; + private String allowAutoWiredFury; + + public Builder unmarshalType(Class<?> value) { + this.unmarshalType = value; + return this; + } + + public Builder unmarshalTypeName(String value) { + this.unmarshalTypeName = value; + return this; + } + + public Builder requireClassRegistration(String value) { + this.requireClassRegistration = value; + return this; + } + + public Builder threadSafe(String value) { + this.threadSafe = value; + return this; + } - /** - * Class of the java type to use when unmarshalling - */ - public Builder unmarshalType(String unmarshalTypeName) { - this.unmarshalTypeName = unmarshalTypeName; + public Builder allowAutoWiredFury(String value) { + this.allowAutoWiredFury = value; return this; } diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/transformer/DataFormatTransformerDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/transformer/DataFormatTransformerDefinition.java index f70c865f28b..b8449a0afa4 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/transformer/DataFormatTransformerDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/transformer/DataFormatTransformerDefinition.java @@ -36,6 +36,7 @@ import org.apache.camel.model.dataformat.CustomDataFormat; import org.apache.camel.model.dataformat.FhirJsonDataFormat; import org.apache.camel.model.dataformat.FhirXmlDataFormat; import org.apache.camel.model.dataformat.FlatpackDataFormat; +import org.apache.camel.model.dataformat.FuryDataFormat; import org.apache.camel.model.dataformat.GrokDataFormat; import org.apache.camel.model.dataformat.GzipDeflaterDataFormat; import org.apache.camel.model.dataformat.HL7DataFormat; @@ -91,6 +92,7 @@ public class DataFormatTransformerDefinition extends TransformerDefinition { @XmlElement(name = "fhirJson", type = FhirJsonDataFormat.class), @XmlElement(name = "fhirXml", type = FhirXmlDataFormat.class), @XmlElement(name = "flatpack", type = FlatpackDataFormat.class), + @XmlElement(name = "fury", type = FuryDataFormat.class), @XmlElement(name = "grok", type = GrokDataFormat.class), @XmlElement(name = "gzipDeflater", type = GzipDeflaterDataFormat.class), @XmlElement(name = "hl7", type = HL7DataFormat.class), diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/DataFormatReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/DataFormatReifier.java index ce5f94dc273..991d19c6e46 100644 --- a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/DataFormatReifier.java +++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/DataFormatReifier.java @@ -39,6 +39,7 @@ import org.apache.camel.model.dataformat.FhirDataformat; import org.apache.camel.model.dataformat.FhirJsonDataFormat; import org.apache.camel.model.dataformat.FhirXmlDataFormat; import org.apache.camel.model.dataformat.FlatpackDataFormat; +import org.apache.camel.model.dataformat.FuryDataFormat; import org.apache.camel.model.dataformat.GrokDataFormat; import org.apache.camel.model.dataformat.GzipDeflaterDataFormat; import org.apache.camel.model.dataformat.HL7DataFormat; @@ -205,6 +206,8 @@ public abstract class DataFormatReifier<T extends DataFormatDefinition> extends return new FhirDataFormatReifier<>(camelContext, definition); } else if (definition instanceof FlatpackDataFormat) { return new FlatpackDataFormatReifier(camelContext, definition); + } else if (definition instanceof FuryDataFormat) { + return new FuryDataFormatReifier(camelContext, definition); } else if (definition instanceof GrokDataFormat) { return new GrokDataFormatReifier(camelContext, definition); } else if (definition instanceof GzipDeflaterDataFormat) { diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/FuryDataFormatReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/FuryDataFormatReifier.java new file mode 100644 index 00000000000..2cc00ddcce9 --- /dev/null +++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/FuryDataFormatReifier.java @@ -0,0 +1,37 @@ +/* + * 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.reifier.dataformat; + +import java.util.Map; + +import org.apache.camel.CamelContext; +import org.apache.camel.model.DataFormatDefinition; +import org.apache.camel.model.dataformat.FuryDataFormat; + +public class FuryDataFormatReifier extends DataFormatReifier<FuryDataFormat> { + public FuryDataFormatReifier(CamelContext camelContext, DataFormatDefinition definition) { + super(camelContext, (FuryDataFormat) definition); + } + + @Override + protected void prepareDataFormatConfig(Map<String, Object> properties) { + properties.put("unmarshalType", definition.getUnmarshalType()); + properties.put("requireClassRegistration", definition.getRequireClassRegistration()); + properties.put("threadSafe", definition.getThreadSafe()); + properties.put("allowAutoWiredFury", definition.getAllowAutoWiredFury()); + } +} diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java index fd7135f06c2..a95ec38f1f2 100644 --- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java +++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java @@ -1869,6 +1869,9 @@ public class ModelParser extends BaseParser { } protected FuryDataFormat doParseFuryDataFormat() throws IOException, XmlPullParserException { return doParse(new FuryDataFormat(), (def, key, val) -> switch (key) { + case "allowAutoWiredFury": def.setAllowAutoWiredFury(val); yield true; + case "requireClassRegistration": def.setRequireClassRegistration(val); yield true; + case "threadSafe": def.setThreadSafe(val); yield true; case "unmarshalType": def.setUnmarshalTypeName(val); yield true; default: yield identifiedTypeAttributeHandler().accept(def, key, val); }, noElementHandler(), noValueHandler()); diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java index a7779645d8d..2c6735600b4 100644 --- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java +++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java @@ -1163,6 +1163,7 @@ public class ModelWriter extends BaseWriter { case "FhirJsonDataFormat" -> doWriteFhirJsonDataFormat("fhirJson", (FhirJsonDataFormat) v); case "FhirXmlDataFormat" -> doWriteFhirXmlDataFormat("fhirXml", (FhirXmlDataFormat) v); case "FlatpackDataFormat" -> doWriteFlatpackDataFormat("flatpack", (FlatpackDataFormat) v); + case "FuryDataFormat" -> doWriteFuryDataFormat("fury", (FuryDataFormat) v); case "GrokDataFormat" -> doWriteGrokDataFormat("grok", (GrokDataFormat) v); case "GzipDeflaterDataFormat" -> doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v); case "HL7DataFormat" -> doWriteHL7DataFormat("hl7", (HL7DataFormat) v); @@ -1913,6 +1914,7 @@ public class ModelWriter extends BaseWriter { case "FhirJsonDataFormat" -> doWriteFhirJsonDataFormat("fhirJson", (FhirJsonDataFormat) v); case "FhirXmlDataFormat" -> doWriteFhirXmlDataFormat("fhirXml", (FhirXmlDataFormat) v); case "FlatpackDataFormat" -> doWriteFlatpackDataFormat("flatpack", (FlatpackDataFormat) v); + case "FuryDataFormat" -> doWriteFuryDataFormat("fury", (FuryDataFormat) v); case "GrokDataFormat" -> doWriteGrokDataFormat("grok", (GrokDataFormat) v); case "GzipDeflaterDataFormat" -> doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v); case "HL7DataFormat" -> doWriteHL7DataFormat("hl7", (HL7DataFormat) v); @@ -2474,6 +2476,7 @@ public class ModelWriter extends BaseWriter { case "FhirJsonDataFormat" -> doWriteFhirJsonDataFormat("fhirJson", (FhirJsonDataFormat) v); case "FhirXmlDataFormat" -> doWriteFhirXmlDataFormat("fhirXml", (FhirXmlDataFormat) v); case "FlatpackDataFormat" -> doWriteFlatpackDataFormat("flatpack", (FlatpackDataFormat) v); + case "FuryDataFormat" -> doWriteFuryDataFormat("fury", (FuryDataFormat) v); case "GrokDataFormat" -> doWriteGrokDataFormat("grok", (GrokDataFormat) v); case "GzipDeflaterDataFormat" -> doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v); case "HL7DataFormat" -> doWriteHL7DataFormat("hl7", (HL7DataFormat) v); @@ -2560,6 +2563,9 @@ public class ModelWriter extends BaseWriter { startElement(name); doWriteIdentifiedTypeAttributes(def); doWriteAttribute("unmarshalType", def.getUnmarshalTypeName()); + doWriteAttribute("threadSafe", def.getThreadSafe()); + doWriteAttribute("requireClassRegistration", def.getRequireClassRegistration()); + doWriteAttribute("allowAutoWiredFury", def.getAllowAutoWiredFury()); endElement(name); } protected void doWriteGrokDataFormat(String name, GrokDataFormat def) throws IOException { @@ -3587,6 +3593,7 @@ public class ModelWriter extends BaseWriter { case "FhirJsonDataFormat" -> doWriteFhirJsonDataFormat("fhirJson", (FhirJsonDataFormat) v); case "FhirXmlDataFormat" -> doWriteFhirXmlDataFormat("fhirXml", (FhirXmlDataFormat) v); case "FlatpackDataFormat" -> doWriteFlatpackDataFormat("flatpack", (FlatpackDataFormat) v); + case "FuryDataFormat" -> doWriteFuryDataFormat("fury", (FuryDataFormat) v); case "GrokDataFormat" -> doWriteGrokDataFormat("grok", (GrokDataFormat) v); case "GzipDeflaterDataFormat" -> doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v); case "HL7DataFormat" -> doWriteHL7DataFormat("hl7", (HL7DataFormat) v); diff --git a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java index f2361c77925..c1aa46f84cb 100644 --- a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java +++ b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java @@ -1163,6 +1163,7 @@ public class ModelWriter extends BaseWriter { case "FhirJsonDataFormat" -> doWriteFhirJsonDataFormat("fhirJson", (FhirJsonDataFormat) v); case "FhirXmlDataFormat" -> doWriteFhirXmlDataFormat("fhirXml", (FhirXmlDataFormat) v); case "FlatpackDataFormat" -> doWriteFlatpackDataFormat("flatpack", (FlatpackDataFormat) v); + case "FuryDataFormat" -> doWriteFuryDataFormat("fury", (FuryDataFormat) v); case "GrokDataFormat" -> doWriteGrokDataFormat("grok", (GrokDataFormat) v); case "GzipDeflaterDataFormat" -> doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v); case "HL7DataFormat" -> doWriteHL7DataFormat("hl7", (HL7DataFormat) v); @@ -1913,6 +1914,7 @@ public class ModelWriter extends BaseWriter { case "FhirJsonDataFormat" -> doWriteFhirJsonDataFormat("fhirJson", (FhirJsonDataFormat) v); case "FhirXmlDataFormat" -> doWriteFhirXmlDataFormat("fhirXml", (FhirXmlDataFormat) v); case "FlatpackDataFormat" -> doWriteFlatpackDataFormat("flatpack", (FlatpackDataFormat) v); + case "FuryDataFormat" -> doWriteFuryDataFormat("fury", (FuryDataFormat) v); case "GrokDataFormat" -> doWriteGrokDataFormat("grok", (GrokDataFormat) v); case "GzipDeflaterDataFormat" -> doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v); case "HL7DataFormat" -> doWriteHL7DataFormat("hl7", (HL7DataFormat) v); @@ -2474,6 +2476,7 @@ public class ModelWriter extends BaseWriter { case "FhirJsonDataFormat" -> doWriteFhirJsonDataFormat("fhirJson", (FhirJsonDataFormat) v); case "FhirXmlDataFormat" -> doWriteFhirXmlDataFormat("fhirXml", (FhirXmlDataFormat) v); case "FlatpackDataFormat" -> doWriteFlatpackDataFormat("flatpack", (FlatpackDataFormat) v); + case "FuryDataFormat" -> doWriteFuryDataFormat("fury", (FuryDataFormat) v); case "GrokDataFormat" -> doWriteGrokDataFormat("grok", (GrokDataFormat) v); case "GzipDeflaterDataFormat" -> doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v); case "HL7DataFormat" -> doWriteHL7DataFormat("hl7", (HL7DataFormat) v); @@ -2560,6 +2563,9 @@ public class ModelWriter extends BaseWriter { startElement(name); doWriteIdentifiedTypeAttributes(def); doWriteAttribute("unmarshalType", def.getUnmarshalTypeName()); + doWriteAttribute("threadSafe", def.getThreadSafe()); + doWriteAttribute("requireClassRegistration", def.getRequireClassRegistration()); + doWriteAttribute("allowAutoWiredFury", def.getAllowAutoWiredFury()); endElement(name); } protected void doWriteGrokDataFormat(String name, GrokDataFormat def) throws IOException { @@ -3587,6 +3593,7 @@ public class ModelWriter extends BaseWriter { case "FhirJsonDataFormat" -> doWriteFhirJsonDataFormat("fhirJson", (FhirJsonDataFormat) v); case "FhirXmlDataFormat" -> doWriteFhirXmlDataFormat("fhirXml", (FhirXmlDataFormat) v); case "FlatpackDataFormat" -> doWriteFlatpackDataFormat("flatpack", (FlatpackDataFormat) v); + case "FuryDataFormat" -> doWriteFuryDataFormat("fury", (FuryDataFormat) v); case "GrokDataFormat" -> doWriteGrokDataFormat("grok", (GrokDataFormat) v); case "GzipDeflaterDataFormat" -> doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v); case "HL7DataFormat" -> doWriteHL7DataFormat("hl7", (HL7DataFormat) v); diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java index 780348953c4..07485f4f5a5 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java @@ -3589,6 +3589,7 @@ public final class ModelDeserializers extends YamlDeserializerSupport { @YamlProperty(name = "fhirXml", type = "object:org.apache.camel.model.dataformat.FhirXmlDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "flatpack", type = "object:org.apache.camel.model.dataformat.FlatpackDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "fromType", type = "string"), + @YamlProperty(name = "fury", type = "object:org.apache.camel.model.dataformat.FuryDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "grok", type = "object:org.apache.camel.model.dataformat.GrokDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "gzipDeflater", type = "object:org.apache.camel.model.dataformat.GzipDeflaterDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "hl7", type = "object:org.apache.camel.model.dataformat.HL7DataFormat", oneOf = "dataFormatType"), @@ -3708,6 +3709,11 @@ public final class ModelDeserializers extends YamlDeserializerSupport { target.setDataFormatType(val); break; } + case "fury": { + org.apache.camel.model.dataformat.FuryDataFormat val = asType(node, org.apache.camel.model.dataformat.FuryDataFormat.class); + target.setDataFormatType(val); + break; + } case "grok": { org.apache.camel.model.dataformat.GrokDataFormat val = asType(node, org.apache.camel.model.dataformat.GrokDataFormat.class); target.setDataFormatType(val); @@ -3905,6 +3911,7 @@ public final class ModelDeserializers extends YamlDeserializerSupport { @YamlProperty(name = "fhirJson", type = "object:org.apache.camel.model.dataformat.FhirJsonDataFormat"), @YamlProperty(name = "fhirXml", type = "object:org.apache.camel.model.dataformat.FhirXmlDataFormat"), @YamlProperty(name = "flatpack", type = "object:org.apache.camel.model.dataformat.FlatpackDataFormat"), + @YamlProperty(name = "fury", type = "object:org.apache.camel.model.dataformat.FuryDataFormat"), @YamlProperty(name = "grok", type = "object:org.apache.camel.model.dataformat.GrokDataFormat"), @YamlProperty(name = "gzipDeflater", type = "object:org.apache.camel.model.dataformat.GzipDeflaterDataFormat"), @YamlProperty(name = "hl7", type = "object:org.apache.camel.model.dataformat.HL7DataFormat"), @@ -4086,6 +4093,16 @@ public final class ModelDeserializers extends YamlDeserializerSupport { target.setDataFormats(existing); break; } + case "fury": { + org.apache.camel.model.dataformat.FuryDataFormat val = asType(node, org.apache.camel.model.dataformat.FuryDataFormat.class); + java.util.List<org.apache.camel.model.DataFormatDefinition> existing = target.getDataFormats(); + if (existing == null) { + existing = new java.util.ArrayList<>(); + } + existing.add(val); + target.setDataFormats(existing); + break; + } case "grok": { org.apache.camel.model.dataformat.GrokDataFormat val = asType(node, org.apache.camel.model.dataformat.GrokDataFormat.class); java.util.List<org.apache.camel.model.DataFormatDefinition> existing = target.getDataFormats(); @@ -6297,7 +6314,10 @@ public final class ModelDeserializers extends YamlDeserializerSupport { description = "Serialize and deserialize messages using Apache Fury", deprecated = false, properties = { + @YamlProperty(name = "allowAutoWiredFury", type = "boolean", description = "Whether to auto-discover Fury from the registry", displayName = "Allow Auto Wired Fury"), @YamlProperty(name = "id", type = "string", description = "The id of this node", displayName = "Id"), + @YamlProperty(name = "requireClassRegistration", type = "boolean", description = "Whether to require register classes", displayName = "Require Class Registration"), + @YamlProperty(name = "threadSafe", type = "boolean", description = "Whether to use the threadsafe fury", displayName = "Thread Safe"), @YamlProperty(name = "unmarshalType", type = "string", description = "Class of the java type to use when unmarshalling", displayName = "Unmarshal Type") } ) @@ -6316,11 +6336,26 @@ public final class ModelDeserializers extends YamlDeserializerSupport { String propertyName, Node node) { propertyKey = org.apache.camel.util.StringHelper.dashToCamelCase(propertyKey); switch(propertyKey) { + case "allowAutoWiredFury": { + String val = asText(node); + target.setAllowAutoWiredFury(val); + break; + } case "id": { String val = asText(node); target.setId(val); break; } + case "requireClassRegistration": { + String val = asText(node); + target.setRequireClassRegistration(val); + break; + } + case "threadSafe": { + String val = asText(node); + target.setThreadSafe(val); + break; + } case "unmarshalType": { String val = asText(node); target.setUnmarshalTypeName(val); @@ -9692,6 +9727,7 @@ public final class ModelDeserializers extends YamlDeserializerSupport { @YamlProperty(name = "fhirJson", type = "object:org.apache.camel.model.dataformat.FhirJsonDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "fhirXml", type = "object:org.apache.camel.model.dataformat.FhirXmlDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "flatpack", type = "object:org.apache.camel.model.dataformat.FlatpackDataFormat", oneOf = "dataFormatType"), + @YamlProperty(name = "fury", type = "object:org.apache.camel.model.dataformat.FuryDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "grok", type = "object:org.apache.camel.model.dataformat.GrokDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "gzipDeflater", type = "object:org.apache.camel.model.dataformat.GzipDeflaterDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "hl7", type = "object:org.apache.camel.model.dataformat.HL7DataFormat", oneOf = "dataFormatType"), @@ -9812,6 +9848,11 @@ public final class ModelDeserializers extends YamlDeserializerSupport { target.setDataFormatType(val); break; } + case "fury": { + org.apache.camel.model.dataformat.FuryDataFormat val = asType(node, org.apache.camel.model.dataformat.FuryDataFormat.class); + target.setDataFormatType(val); + break; + } case "grok": { org.apache.camel.model.dataformat.GrokDataFormat val = asType(node, org.apache.camel.model.dataformat.GrokDataFormat.class); target.setDataFormatType(val); @@ -20288,6 +20329,7 @@ public final class ModelDeserializers extends YamlDeserializerSupport { @YamlProperty(name = "fhirJson", type = "object:org.apache.camel.model.dataformat.FhirJsonDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "fhirXml", type = "object:org.apache.camel.model.dataformat.FhirXmlDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "flatpack", type = "object:org.apache.camel.model.dataformat.FlatpackDataFormat", oneOf = "dataFormatType"), + @YamlProperty(name = "fury", type = "object:org.apache.camel.model.dataformat.FuryDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "grok", type = "object:org.apache.camel.model.dataformat.GrokDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "gzipDeflater", type = "object:org.apache.camel.model.dataformat.GzipDeflaterDataFormat", oneOf = "dataFormatType"), @YamlProperty(name = "hl7", type = "object:org.apache.camel.model.dataformat.HL7DataFormat", oneOf = "dataFormatType"), @@ -20413,6 +20455,11 @@ public final class ModelDeserializers extends YamlDeserializerSupport { target.setDataFormatType(val); break; } + case "fury": { + org.apache.camel.model.dataformat.FuryDataFormat val = asType(node, org.apache.camel.model.dataformat.FuryDataFormat.class); + target.setDataFormatType(val); + break; + } case "grok": { org.apache.camel.model.dataformat.GrokDataFormat val = asType(node, org.apache.camel.model.dataformat.GrokDataFormat.class); target.setDataFormatType(val); diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json index 48e1637fcd6..aae303a54c0 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json @@ -2849,6 +2849,8 @@ "required" : [ "fhirXml" ] }, { "required" : [ "flatpack" ] + }, { + "required" : [ "fury" ] }, { "required" : [ "grok" ] }, { @@ -3005,6 +3007,14 @@ "$ref" : "#/items/definitions/org.apache.camel.model.dataformat.FlatpackDataFormat" } } + }, { + "type" : "object", + "required" : [ "fury" ], + "properties" : { + "fury" : { + "$ref" : "#/items/definitions/org.apache.camel.model.dataformat.FuryDataFormat" + } + } }, { "type" : "object", "required" : [ "grok" ], @@ -3278,6 +3288,7 @@ "fhirJson" : { }, "fhirXml" : { }, "flatpack" : { }, + "fury" : { }, "grok" : { }, "gzipDeflater" : { }, "hl7" : { }, @@ -7633,6 +7644,7 @@ "fhirJson" : { }, "fhirXml" : { }, "flatpack" : { }, + "fury" : { }, "grok" : { }, "gzipDeflater" : { }, "hl7" : { }, @@ -7700,6 +7712,8 @@ "required" : [ "fhirXml" ] }, { "required" : [ "flatpack" ] + }, { + "required" : [ "fury" ] }, { "required" : [ "grok" ] }, { @@ -7856,6 +7870,14 @@ "$ref" : "#/items/definitions/org.apache.camel.model.dataformat.FlatpackDataFormat" } } + }, { + "type" : "object", + "required" : [ "fury" ], + "properties" : { + "fury" : { + "$ref" : "#/items/definitions/org.apache.camel.model.dataformat.FuryDataFormat" + } + } }, { "type" : "object", "required" : [ "grok" ], @@ -10589,6 +10611,9 @@ "flatpack" : { "$ref" : "#/items/definitions/org.apache.camel.model.dataformat.FlatpackDataFormat" }, + "fury" : { + "$ref" : "#/items/definitions/org.apache.camel.model.dataformat.FuryDataFormat" + }, "grok" : { "$ref" : "#/items/definitions/org.apache.camel.model.dataformat.GrokDataFormat" }, @@ -10948,11 +10973,26 @@ "type" : "object", "additionalProperties" : false, "properties" : { + "allowAutoWiredFury" : { + "type" : "boolean", + "title" : "Allow Auto Wired Fury", + "description" : "Whether to auto-discover Fury from the registry" + }, "id" : { "type" : "string", "title" : "Id", "description" : "The id of this node" }, + "requireClassRegistration" : { + "type" : "boolean", + "title" : "Require Class Registration", + "description" : "Whether to require register classes" + }, + "threadSafe" : { + "type" : "boolean", + "title" : "Thread Safe", + "description" : "Whether to use the threadsafe fury" + }, "unmarshalType" : { "type" : "string", "title" : "Unmarshal Type", @@ -16143,6 +16183,8 @@ "required" : [ "fhirXml" ] }, { "required" : [ "flatpack" ] + }, { + "required" : [ "fury" ] }, { "required" : [ "grok" ] }, { @@ -16299,6 +16341,14 @@ "$ref" : "#/items/definitions/org.apache.camel.model.dataformat.FlatpackDataFormat" } } + }, { + "type" : "object", + "required" : [ "fury" ], + "properties" : { + "fury" : { + "$ref" : "#/items/definitions/org.apache.camel.model.dataformat.FuryDataFormat" + } + } }, { "type" : "object", "required" : [ "grok" ], @@ -16559,6 +16609,7 @@ "fhirJson" : { }, "fhirXml" : { }, "flatpack" : { }, + "fury" : { }, "grok" : { }, "gzipDeflater" : { }, "hl7" : { },