From 6d50fb24eb20819ea66c1bf098117c0ddd6d27d6 Mon Sep 17 00:00:00 2001 From: Zheng Feng Date: Mon, 4 Nov 2024 15:42:21 +0800 Subject: [PATCH] camel-fury: Improve to allow auto discovery Fury from the registry * replace to use BaseFury * add an option with allowAutoWiredFury * add FuryDataFormatReifier --- .../camel/catalog/dataformats/fury.json | 5 +- .../camel/catalog/models/dataFormats.json | 2 +- .../org/apache/camel/catalog/models/fury.json | 5 +- .../apache/camel/catalog/models/marshal.json | 2 +- .../camel/catalog/models/unmarshal.json | 2 +- .../camel/catalog/schemas/camel-spring.xsd | 63 +++++++++++---- .../fury/FuryDataFormatConfigurer.java | 6 ++ .../org/apache/camel/component/fury/fury.json | 5 +- .../camel/component/fury/FuryDataFormat.java | 59 +++++++++++--- .../apache/camel/component/fury/FuryTest.java | 7 +- .../camel/model/dataformat/dataFormats.json | 2 +- .../apache/camel/model/dataformat/fury.json | 5 +- .../org/apache/camel/model/marshal.json | 2 +- .../org/apache/camel/model/unmarshal.json | 2 +- .../builder/DataFormatBuilderFactory.java | 8 ++ .../apache/camel/model/MarshalDefinition.java | 2 + .../camel/model/UnmarshalDefinition.java | 2 + .../dataformat/DataFormatsDefinition.java | 1 + .../model/dataformat/FuryDataFormat.java | 80 +++++++++++++++++-- .../DataFormatTransformerDefinition.java | 2 + .../reifier/dataformat/DataFormatReifier.java | 3 + .../dataformat/FuryDataFormatReifier.java | 37 +++++++++ .../org/apache/camel/xml/in/ModelParser.java | 3 + .../org/apache/camel/xml/out/ModelWriter.java | 7 ++ .../apache/camel/yaml/out/ModelWriter.java | 7 ++ .../deserializers/ModelDeserializers.java | 47 +++++++++++ .../resources/schema/camelYamlDsl.json | 51 ++++++++++++ 27 files changed, 369 insertions(+), 48 deletions(-) create mode 100644 core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/FuryDataFormatReifier.java 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 6f4c41b0b83bf..d9aadb3f7706d 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 ea2b0bb8013ff..2428196ae024a 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", "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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "A list holding the configured data formats" } + "dataFormats": { "index": 0, "kind": "element", "displayName": "Data Formats", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "A list holding the configured data formats" } } } 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 fdf3e5c167902..baa3c232da9b1 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 ecc749299c3ac..f788c6c0cc2ba 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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "The data format to be used" }, + "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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "The data format to be used" }, "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 taken from this variable instead of the current message, however the headers from the message will still be used as well. In other words, the variable is used instead of the message body, but everything else is as usual." }, "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 then the received body is stored only in this variable and not on the current message." } } 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 fa3b561f0eaf6..fda77b1784978 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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "The data format to be used" }, + "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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "The data format to be used" }, "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 taken from this variable instead of the current message, however the headers from the message will still be used as well. In other words, the variable is used instead of the message body, but everything else is as usual." }, "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 then the received body is stored only in this variable and not on the current message." }, "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 91b9d197ed5a6..fb5ec4bf5a28e 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 + @@ -8693,6 +8694,49 @@ If the text is qualified with a character. Uses quote character by default. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14603,6 +14647,7 @@ To type used as a target data type in the transformation. + @@ -16807,6 +16852,7 @@ Set a reference to a custom Expression to use. + @@ -16839,22 +16885,6 @@ Set a reference to a custom Expression to use. - - - - - - - - - - - - - - @@ -17612,6 +17642,7 @@ Sets the component name that this definition will apply to. + 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 410e690703316..96152df169108 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 boolean configure(CamelContext camelContext, Object target, String name, 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 6f4c41b0b83bf..d9aadb3f7706d 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 d6c58cd17caa5..30ef3c564ba45 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.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 Apache Fury @@ -36,15 +40,16 @@ @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 @@ protected void doInit() throws Exception { 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 @@ protected void doStop() throws Exception { // 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 void setUnmarshalTypeName(String unmarshalTypeName) { 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 70e23687e42eb..bccf64d96556d 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 @@ protected RouteBuilder createRouteBuilder() { 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 ea2b0bb8013ff..2428196ae024a 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", "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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "A list holding the configured data formats" } + "dataFormats": { "index": 0, "kind": "element", "displayName": "Data Formats", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "A list holding the configured data formats" } } } 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 fdf3e5c167902..baa3c232da9b1 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 ecc749299c3ac..f788c6c0cc2ba 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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "The data format to be used" }, + "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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "The data format to be used" }, "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 taken from this variable instead of the current message, however the headers from the message will still be used as well. In other words, the variable is used instead of the message body, but everything else is as usual." }, "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 then the received body is stored only in this variable and not on the current message." } } 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 fa3b561f0eaf6..fda77b1784978 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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "The data format to be used" }, + "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", "smooks", "soap", "swiftMt", "swiftMx", "syslog", "tarFile", "thrift", "tidyMarkup", "univocityCsv", "univocityFixed", "univocityTsv", "xmlSecurity", "yaml", "zipDeflater", "zipFile" ], "deprecated": false, "autowired": false, "secret": false, "description": "The data format to be used" }, "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 taken from this variable instead of the current message, however the headers from the message will still be used as well. In other words, the variable is used instead of the message body, but everything else is as usual." }, "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 then the received body is stored only in this variable and not on the current message." }, "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 71c55d831030f..0fd32dff4a6b3 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.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 FlatpackDataFormat.Builder flatpack() { 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 8cf1457554a69..c8c5ab2183424 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.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 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 233ae83aca6ec..c979763b00491 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.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 @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 5f81808811cae..606ea87eced4f 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 getUnmarshalType() { 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 void setUnmarshalTypeName(final String unmarshalTypeName) { 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 { + 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 f70c865f28b56..b8449a0afa4ea 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.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 ce5f94dc2736a..991d19c6e461a 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.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 @@ private static DataFormatReifier coreReifier( 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 0000000000000..2cc00ddcce96c --- /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 { + public FuryDataFormatReifier(CamelContext camelContext, DataFormatDefinition definition) { + super(camelContext, (FuryDataFormat) definition); + } + + @Override + protected void prepareDataFormatConfig(Map 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 fd7135f06c2a2..a95ec38f1f2a1 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 @@ protected FlatpackDataFormat doParseFlatpackDataFormat() throws IOException, Xml } 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 a7779645d8d3e..2c6735600b478 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 @@ protected void doWriteMarshalDefinition(String name, MarshalDefinition def) thro 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 @@ protected void doWriteUnmarshalDefinition(String name, UnmarshalDefinition def) 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 @@ protected void doWriteDataFormatsDefinition(String name, DataFormatsDefinition d 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 @@ protected void doWriteFuryDataFormat(String name, FuryDataFormat def) throws IOE 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 @@ protected void doWriteDataFormatTransformerDefinition(String name, DataFormatTra 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 f2361c7792583..c1aa46f84cbef 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 @@ protected void doWriteMarshalDefinition(String name, MarshalDefinition def) thro 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 @@ protected void doWriteUnmarshalDefinition(String name, UnmarshalDefinition def) 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 @@ protected void doWriteDataFormatsDefinition(String name, DataFormatsDefinition d 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 @@ protected void doWriteFuryDataFormat(String name, FuryDataFormat def) throws IOE 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 @@ protected void doWriteDataFormatTransformerDefinition(String name, DataFormatTra 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 780348953c476..07485f4f5a5ec 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 @@ protected boolean setProperty(DataFormatDefinition target, String propertyKey, @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 @@ protected boolean setProperty(DataFormatTransformerDefinition target, String pro 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 @@ protected boolean setProperty(DataFormatTransformerDefinition target, String pro @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 @@ protected boolean setProperty(DataFormatsDefinition target, String propertyKey, 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 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 existing = target.getDataFormats(); @@ -6297,7 +6314,10 @@ protected boolean setProperty(FlatpackDataFormat target, String propertyKey, 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 @@ protected boolean setProperty(FuryDataFormat target, String propertyKey, 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 @@ protected boolean setProperty(LoopDefinition target, String propertyKey, @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 @@ protected boolean setProperty(MarshalDefinition target, String propertyKey, 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 @@ protected boolean setProperty(UniVocityTsvDataFormat target, String propertyKey, @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 @@ protected boolean setProperty(UnmarshalDefinition target, String propertyKey, 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 48e1637fcd6ca..aae303a54c03e 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" : { },