--- apiVersion: v1 kind: List items: - apiVersion: v1 kind: ConfigMap metadata: labels: funktion.fabric8.io/kind: Connector provider: fabric8 project: connector-dozer version: 1.1.41 group: io.fabric8.funktion.connector name: dozer data: deployment.yml: | --- apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: funktion.fabric8.io/kind: Subscription connector: dozer spec: replicas: 1 template: metadata: labels: funktion.fabric8.io/kind: Subscription connector: dozer spec: containers: - image: funktion/connector-dozer:1.1.41 name: connector schema.yml: | --- component: kind: component scheme: dozer syntax: dozer:name title: Dozer description: The dozer component provides the ability to map between Java beans using the Dozer mapping library. label: transformation deprecated: false async: false producerOnly: true javaType: org.apache.camel.component.dozer.DozerComponent groupId: org.apache.camel artifactId: camel-dozer version: 2.18.1 componentProperties: {} properties: name: kind: path group: producer required: true type: string javaType: java.lang.String deprecated: false secret: false description: A human readable name of the mapping. order: 0 mappingConfiguration: kind: parameter group: producer type: object javaType: org.apache.camel.converter.dozer.DozerBeanMapperConfiguration deprecated: false secret: false description: The name of a DozerBeanMapperConfiguration bean in the Camel registry which should be used for configuring the Dozer mapping. This is an alternative to the mappingFile option that can be used for fine-grained control over how Dozer is configured. Remember to use a prefix in the value to indicate that the bean is in the Camel registry (e.g. myDozerConfig). order: 1 mappingFile: kind: parameter group: producer type: string javaType: java.lang.String deprecated: false secret: false defaultValue: dozerBeanMapping.xml description: 'The location of a Dozer configuration file. The file is loaded from the classpath by default but you can use file: classpath: or http: to load the configuration from a specific location.' order: 2 marshalId: kind: parameter group: producer type: string javaType: java.lang.String deprecated: false secret: false description: The id of a dataFormat defined within the Camel Context to use for marshalling the mapping output to a non-Java type. order: 3 sourceModel: kind: parameter group: producer type: string javaType: java.lang.String deprecated: false secret: false description: Fully-qualified class name for the source type used in the mapping. If specified the input to the mapping is converted to the specified type before being mapped with Dozer. order: 4 targetModel: kind: parameter group: producer required: true type: string javaType: java.lang.String deprecated: false secret: false description: Fully-qualified class name for the target type used in the mapping. order: 5 unmarshalId: kind: parameter group: producer type: string javaType: java.lang.String deprecated: false secret: false description: The id of a dataFormat defined within the Camel Context to use for unmarshalling the mapping input from a non-Java type. order: 6 synchronous: kind: parameter group: advanced label: advanced type: boolean javaType: boolean deprecated: false secret: false defaultValue: false description: Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). order: 7 documentation.adoc: "[[Dozer-Dozer]]\nDozer\n~~~~~\n\nThe??*dozer:*??component\ \ provides the ability to map between Java beans\nusing the http://camel.apache.org/dozer-type-conversion.html[Dozer]\n\ mapping framework since *Camel 2.15.0*. ??Camel also supports the ability\n\ to trigger Dozer mappings\nhttp://camel.apache.org/dozer-type-conversion.html[as\ \ a type converter].\n??The primary differences between using a Dozer endpoint\ \ and a Dozer\nconverter are:\n\n* The ability to manage Dozer mapping configuration\ \ on a per-endpoint\nbasis vs. global configuration via the converter registry.\n\ * A Dozer endpoint can be configured to marshal/unmarshal input and\noutput\ \ data using Camel data formats to support a single, any-to-any\ntransformation\ \ endpoint\n* The Dozer component allows for fine-grained integration and extension\n\ of Dozer to support additional functionality (e.g. mapping literal\nvalues,\ \ using expressions for mappings, etc.).\n\nIn order to use the Dozer component,\ \ Maven users will need to add the\nfollowing dependency to their??`pom.xml`:\n\ \n[source,xml]\n------------------------------------------------------------\n\ \n org.apache.camel\n camel-dozer\n\ \ x.x.x\n \n\n------------------------------------------------------------\n\ \n[[Dozer-URIformat]]\nURI format\n^^^^^^^^^^\n\nThe Dozer component only supports\ \ producer endpoints.\n\n[source,java]\n--------------------------\ndozer:endpointId[?options]\n\ --------------------------\n\nWhere??*endpointId*??is a name used to uniquely\ \ identify the Dozer\nendpoint configuration.??\n\nAn example Dozer endpoint\ \ URI:\n\n[source,java]\n---------------------------------------------------------------------------------------\n\ from(\"direct:orderInput\").\n to(\"dozer:transformOrder?mappingFile=orderMapping.xml&targetModel=example.XYZOrder\"\ ).\n to(\"direct:orderOutput\");\n---------------------------------------------------------------------------------------\n\ \n[[Dozer-Options]]\nOptions\n^^^^^^^\n\n// component options: START\nThe Dozer\ \ component has no options.\n// component options: END\n\n// endpoint options:\ \ START\nThe Dozer component supports 8 endpoint options which are listed below:\n\ \n{% raw %}\n[width=\"100%\",cols=\"2,1,1m,1m,5\",options=\"header\"]\n|=======================================================================\n\ | Name | Group | Default | Java Type | Description\n| name | producer | | String\ \ | *Required* A human readable name of the mapping.\n| mappingConfiguration\ \ | producer | | DozerBeanMapperConfiguration | The name of a DozerBeanMapperConfiguration\ \ bean in the Camel registry which should be used for configuring the Dozer\ \ mapping. This is an alternative to the mappingFile option that can be used\ \ for fine-grained control over how Dozer is configured. Remember to use a prefix\ \ in the value to indicate that the bean is in the Camel registry (e.g. myDozerConfig).\n\ | mappingFile | producer | dozerBeanMapping.xml | String | The location of a\ \ Dozer configuration file. The file is loaded from the classpath by default\ \ but you can use file: classpath: or http: to load the configuration from a\ \ specific location.\n| marshalId | producer | | String | The id of a dataFormat\ \ defined within the Camel Context to use for marshalling the mapping output\ \ to a non-Java type.\n| sourceModel | producer | | String | Fully-qualified\ \ class name for the source type used in the mapping. If specified the input\ \ to the mapping is converted to the specified type before being mapped with\ \ Dozer.\n| targetModel | producer | | String | *Required* Fully-qualified\ \ class name for the target type used in the mapping.\n| unmarshalId | producer\ \ | | String | The id of a dataFormat defined within the Camel Context to use\ \ for unmarshalling the mapping input from a non-Java type.\n| synchronous |\ \ advanced | false | boolean | Sets whether synchronous processing should be\ \ strictly used or Camel is allowed to use asynchronous processing (if supported).\n\ |=======================================================================\n{%\ \ endraw %}\n// endpoint options: END\n\n[[Dozer-UsingDataFormatswithDozer]]\n\ Using Data Formats with Dozer\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nDozer does not\ \ support non-Java sources and targets for mappings, so it\ncannot, for example,\ \ map an XML document to a Java object on its own.\n??Luckily, Camel has extensive\ \ support for marshalling between Java and a\nwide variety of formats using\n\ http://camel.apache.org/data-format.html[data formats]. ??The Dozer\ncomponent\ \ takes advantage of this support by allowing you to specify\nthat input and\ \ output data should be passed through a data format prior\nto processing via\ \ Dozer. ??You can always do this on your own outside the\ncall to Dozer, but\ \ supporting it directly in the Dozer component allows\nyou to use a single\ \ endpoints to configure any-to-any transformation\nwithin Camel.\n\nAs an example,\ \ let's say you wanted to map between an XML data structure\nand a JSON data\ \ structure using the Dozer component. ??If you had the\nfollowing data formats\ \ defined in a Camel Context:\n\n[source,xml]\n-----------------------------------------------\n\ \n \n \n\n-----------------------------------------------\n\ \nYou could then configure a Dozer endpoint to unmarshal the input XML\nusing\ \ a JAXB data format and marshal the mapping output using Jackson.\n\n[source,xml]\n\ ----------------------------------------------------------------------------------------------------------\n\ \n----------------------------------------------------------------------------------------------------------\n\ \n[[Dozer-ConfiguringDozer]]\nConfiguring Dozer\n^^^^^^^^^^^^^^^^^\n\nAll Dozer\ \ endpoints require a Dozer mapping configuration file which\ndefines mappings\ \ between source and target objects. ??The component will\ndefault to a location\ \ of META-INF/dozerBeanMapping.xml if the\nmappingFile or mappingConfiguration\ \ options are not specified on an\nendpoint. ??If you need to supply multiple\ \ mapping configuration files\nfor a single endpoint or specify additional configuration\ \ options (e.g.\nevent listeners, custom converters, etc.), then you can use\ \ an instance\nof??`org.apache.camel.converter.dozer.DozerBeanMapperConfiguration`.\n\ \n[source,xml]\n------------------------------------------------------------------------------------------\n\ ??\n \n \n mapping1.xml\n\ \ mapping2.xml\n \n \n\n------------------------------------------------------------------------------------------\n\ \n[[Dozer-MappingExtensions]]\nMapping Extensions\n^^^^^^^^^^^^^^^^^^\n\nThe\ \ Dozer component implements a number of extensions to the Dozer\nmapping framework\ \ as custom converters. ??These converters implement\nmapping functions that\ \ are not supported directly by Dozer itself.\n\n[[Dozer-VariableMappings]]\n\ Variable Mappings\n+++++++++++++++++\n\nVariable mappings allow you to map the\ \ value of a variable definition\nwithin a Dozer configuration into a target\ \ field instead of using the\nvalue of a source field. ??This is equivalent\ \ to constant mapping in\nother mapping frameworks, where can you assign a literal\ \ value to a\ntarget field. ??To use a variable mapping, simply define a variable\n\ within your mapping configuration and then map from the VariableMapper\nclass\ \ into your target field of choice:\n\n[source,xml]\n--------------------------------------------------------------------------------------------------------\n\ \n \n \n ACME-SALES\n\ \ \n \n \n org.apache.camel.component.dozer.VariableMapper\n\ \ org.example.Order\n \n literal\n\ \ custId\n \n \n\n--------------------------------------------------------------------------------------------------------\n\ \n[[Dozer-CustomMappings]]\nCustom Mappings\n+++++++++++++++\n\nCustom mappings\ \ allow you to define your own logic for how a source\nfield is mapped to a\ \ target field. ??They are similar in function to\nDozer customer converters,\ \ with two notable differences:\n\n* You can have multiple converter methods\ \ in a single class with custom\nmappings.\n* There is no requirement to implement\ \ a Dozer-specific interface with\ncustom mappings.\n\nA custom mapping is declared\ \ by using the built-in '_customMapping'\nconverter in your mapping configuration.\ \ ??The parameter to this\nconverter has the following syntax:\n\n[source,shell]\n\ --------------------------\n[class-name][,method-name]\n--------------------------\n\ \nMethod name is optional - the Dozer component will search for a method\nthat\ \ matches the input and output types required for a mapping. ??An\nexample custom\ \ mapping and configuration are provided below.\n\n[source,java]\n--------------------------------------------------\n\ public class CustomMapper {\n // All customer ids must be wrapped in \"[\ \ ]\"\n public Object mapCustomer(String customerId) {\n return \"\ [\" + customerId + \"]\";\n }\n}??\n--------------------------------------------------\n\ \n[source,xml]\n--------------------------------------------------------------------------------------------------------\n\ \n \n org.example.A\n org.example.B\n\ \ \n header.customerNum\n \ \ custId\n \n \n\n--------------------------------------------------------------------------------------------------------\n\ \n[[Dozer-ExpressionMappings]]\nExpression Mappings\n+++++++++++++++++++\n\n\ Expression mappings allow you to use the powerful\nhttp://camel.apache.org/languages.html[language]\ \ capabilities of Camel\nto evaluate an expression and assign the result to\ \ a target field in a\nmapping. ??Any language that Camel supports can be used\ \ in an expression\nmapping. ??Basic examples of expressions include the ability\ \ to map a\nCamel message header or exchange property to a target field or to\n\ concatenate multiple source fields into a target field. ??The syntax of a\n\ mapping expression is:\n\n[source,shell]\n----------------------- \n[language]:[expression]\n\ -----------------------\n\nAn example of mapping a message header into a target\ \ field:\n\n[source,xml]\n--------------------------------------------------------------------------------------------------------------\n\ \n \n org.apache.camel.component.dozer.ExpressionMapper\n\ \ org.example.B\n \n expression\n\ \ custId\n \n \n\n--------------------------------------------------------------------------------------------------------------\n\ \nNote that any properties within your expression must be escaped with \"\\\"\ \nto prevent an error when Dozer attempts to resolve variable values\ndefined\ \ using the EL.\n\n"