You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/01/04 14:14:42 UTC
[camel] branch main updated: CAMEL-18496: removed the deprecated component camel-dozer
This is an automated email from the ASF dual-hosted git repository.
orpiske 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 d45d6bcaf4c CAMEL-18496: removed the deprecated component camel-dozer
d45d6bcaf4c is described below
commit d45d6bcaf4c4e5d4ccd150d4bfe125ab38b14466
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Jan 4 13:12:09 2023 +0100
CAMEL-18496: removed the deprecated component camel-dozer
---
bom/camel-bom/pom.xml | 5 -
camel-dependencies/pom.xml | 1 -
catalog/camel-allcomponents/pom.xml | 7 +-
.../org/apache/camel/catalog/components.properties | 1 -
.../org/apache/camel/catalog/components/dozer.json | 38 --
components/camel-dozer/pom.xml | 89 ----
.../component/dozer/DozerComponentConfigurer.java | 55 ---
.../component/dozer/DozerEndpointConfigurer.java | 85 ----
.../component/dozer/DozerEndpointUriFactory.java | 75 ----
.../services/org/apache/camel/component.properties | 7 -
.../services/org/apache/camel/component/dozer | 2 -
.../org/apache/camel/configurer/dozer-component | 2 -
.../org/apache/camel/configurer/dozer-endpoint | 2 -
.../org/apache/camel/urifactory/dozer-endpoint | 2 -
.../org/apache/camel/component/dozer/dozer.json | 38 --
.../camel-dozer/src/main/docs/dozer-component.adoc | 472 ---------------------
.../camel/component/dozer/BaseConverter.java | 46 --
.../apache/camel/component/dozer/CustomMapper.java | 237 -----------
.../camel/component/dozer/DozerComponent.java | 50 ---
.../camel/component/dozer/DozerConfiguration.java | 137 ------
.../camel/component/dozer/DozerEndpoint.java | 171 --------
.../camel/component/dozer/DozerProducer.java | 175 --------
.../camel/component/dozer/ExpressionMapper.java | 166 --------
.../camel/component/dozer/VariableMapper.java | 43 --
.../dozer/DozerBeanMapperConfiguration.java | 83 ----
.../dozer/DozerThreadContextClassLoader.java | 73 ----
.../camel/converter/dozer/DozerTypeConverter.java | 100 -----
.../converter/dozer/DozerTypeConverterLoader.java | 268 ------------
.../camel/converter/dozer/MapperFactory.java | 100 -----
.../dozer/CustomMapperParametersTest.java | 63 ---
.../camel/component/dozer/CustomMapperTest.java | 104 -----
.../camel/component/dozer/CustomMappingTest.java | 62 ---
.../camel/component/dozer/DozerComponentTest.java | 61 ---
.../dozer/ExpressionMappingClasspathTest.java | 67 ---
.../component/dozer/ExpressionMappingFileTest.java | 67 ---
.../component/dozer/ExpressionMappingTest.java | 68 ---
.../camel/component/dozer/VariableMappingTest.java | 62 ---
.../camel/component/dozer/XmlToJsonTest.java | 82 ----
.../component/dozer/example/CustomMapper.java | 27 --
.../dozer/example/CustomMapperOperations.java | 31 --
.../component/dozer/example/abc/ABCOrder.java | 397 -----------------
.../component/dozer/example/abc/ObjectFactory.java | 73 ----
.../component/dozer/example/xyz/LineItem.java | 100 -----
.../component/dozer/example/xyz/XYZOrder.java | 124 ------
.../camel/converter/dozer/CustomerProcessor.java | 29 --
.../converter/dozer/DozerBeanMappingTest.java | 120 ------
.../converter/dozer/DozerTestArtifactsFactory.java | 58 ---
.../converter/dozer/DozerTypeConverterDTOTest.java | 73 ----
.../converter/dozer/DozerTypeConverterTest.java | 76 ----
.../SpringDozerTypeConverterConfigurationTest.java | 43 --
.../dozer/SpringDozerTypeConverterTest.java | 43 --
.../SpringDozerTypeConverterWithMapIdTest.java | 43 --
.../camel/converter/dozer/dto/AddressDTO.java | 44 --
.../camel/converter/dozer/dto/CustomerDTO.java | 57 ---
.../camel/converter/dozer/model/Address.java | 66 ---
.../camel/converter/dozer/model/Customer.java | 77 ----
.../camel/converter/dozer/model/CustomerA.java | 68 ---
.../camel/converter/dozer/model/CustomerB.java | 87 ----
.../camel/converter/dozer/service/Customer.java | 90 ----
.../SpringDozerTypeConverterConfigurationTest.xml | 49 ---
.../test/resources/application-context-map-id.xml | 51 ---
.../src/test/resources/application-context.xml | 51 ---
.../test/resources/bean-to-bean-dozer-mappings.xml | 37 --
.../test/resources/bean-to-map-dozer-mappings.xml | 37 --
.../src/test/resources/log4j2.properties | 30 --
.../src/test/resources/mapping-map-id.xml | 36 --
.../camel-dozer/src/test/resources/mapping.xml | 36 --
.../component/dozer/CustomMappingTest-context.xml | 39 --
.../ExpressionMappingClasspathTest-context.xml | 31 --
.../dozer/ExpressionMappingFileTest-context.xml | 31 --
.../dozer/ExpressionMappingTest-context.xml | 31 --
.../dozer/VariableMappingTest-context.xml | 31 --
.../component/dozer/XmlToJsonTest-context.xml | 35 --
.../org/apache/camel/component/dozer/abc-order.xml | 32 --
.../apache/camel/component/dozer/customMapping.xml | 62 ---
.../camel/component/dozer/dozerBeanMapping.xml | 60 ---
.../camel/component/dozer/expressionClasspath.txt | 1 -
.../camel/component/dozer/expressionFile.txt | 1 -
.../camel/component/dozer/expressionMapping.xml | 48 ---
.../component/dozer/expressionMappingClasspath.xml | 48 ---
.../component/dozer/expressionMappingFile.xml | 48 ---
.../camel/component/dozer/variableMapping.xml | 70 ---
.../apache/camel/component/dozer/xyz-order.json | 1 -
components/pom.xml | 1 -
.../org/apache/camel/main/components.properties | 1 -
.../modules/ROOT/examples/json/dozer.json | 1 -
docs/components/modules/ROOT/nav.adoc | 1 -
.../modules/ROOT/pages/dozer-component.adoc | 1 -
.../ROOT/pages/camel-3x-upgrade-guide-3_21.adoc | 9 +-
.../modules/ROOT/pages/transformer.adoc | 6 +-
.../component/ComponentsBuilderFactory.java | 14 -
.../dsl/DozerComponentBuilderFactory.java | 119 ------
.../src/generated/resources/metadata.json | 22 -
.../builder/endpoint/EndpointBuilderFactory.java | 1 -
.../camel/builder/endpoint/EndpointBuilders.java | 1 -
.../builder/endpoint/StaticEndpointBuilders.java | 45 --
.../endpoint/dsl/DozerEndpointBuilderFactory.java | 281 ------------
.../camel-component-known-dependencies.properties | 1 -
parent/pom.xml | 13 -
99 files changed, 12 insertions(+), 6293 deletions(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 3ec941fb81a..a6e58f09b80 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -686,11 +686,6 @@
<artifactId>camel-docker</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-dozer</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-drill</artifactId>
diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index a0943239696..5e85034a894 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -173,7 +173,6 @@
<djl-version>0.19.0</djl-version>
<dnsjava-version>3.5.1</dnsjava-version>
<docker-java-version>3.2.13</docker-java-version>
- <dozer-version>6.5.2</dozer-version>
<dropbox-version>5.4.4</dropbox-version>
<eddsa-version>0.3.0</eddsa-version>
<egit-github-core-version>2.1.5</egit-github-core-version>
diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml
index 123e61a36d0..12ee859a8e1 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -558,11 +558,6 @@
<artifactId>camel-docker</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-dozer</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-drill</artifactId>
@@ -1990,4 +1985,4 @@
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
index fe1b8342514..6ad2a105e1c 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
@@ -84,7 +84,6 @@ disruptor-vm
djl
dns
docker
-dozer
drill
dropbox
dynamic-router
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dozer.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dozer.json
deleted file mode 100644
index 1c8cf5442e2..00000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dozer.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "component": {
- "kind": "component",
- "name": "dozer",
- "title": "Dozer",
- "description": "Map between Java beans using the Dozer mapping library.",
- "deprecated": true,
- "firstVersion": "2.15.0",
- "label": "transformation",
- "javaType": "org.apache.camel.component.dozer.DozerComponent",
- "supportLevel": "Stable",
- "groupId": "org.apache.camel",
- "artifactId": "camel-dozer",
- "version": "3.21.0-SNAPSHOT",
- "scheme": "dozer",
- "extendsScheme": "",
- "syntax": "dozer:name",
- "async": false,
- "api": false,
- "consumerOnly": false,
- "producerOnly": true,
- "lenientProperties": false
- },
- "componentProperties": {
- "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
- "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...]
- },
- "properties": {
- "name": { "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "A human readable name of the mapping." },
- "mappingConfiguration": { "kind": "parameter", "displayName": "Mapping Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.converter.dozer.DozerBeanMapperConfiguration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "The name of a DozerBeanMapperConfiguration bean in the Camel re [...]
- "mappingFile": { "kind": "parameter", "displayName": "Mapping File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "dozerBeanMapping.xml", "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "The location of a Dozer configuration file. The file is loaded from the classpath by d [...]
- "marshalId": { "kind": "parameter", "displayName": "Marshal Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "The id of a dataFormat defined within the Camel Context to use for marshalling the mapping output to a non-Java type." },
- "sourceModel": { "kind": "parameter", "displayName": "Source Model", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "Fully-qualified class name for the source type used in the mapping. If specified, the input to the mapping is converted to the [...]
- "targetModel": { "kind": "parameter", "displayName": "Target Model", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "Fully-qualified class name for the target type used in the mapping." },
- "unmarshalId": { "kind": "parameter", "displayName": "Unmarshal Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "The id of a dataFormat defined within the Camel Context to use for unmarshalling the mapping input from a non-Java type." },
- "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may other [...]
- }
-}
diff --git a/components/camel-dozer/pom.xml b/components/camel-dozer/pom.xml
deleted file mode 100644
index 87085d2415b..00000000000
--- a/components/camel-dozer/pom.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>components</artifactId>
- <groupId>org.apache.camel</groupId>
- <version>3.21.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-dozer</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: Dozer (deprecated)</name>
- <description>Camel Support for the Dozer type conversion framework</description>
-
- <properties>
- </properties>
-
- <dependencies>
-
- <!-- requires camel-core -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-support</artifactId>
- </dependency>
- <dependency>
- <groupId>com.github.dozermapper</groupId>
- <artifactId>dozer-core</artifactId>
- </dependency>
-
- <!-- Expressions -->
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>javax.el-api</artifactId>
- <version>${javax-el-api-hibernate-validator-version}</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.el</artifactId>
- <version>${javax-el-api-hibernate-validator-version}</version>
- </dependency>
-
- <!-- Testing -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jaxb</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jackson</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/components/camel-dozer/src/generated/java/org/apache/camel/component/dozer/DozerComponentConfigurer.java b/components/camel-dozer/src/generated/java/org/apache/camel/component/dozer/DozerComponentConfigurer.java
deleted file mode 100644
index a639e606598..00000000000
--- a/components/camel-dozer/src/generated/java/org/apache/camel/component/dozer/DozerComponentConfigurer.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Generated by camel build tools - do NOT edit this file! */
-package org.apache.camel.component.dozer;
-
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
-import org.apache.camel.spi.PropertyConfigurerGetter;
-import org.apache.camel.spi.ConfigurerStrategy;
-import org.apache.camel.spi.GeneratedPropertyConfigurer;
-import org.apache.camel.util.CaseInsensitiveMap;
-import org.apache.camel.support.component.PropertyConfigurerSupport;
-
-/**
- * Generated by camel build tools - do NOT edit this file!
- */
-@SuppressWarnings("unchecked")
-public class DozerComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
-
- @Override
- public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
- DozerComponent target = (DozerComponent) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "autowiredenabled":
- case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
- case "lazystartproducer":
- case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
- default: return false;
- }
- }
-
- @Override
- public Class<?> getOptionType(String name, boolean ignoreCase) {
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "autowiredenabled":
- case "autowiredEnabled": return boolean.class;
- case "lazystartproducer":
- case "lazyStartProducer": return boolean.class;
- default: return null;
- }
- }
-
- @Override
- public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
- DozerComponent target = (DozerComponent) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "autowiredenabled":
- case "autowiredEnabled": return target.isAutowiredEnabled();
- case "lazystartproducer":
- case "lazyStartProducer": return target.isLazyStartProducer();
- default: return null;
- }
- }
-}
-
diff --git a/components/camel-dozer/src/generated/java/org/apache/camel/component/dozer/DozerEndpointConfigurer.java b/components/camel-dozer/src/generated/java/org/apache/camel/component/dozer/DozerEndpointConfigurer.java
deleted file mode 100644
index f626beeab76..00000000000
--- a/components/camel-dozer/src/generated/java/org/apache/camel/component/dozer/DozerEndpointConfigurer.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Generated by camel build tools - do NOT edit this file! */
-package org.apache.camel.component.dozer;
-
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
-import org.apache.camel.spi.PropertyConfigurerGetter;
-import org.apache.camel.spi.ConfigurerStrategy;
-import org.apache.camel.spi.GeneratedPropertyConfigurer;
-import org.apache.camel.util.CaseInsensitiveMap;
-import org.apache.camel.support.component.PropertyConfigurerSupport;
-
-/**
- * Generated by camel build tools - do NOT edit this file!
- */
-@SuppressWarnings("unchecked")
-public class DozerEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
-
- @Override
- public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
- DozerEndpoint target = (DozerEndpoint) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "lazystartproducer":
- case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
- case "mappingconfiguration":
- case "mappingConfiguration": target.getConfiguration().setMappingConfiguration(property(camelContext, org.apache.camel.converter.dozer.DozerBeanMapperConfiguration.class, value)); return true;
- case "mappingfile":
- case "mappingFile": target.getConfiguration().setMappingFile(property(camelContext, java.lang.String.class, value)); return true;
- case "marshalid":
- case "marshalId": target.getConfiguration().setMarshalId(property(camelContext, java.lang.String.class, value)); return true;
- case "sourcemodel":
- case "sourceModel": target.getConfiguration().setSourceModel(property(camelContext, java.lang.String.class, value)); return true;
- case "targetmodel":
- case "targetModel": target.getConfiguration().setTargetModel(property(camelContext, java.lang.String.class, value)); return true;
- case "unmarshalid":
- case "unmarshalId": target.getConfiguration().setUnmarshalId(property(camelContext, java.lang.String.class, value)); return true;
- default: return false;
- }
- }
-
- @Override
- public Class<?> getOptionType(String name, boolean ignoreCase) {
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "lazystartproducer":
- case "lazyStartProducer": return boolean.class;
- case "mappingconfiguration":
- case "mappingConfiguration": return org.apache.camel.converter.dozer.DozerBeanMapperConfiguration.class;
- case "mappingfile":
- case "mappingFile": return java.lang.String.class;
- case "marshalid":
- case "marshalId": return java.lang.String.class;
- case "sourcemodel":
- case "sourceModel": return java.lang.String.class;
- case "targetmodel":
- case "targetModel": return java.lang.String.class;
- case "unmarshalid":
- case "unmarshalId": return java.lang.String.class;
- default: return null;
- }
- }
-
- @Override
- public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
- DozerEndpoint target = (DozerEndpoint) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "lazystartproducer":
- case "lazyStartProducer": return target.isLazyStartProducer();
- case "mappingconfiguration":
- case "mappingConfiguration": return target.getConfiguration().getMappingConfiguration();
- case "mappingfile":
- case "mappingFile": return target.getConfiguration().getMappingFile();
- case "marshalid":
- case "marshalId": return target.getConfiguration().getMarshalId();
- case "sourcemodel":
- case "sourceModel": return target.getConfiguration().getSourceModel();
- case "targetmodel":
- case "targetModel": return target.getConfiguration().getTargetModel();
- case "unmarshalid":
- case "unmarshalId": return target.getConfiguration().getUnmarshalId();
- default: return null;
- }
- }
-}
-
diff --git a/components/camel-dozer/src/generated/java/org/apache/camel/component/dozer/DozerEndpointUriFactory.java b/components/camel-dozer/src/generated/java/org/apache/camel/component/dozer/DozerEndpointUriFactory.java
deleted file mode 100644
index 4e37a6c463c..00000000000
--- a/components/camel-dozer/src/generated/java/org/apache/camel/component/dozer/DozerEndpointUriFactory.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Generated by camel build tools - do NOT edit this file! */
-package org.apache.camel.component.dozer;
-
-import java.net.URISyntaxException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.camel.spi.EndpointUriFactory;
-
-/**
- * Generated by camel build tools - do NOT edit this file!
- */
-public class DozerEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {
-
- private static final String BASE = ":name";
-
- private static final Set<String> PROPERTY_NAMES;
- private static final Set<String> SECRET_PROPERTY_NAMES;
- private static final Set<String> MULTI_VALUE_PREFIXES;
- static {
- Set<String> props = new HashSet<>(8);
- props.add("lazyStartProducer");
- props.add("mappingConfiguration");
- props.add("mappingFile");
- props.add("marshalId");
- props.add("name");
- props.add("sourceModel");
- props.add("targetModel");
- props.add("unmarshalId");
- PROPERTY_NAMES = Collections.unmodifiableSet(props);
- SECRET_PROPERTY_NAMES = Collections.emptySet();
- MULTI_VALUE_PREFIXES = Collections.emptySet();
- }
-
- @Override
- public boolean isEnabled(String scheme) {
- return "dozer".equals(scheme);
- }
-
- @Override
- public String buildUri(String scheme, Map<String, Object> properties, boolean encode) throws URISyntaxException {
- String syntax = scheme + BASE;
- String uri = syntax;
-
- Map<String, Object> copy = new HashMap<>(properties);
-
- uri = buildPathParameter(syntax, uri, "name", null, true, copy);
- uri = buildQueryParameters(uri, copy, encode);
- return uri;
- }
-
- @Override
- public Set<String> propertyNames() {
- return PROPERTY_NAMES;
- }
-
- @Override
- public Set<String> secretPropertyNames() {
- return SECRET_PROPERTY_NAMES;
- }
-
- @Override
- public Set<String> multiValuePrefixes() {
- return MULTI_VALUE_PREFIXES;
- }
-
- @Override
- public boolean isLenientProperties() {
- return false;
- }
-}
-
diff --git a/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/component.properties
deleted file mode 100644
index e108ce12e01..00000000000
--- a/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/component.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-components=dozer
-groupId=org.apache.camel
-artifactId=camel-dozer
-version=3.21.0-SNAPSHOT
-projectName=Camel :: Dozer (deprecated)
-projectDescription=Camel Support for the Dozer type conversion framework
diff --git a/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/component/dozer b/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/component/dozer
deleted file mode 100644
index 75602054bb6..00000000000
--- a/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/component/dozer
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.dozer.DozerComponent
diff --git a/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/configurer/dozer-component b/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/configurer/dozer-component
deleted file mode 100644
index 1caefcd9ba6..00000000000
--- a/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/configurer/dozer-component
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.dozer.DozerComponentConfigurer
diff --git a/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/configurer/dozer-endpoint b/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/configurer/dozer-endpoint
deleted file mode 100644
index 5f742c31a6f..00000000000
--- a/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/configurer/dozer-endpoint
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.dozer.DozerEndpointConfigurer
diff --git a/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/urifactory/dozer-endpoint b/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/urifactory/dozer-endpoint
deleted file mode 100644
index 1ae00b5e8a4..00000000000
--- a/components/camel-dozer/src/generated/resources/META-INF/services/org/apache/camel/urifactory/dozer-endpoint
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.dozer.DozerEndpointUriFactory
diff --git a/components/camel-dozer/src/generated/resources/org/apache/camel/component/dozer/dozer.json b/components/camel-dozer/src/generated/resources/org/apache/camel/component/dozer/dozer.json
deleted file mode 100644
index 1c8cf5442e2..00000000000
--- a/components/camel-dozer/src/generated/resources/org/apache/camel/component/dozer/dozer.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "component": {
- "kind": "component",
- "name": "dozer",
- "title": "Dozer",
- "description": "Map between Java beans using the Dozer mapping library.",
- "deprecated": true,
- "firstVersion": "2.15.0",
- "label": "transformation",
- "javaType": "org.apache.camel.component.dozer.DozerComponent",
- "supportLevel": "Stable",
- "groupId": "org.apache.camel",
- "artifactId": "camel-dozer",
- "version": "3.21.0-SNAPSHOT",
- "scheme": "dozer",
- "extendsScheme": "",
- "syntax": "dozer:name",
- "async": false,
- "api": false,
- "consumerOnly": false,
- "producerOnly": true,
- "lenientProperties": false
- },
- "componentProperties": {
- "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
- "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...]
- },
- "properties": {
- "name": { "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "A human readable name of the mapping." },
- "mappingConfiguration": { "kind": "parameter", "displayName": "Mapping Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.converter.dozer.DozerBeanMapperConfiguration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "The name of a DozerBeanMapperConfiguration bean in the Camel re [...]
- "mappingFile": { "kind": "parameter", "displayName": "Mapping File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "dozerBeanMapping.xml", "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "The location of a Dozer configuration file. The file is loaded from the classpath by d [...]
- "marshalId": { "kind": "parameter", "displayName": "Marshal Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "The id of a dataFormat defined within the Camel Context to use for marshalling the mapping output to a non-Java type." },
- "sourceModel": { "kind": "parameter", "displayName": "Source Model", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "Fully-qualified class name for the source type used in the mapping. If specified, the input to the mapping is converted to the [...]
- "targetModel": { "kind": "parameter", "displayName": "Target Model", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "Fully-qualified class name for the target type used in the mapping." },
- "unmarshalId": { "kind": "parameter", "displayName": "Unmarshal Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dozer.DozerConfiguration", "configurationField": "configuration", "description": "The id of a dataFormat defined within the Camel Context to use for unmarshalling the mapping input from a non-Java type." },
- "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may other [...]
- }
-}
diff --git a/components/camel-dozer/src/main/docs/dozer-component.adoc b/components/camel-dozer/src/main/docs/dozer-component.adoc
deleted file mode 100644
index 8cb797ecf61..00000000000
--- a/components/camel-dozer/src/main/docs/dozer-component.adoc
+++ /dev/null
@@ -1,472 +0,0 @@
-= Dozer Component (deprecated)
-:doctitle: Dozer
-:shortname: dozer
-:artifactid: camel-dozer
-:description: Map between Java beans using the Dozer mapping library.
-:since: 2.15
-:supportlevel: Stable-deprecated
-:deprecated: *deprecated*
-:component-header: Only producer is supported
-//Manually maintained attributes
-:camel-spring-boot-name: dozer
-
-*Since Camel {since}*
-
-*{component-header}*
-
-The Dozer component provides the ability to map between Java beans
-using the http://camel.apache.org/dozer-type-conversion.html[Dozer]
-mapping framework. Camel also supports the ability
-to trigger Dozer mappings
-http://camel.apache.org/dozer-type-conversion.html[as a type converter].
- The primary differences between using a Dozer endpoint and a Dozer
-converter are:
-
-* The ability to manage Dozer mapping configuration on a per-endpoint
-basis vs. global configuration via the converter registry.
-* A Dozer endpoint can be configured to marshal/unmarshal input and
-output data using Camel data formats to support a single, any-to-any
-transformation endpoint
-* The Dozer component allows for fine-grained integration and extension
-of Dozer to support additional functionality (e.g. mapping literal
-values, using expressions for mappings, etc.).
-
-In order to use the Dozer component, Maven users will need to add the
-following dependency to their `pom.xml`:
-
-[source,xml]
-------------------------------------------------------------
-<dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-dozer</artifactId>
- <version>x.x.x</version>
- <!-- use the same version as your Camel core version -->
-</dependency>
-------------------------------------------------------------
-
-== URI format
-
-The Dozer component only supports producer endpoints.
-
---------------------------
-dozer:endpointId[?options]
---------------------------
-
-Where *endpointId* is a name used to uniquely identify the Dozer
-endpoint configuration.
-
-An example Dozer endpoint URI:
-
-[source,java]
----------------------------------------------------------------------------------------
-from("direct:orderInput").
- to("dozer:transformOrder?mappingFile=orderMapping.xml&targetModel=example.XYZOrder").
- to("direct:orderOutput");
----------------------------------------------------------------------------------------
-
-== Options
-
-// component-configure options: START
-
-// component-configure options: END
-
-// component options: START
-include::partial$component-configure-options.adoc[]
-include::partial$component-endpoint-options.adoc[]
-// component options: END
-
-// endpoint options: START
-
-// endpoint options: END
-
-
-== Using Data Formats with Dozer
-
-Dozer does not support non-Java sources and targets for mappings, so it
-cannot, for example, map an XML document to a Java object on its own.
- Luckily, Camel has extensive support for marshalling between Java and a
-wide variety of formats using
-http://camel.apache.org/data-format.html[data formats]. The Dozer
-component takes advantage of this support by allowing you to specify
-that input and output data should be passed through a data format prior
-to processing via Dozer. You can always do this on your own outside the
-call to Dozer, but supporting it directly in the Dozer component allows
-you to use a single endpoints to configure any-to-any transformation
-within Camel.
-
-As an example, let's say you wanted to map between an XML data structure
-and a JSON data structure using the Dozer component. If you had the
-following data formats defined in a Camel Context:
-
-[source,xml]
------------------------------------------------
-<dataFormats>
- <json library="Jackson" id="myjson"/>
- <jaxb contextPath="org.example" id="myjaxb"/>
-</dataFormats>
------------------------------------------------
-
-You could then configure a Dozer endpoint to unmarshal the input XML
-using a JAXB data format and marshal the mapping output using Jackson.
-
-[source,xml]
-----------------------------------------------------------------------------------------------------------
-<endpoint uri="dozer:xml2json?marshalId=myjson&unmarshalId=myjaxb&targetModel=org.example.Order"/>
-----------------------------------------------------------------------------------------------------------
-
-== Configuring Dozer
-
-All Dozer endpoints require a Dozer mapping configuration file which
-defines mappings between source and target objects. The component will
-default to a location of META-INF/dozerBeanMapping.xml if the
-mappingFile or mappingConfiguration options are not specified on an
-endpoint. If you need to supply multiple mapping configuration files
-for a single endpoint or specify additional configuration options (e.g.
-event listeners, custom converters, etc.), then you can use an instance
-of `org.apache.camel.converter.dozer.DozerBeanMapperConfiguration`.
-
-[source,xml]
-------------------------------------------------------------------------------------------
-<bean id="mapper" class="org.apache.camel.converter.dozer.DozerBeanMapperConfiguration">
- <property name="mappingFiles">
- <list>
- <value>mapping1.xml</value>
- <value>mapping2.xml</value>
- </list>
- </property>
-</bean>
-------------------------------------------------------------------------------------------
-
-== Mapping Extensions
-
-The Dozer component implements a number of extensions to the Dozer
-mapping framework as custom converters. These converters implement
-mapping functions that are not supported directly by Dozer itself.
-
-=== Variable Mappings
-
-Variable mappings allow you to map the value of a variable definition
-within a Dozer configuration into a target field instead of using the
-value of a source field. This is equivalent to constant mapping in
-other mapping frameworks, where can you assign a literal value to a
-target field. To use a variable mapping, simply define a variable
-within your mapping configuration and then map from the VariableMapper
-class into your target field of choice:
-
-[source,xml]
---------------------------------------------------------------------------------------------------------
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
- <configuration>
- <variables>
- <variable name="CUST_ID">ACME-SALES</variable>
- </variables>
- </configuration>
- <mapping>
- <class-a>org.apache.camel.component.dozer.VariableMapper</class-a>
- <class-b>org.example.Order</class-b>
- <field custom-converter-id="_variableMapping" custom-converter-param="${CUST_ID}">
- <a>literal</a>
- <b>custId</b>
- </field>
- </mapping>
-</mappings>
---------------------------------------------------------------------------------------------------------
-
-=== Custom Mappings
-
-Custom mappings allow you to define your own logic for how a source
-field is mapped to a target field. They are similar in function to
-Dozer customer converters, with two notable differences:
-
-* You can have multiple converter methods in a single class with custom
-mappings.
-* There is no requirement to implement a Dozer-specific interface with
-custom mappings.
-
-A custom mapping is declared by using the built-in '_customMapping'
-converter in your mapping configuration. The parameter to this
-converter has the following syntax:
-
---------------------------
-[class-name][,method-name]
---------------------------
-
-Method name is optional - the Dozer component will search for a method
-that matches the input and output types required for a mapping. An
-example custom mapping and configuration are provided below.
-
-[source,java]
---------------------------------------------------
-public class CustomMapper {
- // All customer ids must be wrapped in "[ ]"
- public Object mapCustomer(String customerId) {
- return "[" + customerId + "]";
- }
-}
---------------------------------------------------
-
-[source,xml]
---------------------------------------------------------------------------------------------------------
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
- <mapping>
- <class-a>org.example.A</class-a>
- <class-b>org.example.B</class-b>
- <field custom-converter-id="_customMapping"
- custom-converter-param="org.example.CustomMapper,mapCustomer">
- <a>header.customerNum</a>
- <b>custId</b>
- </field>
- </mapping>
-</mappings>
---------------------------------------------------------------------------------------------------------
-
-=== Expression Mappings
-
-Expression mappings allow you to use the powerful
-http://camel.apache.org/languages.html[language] capabilities of Camel
-to evaluate an expression and assign the result to a target field in a
-mapping. Any language that Camel supports can be used in an expression
-mapping. Basic examples of expressions include the ability to map a
-Camel message header or exchange property to a target field or to
-concatenate multiple source fields into a target field. The syntax of a
-mapping expression is:
-
-[source,shell]
------------------------
-[language]:[expression]
------------------------
-
-An example of mapping a message header into a target field:
-
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
- <mapping>
- <class-a>org.apache.camel.component.dozer.ExpressionMapper</class-a>
- <class-b>org.example.B</class-b>
- <field custom-converter-id="_expressionMapping" custom-converter-param="simple:${header.customerNumber}">
- <a>expression</a>
- <b>custId</b>
- </field>
- </mapping>
-</mappings>
---------------------------------------------------------------------------------------------------------------
-
-Note that any properties within your expression must be escaped with "\"
-to prevent an error when Dozer attempts to resolve variable values
-defined using the EL.
-
-== Dozer Type Conversion
-
-WARNING: The dozer type conversion is deprecated. Do not use.
-
-https://github.com/DozerMapper/dozer/blob/master/docs/asciidoc/about/about.adoc[Dozer] is a fast
-and flexible framework for mapping back and forth between Java Beans.
-Coupled with Camel's automatic type conversion, it's a formidable tool
-for dealing object to object mapping headaches that crop up in
-enterprise integration projects.
-
-To explain how Dozer can be used within Camel we'll use the following
-example of a simple Customer Support Service. The initial version of the
-Service defined a 'Customer' object used with a very flat structure.
-
-*Legacy Customer Service Class*
-
-[source,java]
------------------------------------------------------------------------------------
-public class Customer {
- private String firstName;
- private String lastName;
- private String street;
- private String zip;
-
- public Customer() {}
-
- public Customer(String firstName, String lastName, String zip, String street) {
- this.firstName = firstName;
- this.lastName = lastName;
- this.zip = zip;
- this.street = street;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- ... getters and setters for each field
------------------------------------------------------------------------------------
-
-In the next version it was decided to structure the data better in the
-model by moving the address data into its own type, with the resulting
-domain object ending up looking like the below.
-
-*Next Gen Customer object*
-
-[source,java]
--------------------------------------------------------------------------
-public class Customer {
- private String firstName;
- private String lastName;
- private Address address;
-
- public Customer() {}
-
- public Customer(String firstName, String lastName, Address address) {
- this.firstName = firstName;
- this.lastName = lastName;
- this.address = address;
- }
- ....
-
-
-public class Address {
- private String zipCode;
- private String streetName;
-
- public Address() {}
-
- public Address(String zipCode, String streetName) {
- this.zipCode = zipCode;
- this.streetName = streetName;
- }
--------------------------------------------------------------------------
-
-Much nicer! But as often occurs, the previous version of the service,
-with the old flat 'Customer' object, was in production with a client and
-the project must support the legacy interface. To support both versions,
-we must add a mechanism to convert between the old Customer service type
-and the new Customer domain type and back again. It would be a simple
-matter to write a custom converter class to map between them, but this
-may not be the only service/domain inconsistency and these tedious and
-error prone custom mappings could quickly start to add up, and bugs with
-them.
-
-To a large extent the two objects share an identical structure, with only
-the address representation being different. It would be very helpful if
-there were a practical way to automate this kind of mapping, such
-that the similar properties could get mapped automatically and only the
-inconsistencies requiring custom mapping.
-
-This is where Dozer comes in; it uses reflection to map data between two
-bean types using a set of simple mapping rules. Where no rule is
-specified, Dozer will attempt to map between them by using matching
-properties of two beans. In this way, focus can be given to the
-inconsistencies between the beans i.e. the address properties, knowing
-that Dozer will automatically match and convert the others.
-
-=== Configuring Dozer Type Converter
-
-Dozer's configuration is extremely flexible and many mapping scenarios
-are covered https://github.com/DozerMapper/dozer/blob/master/docs/asciidoc/documentation/mappings.adoc[here].
-For our simple example, the configuration looks like the following.
-
-*mapping.xml*
-
-[source,xml]
----------------------------------------------------------------------------------------------------------
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
- <mapping>
- <class-a>org.apache.camel.converter.dozer.service.Customer</class-a>
- <class-b>org.apache.camel.converter.dozer.model.Customer</class-b>
- <field>
- <a>street</a>
- <b>address.streetName</b>
- </field>
- <field>
- <a>zip</a>
- <b>address.zipCode</b>
- </field>
- </mapping>
-</mappings>
----------------------------------------------------------------------------------------------------------
-
-=== Support for Dozer in Camel Type Converter
-
-Camel provides a simple mechanism to integrate Dozer Mappers with it's
-own powerful xref:manual::type-converter.adoc[Type Conversion] framework.
-Its configured by creating an instance of `DozerTypeConverterLoader`
-providing it the camel context and an optional Dozer mapper.
-
-If no mapper is supplied, Camel's registry will
-be searched for suitable instances. The loader will query the Dozer
-Mapper for the types it converts and register them with Camel's
-type conversion framework to be handled by the mapper.
-
-[NOTE]
-====
-*Limitation*
-
-The Camel Dozer type converter does not support having the same type
-conversion pairs in different mapping ids (eg map-id) in Dozer.
-====
-
-In Java it can be configured as follows:
-
-[source,java]
------------------------------------------------------------------------------------------
-Mapper mapper = DozerBeanMapperBuilder.create()
- .withMappingFiles("mapping.xml")
- .build();
-
-new DozerTypeConverterLoader(camelContext, mapper);
------------------------------------------------------------------------------------------
-
-Or in Spring XML:
-
-[source,xml]
---------------------------------------------------------------------------------------------------
-<bean id="dozerConverterLoader" class="org.apache.camel.converter.dozer.DozerTypeConverterLoader">
- <argument index="0" ref="myCamel"/>
- <argument index="1" ref="mapperConfiguration"/>
-</bean>
-
-<bean id="mapperConfiguration" class="org.apache.camel.converter.dozer.DozerBeanMapperConfiguration">
- <property name="mappingFiles">
- <list>
- <value>mapping.xml</value>
- </list>
- </property>
-</bean>
-
-<camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring">
- ...
-</camelContext>
---------------------------------------------------------------------------------------------------
-
-Now, where necessary, Camel will use Dozer to do conversions; in our
-case between the new domain and legacy Customer types e.g.
-
-[source,java]
----------------------------------------------------------------------------------------------------------------------------------------------
-// given the following route
-from("direct:legacy-service-in").bean(new CustomerProcessor());
-
-// and a processor
-
-public class CustomerProcessor {
-
- public Customer processCustomer(org.apache.camel.converter.dozer.model.Customer customer) {
- ...
- }
-}
-
-// service objects can be sent to the processor and automagically converted by Camel & Dozer
-template.sendBody("direct:legacy-service-in", new org.apache.camel.converter.dozer.service.Customer("Bob", "Roberts", "12345", "1 Main st."));
----------------------------------------------------------------------------------------------------------------------------------------------
-
-
-
-
-include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/BaseConverter.java b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/BaseConverter.java
deleted file mode 100644
index c99c7b1d8a9..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/BaseConverter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.component.dozer;
-
-import com.github.dozermapper.core.ConfigurableCustomConverter;
-
-/**
- * Configurable converters in Dozer are not thread-safe if a single converter instance is used. One thread could step on
- * the parameter being used by another thread since setParameter() is called first and convert() is called separately.
- * This implementation holds a copy of the parameter in thread-local storage which eliminates the possibility of
- * collision between threads on a single converter instance.
- *
- * Any converter which is referenced by ID with the Dozer component should extend this class. It is recommended to call
- * done() in a finally block in the implementation of convert() to clean up the value stored in the thread local.
- */
-public abstract class BaseConverter implements ConfigurableCustomConverter {
-
- private ThreadLocal<String> localParameter = new ThreadLocal<>();
-
- @Override
- public void setParameter(String parameter) {
- localParameter.set(parameter);
- }
-
- public void done() {
- localParameter.set(null);
- }
-
- public String getParameter() {
- return localParameter.get();
- }
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/CustomMapper.java b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/CustomMapper.java
deleted file mode 100644
index 763a48ed5dc..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/CustomMapper.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * 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.component.dozer;
-
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.spi.ClassResolver;
-
-/**
- * Allows a user to customize a field mapping using a POJO that is not required to extend/implement Dozer-specific
- * classes.
- */
-public class CustomMapper extends BaseConverter {
-
- private ClassResolver resolver;
-
- public CustomMapper(ClassResolver resolver) {
- this.resolver = resolver;
- }
-
- @Override
- public Object convert(
- Object existingDestinationFieldValue,
- Object sourceFieldValue,
- Class<?> destinationClass,
- Class<?> sourceClass) {
- try {
- return mapCustom(sourceFieldValue, sourceClass);
- } finally {
- done();
- }
- }
-
- private Object invokeFunction(
- Method method,
- Object customObj,
- Object source,
- String[][] parameters)
- throws Exception {
- Class<?>[] prmTypes = method.getParameterTypes();
- Object[] methodPrms = new Object[prmTypes.length];
- methodPrms[0] = source;
- for (int parameterNdx = 0, methodPrmNdx = 1; parameterNdx < parameters.length; parameterNdx++, methodPrmNdx++) {
- if (method.isVarArgs() && methodPrmNdx == prmTypes.length - 1) {
- Object array = Array.newInstance(prmTypes[methodPrmNdx].getComponentType(), parameters.length - parameterNdx);
- for (int arrayNdx = 0; parameterNdx < parameters.length; parameterNdx++, arrayNdx++) {
- String[] parts = parameters[parameterNdx];
- Array.set(array, arrayNdx,
- resolver.resolveClass(parts[0]).getConstructor(String.class).newInstance(parts[1]));
- }
- methodPrms[methodPrmNdx] = array;
- } else {
- String[] parts = parameters[parameterNdx];
- methodPrms[methodPrmNdx] = resolver.resolveClass(parts[0]).getConstructor(String.class).newInstance(parts[1]);
- }
- }
- return method.invoke(customObj, methodPrms);
- }
-
- Object mapCustom(Object source, Class<?> sourceClass) {
- // The converter parameter is stored in a thread local variable, so
- // we need to parse the parameter on each invocation
- // ex: custom-converter-param="org.example.MyMapping,map"
- // className = org.example.MyMapping
- // operation = map
- String[] prms = getParameter().split(",");
- String className = prms[0];
- String operation = prms.length > 1 ? prms[1] : null;
-
- // now attempt to process any additional parameters passed along
- // ex: custom-converter-param="org.example.MyMapping,substring,java.lang.Integer=3,java.lang.Integer=10"
- // className = org.example.MyMapping
- // operation = substring
- // parameters = ["java.lang.Integer=3","java.lang.Integer=10"]
- String[][] prmTypesAndValues;
- if (prms.length > 2) {
- // Break parameters down into types and values
- prmTypesAndValues = new String[prms.length - 2][2];
- for (int ndx = 0; ndx < prmTypesAndValues.length; ndx++) {
- String prm = prms[ndx + 2];
- String[] parts = prm.split("=");
- if (parts.length != 2) {
- throw new RuntimeCamelException("Value missing for parameter " + prm);
- }
- prmTypesAndValues[ndx][0] = parts[0];
- prmTypesAndValues[ndx][1] = parts[1];
- }
- } else {
- prmTypesAndValues = null;
- }
-
- Object customObj;
- Method method;
- try {
- Class<?> customClass = resolver.resolveMandatoryClass(className);
- customObj = customClass.newInstance();
-
- // If a specific mapping operation has been supplied use that
- if (operation != null && prmTypesAndValues != null) {
- method = selectMethod(customClass, operation, sourceClass, prmTypesAndValues);
- } else if (operation != null) {
- method = customClass.getMethod(operation, sourceClass);
- } else {
- method = selectMethod(customClass, sourceClass);
- }
- } catch (Exception e) {
- throw new RuntimeCamelException("Failed to load custom function", e);
- }
-
- // Verify that we found a matching method
- if (method == null) {
- throw new RuntimeCamelException("No eligible custom function methods in " + className);
- }
-
- // Invoke the custom mapping method
- try {
- if (prmTypesAndValues != null) {
- return invokeFunction(method, customObj, source, prmTypesAndValues);
- } else {
- return method.invoke(customObj, source);
- }
- } catch (Exception e) {
- throw new RuntimeCamelException("Error while invoking custom function", e);
- }
- }
-
- private boolean parametersMatchParameterList(
- Class<?>[] prmTypes,
- String[][] parameters) {
- int ndx = 0;
- while (ndx < prmTypes.length) {
- Class<?> prmType = prmTypes[ndx];
- if (ndx >= parameters.length) {
- return ndx == prmTypes.length - 1 && prmType.isArray();
- }
- if (ndx == prmTypes.length - 1 && prmType.isArray()) { // Assume this only occurs for functions with var args
- Class<?> varArgClass = prmType.getComponentType();
- while (ndx < parameters.length) {
- Class<?> prmClass = resolver.resolveClass(parameters[ndx][0]);
- if (!varArgClass.isAssignableFrom(prmClass)) {
- return false;
- }
- ndx++;
- }
- } else {
- Class<?> prmClass = resolver.resolveClass(parameters[ndx][0]);
- if (!prmTypes[ndx].isAssignableFrom(prmClass)) {
- return false;
- }
- }
- ndx++;
- }
- return true;
- }
-
- Method selectMethod(
- Class<?> customClass,
- Class<?> sourceClass) {
- Method method = null;
- for (Method m : customClass.getDeclaredMethods()) {
- if (m.getReturnType() != null
- && m.getParameterTypes().length == 1
- && m.getParameterTypes()[0].isAssignableFrom(sourceClass)) {
- method = m;
- break;
- }
- }
- return method;
- }
-
- // Assumes source is a separate parameter in method even if it has var args and that there are no
- // ambiguous calls based upon number and types of parameters
- private Method selectMethod(
- Class<?> customClass,
- String operation,
- Class<?> sourceClass,
- String[][] parameters) {
- // Create list of potential methods
- List<Method> methods = new ArrayList<>();
- for (Method method : customClass.getDeclaredMethods()) {
- methods.add(method);
- }
-
- // Remove methods that are not applicable
- for (Iterator<Method> iter = methods.iterator(); iter.hasNext();) {
- Method method = iter.next();
- Class<?>[] prmTypes = method.getParameterTypes();
- if (!method.getName().equals(operation)
- || method.getReturnType() == null
- || !prmTypes[0].isAssignableFrom(sourceClass)) {
- iter.remove();
- continue;
- }
- prmTypes = Arrays.copyOfRange(prmTypes, 1, prmTypes.length); // Remove source from type list
- if (!method.isVarArgs() && prmTypes.length != parameters.length) {
- iter.remove();
- continue;
- }
- if (!parametersMatchParameterList(prmTypes, parameters)) {
- iter.remove();
- continue;
- }
- }
-
- // If more than one method is applicable, return the method whose prm list exactly matches the parameters
- // if possible
- if (methods.size() > 1) {
- for (Method method : methods) {
- if (!method.isVarArgs()) {
- return method;
- }
- }
- }
-
- return !methods.isEmpty() ? methods.get(0) : null;
- }
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerComponent.java b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerComponent.java
deleted file mode 100644
index 9577d6888f4..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerComponent.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.component.dozer;
-
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Endpoint;
-import org.apache.camel.converter.dozer.DozerBeanMapperConfiguration;
-import org.apache.camel.spi.annotations.Component;
-import org.apache.camel.support.DefaultComponent;
-
-@Component("dozer")
-@Deprecated
-public class DozerComponent extends DefaultComponent {
-
- public DozerComponent() {
- }
-
- public DozerComponent(CamelContext context) {
- super(context);
- }
-
- @Override
- protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
- DozerConfiguration config = new DozerConfiguration();
- config.setName(remaining);
- config.setMappingConfiguration(getAndRemoveOrResolveReferenceParameter(
- parameters, "mappingConfiguration", DozerBeanMapperConfiguration.class));
-
- DozerEndpoint answer = new DozerEndpoint(uri, this, config);
- answer.setConfiguration(config);
- setProperties(answer, parameters);
- return answer;
- }
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerConfiguration.java b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerConfiguration.java
deleted file mode 100644
index 9e2e0b3fb5b..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerConfiguration.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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.component.dozer;
-
-import org.apache.camel.converter.dozer.DozerBeanMapperConfiguration;
-import org.apache.camel.spi.Metadata;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.spi.UriParams;
-import org.apache.camel.spi.UriPath;
-
-import static com.github.dozermapper.core.util.DozerConstants.DEFAULT_MAPPING_FILE;
-
-/**
- * Configuration used for a Dozer endpoint.
- */
-@UriParams
-public class DozerConfiguration {
-
- @UriPath
- @Metadata(required = true)
- private String name;
- @UriParam
- private String marshalId;
- @UriParam
- private String unmarshalId;
- @UriParam
- private String sourceModel;
- @UriParam
- @Metadata(required = true)
- private String targetModel;
- @UriParam(defaultValue = DEFAULT_MAPPING_FILE)
- private String mappingFile;
- @UriParam
- private DozerBeanMapperConfiguration mappingConfiguration;
-
- public DozerConfiguration() {
- setMappingFile(DEFAULT_MAPPING_FILE);
- }
-
- public String getMarshalId() {
- return marshalId;
- }
-
- /**
- * The id of a dataFormat defined within the Camel Context to use for marshalling the mapping output to a non-Java
- * type.
- */
- public void setMarshalId(String marshalId) {
- this.marshalId = marshalId;
- }
-
- public String getUnmarshalId() {
- return unmarshalId;
- }
-
- /**
- * The id of a dataFormat defined within the Camel Context to use for unmarshalling the mapping input from a
- * non-Java type.
- */
- public void setUnmarshalId(String unmarshalId) {
- this.unmarshalId = unmarshalId;
- }
-
- public String getSourceModel() {
- return sourceModel;
- }
-
- /**
- * 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.
- */
- public void setSourceModel(String sourceModel) {
- this.sourceModel = sourceModel;
- }
-
- public String getTargetModel() {
- return targetModel;
- }
-
- /**
- * Fully-qualified class name for the target type used in the mapping.
- */
- public void setTargetModel(String targetModel) {
- this.targetModel = targetModel;
- }
-
- public String getName() {
- return name;
- }
-
- /**
- * A human readable name of the mapping.
- */
- public void setName(String name) {
- this.name = name;
- }
-
- public String getMappingFile() {
- return mappingFile;
- }
-
- /**
- * 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.
- */
- public void setMappingFile(String mappingFile) {
- this.mappingFile = mappingFile;
- }
-
- public DozerBeanMapperConfiguration getMappingConfiguration() {
- return mappingConfiguration;
- }
-
- /**
- * 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").
- */
- public void setMappingConfiguration(DozerBeanMapperConfiguration mappingConfiguration) {
- this.mappingConfiguration = mappingConfiguration;
- }
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
deleted file mode 100644
index b6c8f3013b0..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * 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.component.dozer;
-
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.github.dozermapper.core.CustomConverter;
-import com.github.dozermapper.core.Mapper;
-import org.apache.camel.Category;
-import org.apache.camel.Component;
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.converter.dozer.DozerBeanMapperConfiguration;
-import org.apache.camel.converter.dozer.MapperFactory;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.support.DefaultEndpoint;
-import org.apache.camel.support.ResourceHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Map between Java beans using the Dozer mapping library.
- */
-@UriEndpoint(firstVersion = "2.15.0", scheme = "dozer", title = "Dozer", syntax = "dozer:name", producerOnly = true,
- category = { Category.TRANSFORMATION })
-public class DozerEndpoint extends DefaultEndpoint {
-
- private static final Logger LOG = LoggerFactory.getLogger(DozerEndpoint.class);
-
- // IDs for built-in custom converters used with the Dozer component
- private static final String CUSTOM_MAPPING_ID = "_customMapping";
- private static final String VARIABLE_MAPPING_ID = "_variableMapping";
- private static final String EXPRESSION_MAPPING_ID = "_expressionMapping";
-
- private Mapper mapper;
- private VariableMapper variableMapper;
- private CustomMapper customMapper;
- private ExpressionMapper expressionMapper;
-
- @UriParam
- private DozerConfiguration configuration;
-
- public DozerEndpoint(String endpointUri, Component component, DozerConfiguration configuration) {
- super(endpointUri, component);
- this.configuration = configuration;
- variableMapper = new VariableMapper();
- customMapper = new CustomMapper(getCamelContext().getClassResolver());
- expressionMapper = new ExpressionMapper();
- }
-
- @Override
- public Producer createProducer() throws Exception {
- return new DozerProducer(this);
- }
-
- @Override
- public Consumer createConsumer(Processor processor) throws Exception {
- throw new UnsupportedOperationException("Consumer not supported for Dozer endpoints");
- }
-
- public Mapper getMapper() {
- return mapper;
- }
-
- public DozerConfiguration getConfiguration() {
- return configuration;
- }
-
- public void setConfiguration(DozerConfiguration configuration) {
- this.configuration = configuration;
- }
-
- CustomMapper getCustomMapper() {
- return customMapper;
- }
-
- VariableMapper getVariableMapper() {
- return variableMapper;
- }
-
- ExpressionMapper getExpressionMapper() {
- return expressionMapper;
- }
-
- @Override
- protected void doInit() throws Exception {
- super.doInit();
-
- initDozerBeanContainerAndMapper();
- }
-
- @Override
- protected void doStop() throws Exception {
- super.doStop();
- // noop
- }
-
- protected void initDozerBeanContainerAndMapper() throws Exception {
- LOG.info("Configuring {}...", Mapper.class.getName());
-
- // Validate endpoint parameters
- if (configuration.getTargetModel() == null) {
- throw new IllegalArgumentException("The targetModel parameter is required for dozer endpoints");
- }
-
- if (mapper == null) {
- if (configuration.getMappingConfiguration() == null) {
- URL url = ResourceHelper.resolveMandatoryResourceAsUrl(getCamelContext(),
- configuration.getMappingFile());
-
- DozerBeanMapperConfiguration config = new DozerBeanMapperConfiguration();
- config.setCustomConvertersWithId(getCustomConvertersWithId());
- config.setMappingFiles(Arrays.asList(url.toString()));
-
- configuration.setMappingConfiguration(config);
- } else {
- DozerBeanMapperConfiguration config = configuration.getMappingConfiguration();
- if (config.getCustomConvertersWithId() == null) {
- config.setCustomConvertersWithId(getCustomConvertersWithId());
- } else {
- config.getCustomConvertersWithId().putAll(getCustomConvertersWithId());
- }
-
- // if bean mapping builders have been defined skip loading the "default" mapping file.
- if (isNullOrEmpty(configuration.getMappingConfiguration().getBeanMappingBuilders())) {
- if (config.getMappingFiles() == null || config.getMappingFiles().isEmpty()) {
- URL url = ResourceHelper.resolveMandatoryResourceAsUrl(getCamelContext(),
- configuration.getMappingFile());
- config.setMappingFiles(Arrays.asList(url.toString()));
- }
- }
- }
-
- MapperFactory factory = new MapperFactory(getCamelContext(), configuration.getMappingConfiguration());
- mapper = factory.create();
- }
- }
-
- private static boolean isNullOrEmpty(final Collection<?> collection) {
- return null == collection || collection.isEmpty();
- }
-
- private Map<String, CustomConverter> getCustomConvertersWithId() {
- Map<String, CustomConverter> customConvertersWithId = new HashMap<>();
- customConvertersWithId.put(CUSTOM_MAPPING_ID, customMapper);
- customConvertersWithId.put(VARIABLE_MAPPING_ID, variableMapper);
- customConvertersWithId.put(EXPRESSION_MAPPING_ID, expressionMapper);
-
- return customConvertersWithId;
- }
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerProducer.java b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerProducer.java
deleted file mode 100644
index 6329be529bb..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerProducer.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * 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.component.dozer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.spi.DataFormat;
-import org.apache.camel.support.DefaultProducer;
-import org.apache.camel.support.processor.MarshalProcessor;
-import org.apache.camel.support.processor.UnmarshalProcessor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Producer class for Dozer endpoints.
- */
-public class DozerProducer extends DefaultProducer {
-
- private static final Logger LOG = LoggerFactory.getLogger(DozerProducer.class);
-
- private DozerEndpoint endpoint;
- private UnmarshalProcessor unmarshaller;
- private MarshalProcessor marshaller;
-
- /**
- * Create a new producer for dozer endpoints.
- *
- * @param endpoint endpoint requiring a producer
- */
- public DozerProducer(DozerEndpoint endpoint) {
- super(endpoint);
- this.endpoint = endpoint;
- }
-
- @Override
- public void process(Exchange exchange) throws Exception {
- // Unmarshal the source content only if an unmarshaller is configured.
- String unmarshalId = endpoint.getConfiguration().getUnmarshalId();
- if (unmarshalId != null) {
- LOG.debug("Unmarshalling input data using data format '{}'.", unmarshalId);
- resolveUnmarshaller(exchange, unmarshalId).process(exchange);
- if (exchange.getException() != null) {
- throw exchange.getException();
- }
- }
-
- // Load the target model class
- Class<?> targetModel = endpoint.getCamelContext().getClassResolver().resolveMandatoryClass(
- endpoint.getConfiguration().getTargetModel());
-
- // If an unmarshaller was used, the unmarshalled message is the OUT message.
- Message msg = exchange.getMessage();
-
- // Convert to source model, if specified
- String sourceType = endpoint.getConfiguration().getSourceModel();
- if (sourceType != null) {
- LOG.debug("Converting to source model {}.", sourceType);
- Class<?> sourceModel = endpoint.getCamelContext()
- .getClassResolver().resolveClass(sourceType);
- if (sourceModel == null) {
- throw new Exception("Unable to load sourceModel class: " + sourceType);
- }
- msg.setBody(msg.getBody(sourceModel));
- }
-
- // Perform mappings
- LOG.debug("Mapping to target model {}.", targetModel.getName());
- Object targetObject = endpoint.getMapper().map(msg.getBody(), targetModel);
- // Second pass to process literal mappings
- endpoint.getMapper().map(endpoint.getVariableMapper(), targetObject);
- // Third pass to process expression mappings
- try {
- endpoint.getExpressionMapper().setCurrentExchange(exchange);
- endpoint.getMapper().map(endpoint.getExpressionMapper(), targetObject);
- } finally {
- // Clear out the exchange reference on the expression mapper
- endpoint.getExpressionMapper().setCurrentExchange(null);
- }
- msg.setBody(targetObject);
- exchange.setIn(msg);
-
- // Marshal the source content only if a marshaller is configured.
- String marshalId = endpoint.getConfiguration().getMarshalId();
- if (marshalId != null) {
- LOG.debug("Marshalling output data using data format '{}'.", marshalId);
- resolveMarshaller(exchange, marshalId).process(exchange);
- if (exchange.getException() != null) {
- throw exchange.getException();
- }
- }
- }
-
- @Override
- protected void doStop() throws Exception {
- super.doStop();
- if (unmarshaller != null) {
- unmarshaller.stop();
- }
- if (marshaller != null) {
- marshaller.stop();
- }
- }
-
- @Override
- protected void doShutdown() throws Exception {
- super.doShutdown();
- if (unmarshaller != null) {
- unmarshaller.shutdown();
- }
- if (marshaller != null) {
- marshaller.shutdown();
- }
- }
-
- /**
- * Find and configure an unmarshaller for the specified data format.
- */
- private synchronized UnmarshalProcessor resolveUnmarshaller(
- Exchange exchange, String dataFormatId)
- throws Exception {
-
- if (unmarshaller == null) {
- DataFormat dataFormat = exchange.getContext().resolveDataFormat(dataFormatId);
- if (dataFormat == null) {
- throw new Exception("Unable to resolve data format for unmarshalling: " + dataFormatId);
- }
-
- // Wrap the data format in a processor and start/configure it.
- // Stop/shutdown is handled when the corresponding methods are
- // called on this producer.
- unmarshaller = new UnmarshalProcessor(dataFormat);
- unmarshaller.setCamelContext(exchange.getContext());
- unmarshaller.start();
- }
- return unmarshaller;
- }
-
- /**
- * Find and configure an unmarshaller for the specified data format.
- */
- private synchronized MarshalProcessor resolveMarshaller(
- Exchange exchange, String dataFormatId)
- throws Exception {
-
- if (marshaller == null) {
- DataFormat dataFormat = exchange.getContext().resolveDataFormat(dataFormatId);
- if (dataFormat == null) {
- throw new Exception("Unable to resolve data format for marshalling: " + dataFormatId);
- }
-
- // Wrap the data format in a processor and start/configure it.
- // Stop/shutdown is handled when the corresponding methods are
- // called on this producer.
- marshaller = new MarshalProcessor(dataFormat);
- marshaller.setCamelContext(exchange.getContext());
- marshaller.start();
- }
- return marshaller;
- }
-
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/ExpressionMapper.java b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/ExpressionMapper.java
deleted file mode 100644
index 704dd305fbb..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/ExpressionMapper.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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.component.dozer;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Expression;
-import org.apache.camel.spi.Language;
-import org.apache.camel.support.ResourceHelper;
-import org.apache.camel.util.IOHelper;
-
-/**
- * Provides support for mapping a Camel expression to a target field in a mapping. Expressions have the following
- * format: <br>
- * <br>
- * [language]:[expression] <br>
- * <br>
- */
-public class ExpressionMapper extends BaseConverter {
-
- private ThreadLocal<Exchange> currentExchange = new ThreadLocal<>();
-
- @Override
- public Object convert(
- Object existingDestinationFieldValue,
- Object sourceFieldValue,
- Class<?> destinationClass,
- Class<?> sourceClass) {
- try {
- if (currentExchange.get() == null) {
- throw new IllegalStateException(
- "Current exchange has not been set for ExpressionMapper");
- }
-
- Expression exp;
-
- // Resolve the language being used for this expression and evaluate
- Exchange exchange = currentExchange.get();
- Language expLang = exchange.getContext().resolveLanguage(getLanguagePart());
- String scheme = getSchemePart();
- if (scheme != null && (scheme.equalsIgnoreCase("classpath") || scheme.equalsIgnoreCase("file")
- || scheme.equalsIgnoreCase("http"))) {
- String path = getPathPart();
- try {
- exp = expLang.createExpression(resolveScript(scheme + ":" + path));
- } catch (IOException e) {
- throw new IllegalStateException(
- "Expression script specified but not found", e);
- }
- } else {
- exp = expLang.createExpression(getExpressionPart());
- }
- return exp.evaluate(exchange, destinationClass);
- } finally {
- done();
- }
- }
-
- /**
- * Resolves the script.
- *
- * @param script script or uri for a script to load
- * @return the script
- * @throws IOException is thrown if error loading the script
- */
- protected String resolveScript(String script) throws IOException {
- String answer;
- if (ResourceHelper.hasScheme(script)) {
- InputStream is = loadResource(script);
- answer = currentExchange.get().getContext().getTypeConverter().convertTo(String.class, is);
- IOHelper.close(is);
- } else {
- answer = script;
- }
-
- return answer;
- }
-
- /**
- * Loads the given resource.
- *
- * @param uri uri of the resource.
- * @return the loaded resource
- * @throws IOException is thrown if resource is not found or cannot be loaded
- */
- protected InputStream loadResource(String uri) throws IOException {
- return ResourceHelper.resolveMandatoryResourceAsInputStream(currentExchange.get().getContext(), uri);
- }
-
- /**
- * Used as the source field for Dozer mappings.
- */
- public String getExpression() {
- return getParameter();
- }
-
- /**
- * The actual expression, without the language prefix.
- */
- public String getExpressionPart() {
- return getParameter().substring(getParameter().indexOf(':') + 1);
- }
-
- /**
- * The expression language used for this mapping.
- */
- public String getLanguagePart() {
- return getParameter().substring(0, getParameter().indexOf(':'));
- }
-
- /**
- * Sets the Camel exchange reference for this mapping. The exchange reference is stored in a thread-local which is
- * cleaned up after the mapping has been performed via the done() method.
- *
- * @param exchange
- */
- public void setCurrentExchange(Exchange exchange) {
- currentExchange.set(exchange);
- }
-
- /**
- * The scheme used for this mapping's resource file (classpath, file, http).
- */
- public String getSchemePart() {
- return getParameterPart(":", 1);
- }
-
- /**
- * The path used for this mapping's resource file.
- */
- public String getPathPart() {
- return getParameterPart(":", 2);
- }
-
- /*
- * Parse the URI to get at one of the parameters.
- * @param separator
- * @param idx
- * @return
- */
- private String getParameterPart(String separator, int idx) {
- String part = null;
- String[] parts = getParameter().split(separator);
- if (parts.length > idx) {
- part = parts[idx];
- }
- return part;
- }
-
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/VariableMapper.java b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/VariableMapper.java
deleted file mode 100644
index 386aa1898ed..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/VariableMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.component.dozer;
-
-/**
- * Used to map literal values (e.g. "ACME" or "ABC-123") to a field in the target object.
- */
-public class VariableMapper extends BaseConverter {
-
- @Override
- public Object convert(
- Object existingDestinationFieldValue,
- Object sourceFieldValue,
- Class<?> destinationClass,
- Class<?> sourceClass) {
- try {
- return getParameter();
- } finally {
- done();
- }
- }
-
- /**
- * We need at least one field in this class so that we can use it as a source for Dozer transformations.
- */
- public String getLiteral() {
- return getParameter();
- }
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerBeanMapperConfiguration.java b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerBeanMapperConfiguration.java
deleted file mode 100644
index fe25153b37b..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerBeanMapperConfiguration.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import java.util.List;
-import java.util.Map;
-
-import com.github.dozermapper.core.CustomConverter;
-import com.github.dozermapper.core.CustomFieldMapper;
-import com.github.dozermapper.core.events.EventListener;
-import com.github.dozermapper.core.loader.api.BeanMappingBuilder;
-
-public class DozerBeanMapperConfiguration {
-
- private List<String> mappingFiles;
- private List<CustomConverter> customConverters;
- private List<EventListener> eventListeners;
- private Map<String, CustomConverter> customConvertersWithId;
- private CustomFieldMapper customFieldMapper;
- private List<BeanMappingBuilder> beanMappingBuilders;
-
- public List<String> getMappingFiles() {
- return mappingFiles;
- }
-
- public void setMappingFiles(List<String> mappingFiles) {
- this.mappingFiles = mappingFiles;
- }
-
- public List<CustomConverter> getCustomConverters() {
- return customConverters;
- }
-
- public void setCustomConverters(List<CustomConverter> customConverters) {
- this.customConverters = customConverters;
- }
-
- public List<EventListener> getEventListeners() {
- return eventListeners;
- }
-
- public void setEventListeners(List<EventListener> eventListeners) {
- this.eventListeners = eventListeners;
- }
-
- public Map<String, CustomConverter> getCustomConvertersWithId() {
- return customConvertersWithId;
- }
-
- public void setCustomConvertersWithId(Map<String, CustomConverter> customConvertersWithId) {
- this.customConvertersWithId = customConvertersWithId;
- }
-
- public CustomFieldMapper getCustomFieldMapper() {
- return customFieldMapper;
- }
-
- public void setCustomFieldMapper(CustomFieldMapper customFieldMapper) {
- this.customFieldMapper = customFieldMapper;
- }
-
- public List<BeanMappingBuilder> getBeanMappingBuilders() {
- return beanMappingBuilders;
- }
-
- public void setBeanMappingBuilders(List<BeanMappingBuilder> beanMappingBuilders) {
- this.beanMappingBuilders = beanMappingBuilders;
- }
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerThreadContextClassLoader.java b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerThreadContextClassLoader.java
deleted file mode 100644
index 4a34f965df3..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerThreadContextClassLoader.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import com.github.dozermapper.core.util.DozerClassLoader;
-import com.github.dozermapper.core.util.MappingUtils;
-import org.apache.commons.lang3.ClassUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DozerThreadContextClassLoader implements DozerClassLoader {
-
- private static final Logger LOG = LoggerFactory.getLogger(DozerThreadContextClassLoader.class);
-
- @Override
- public Class<?> loadClass(String className) {
- LOG.debug("Loading class from classloader: {}.", Thread.currentThread().getContextClassLoader());
- Class<?> result = null;
- try {
- // try to resolve the class from the thread context classloader
- result = ClassUtils.getClass(Thread.currentThread().getContextClassLoader(), className);
- } catch (ClassNotFoundException e) {
- MappingUtils.throwMappingException(e);
- }
- return result;
- }
-
- @Override
- public URL loadResource(String uri) {
- URL answer = null;
-
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if (cl != null) {
- LOG.debug("Loading resource from classloader: {}.", cl);
- answer = cl.getResource(uri);
- }
-
- // try treating it as a system resource
- if (answer == null) {
- answer = ClassLoader.getSystemResource(uri);
- }
-
- // one more time in case it's a normal URI
- if (answer == null && StringUtils.contains(uri, ":")) {
- try {
- answer = new URL(uri);
- } catch (MalformedURLException e) {
- MappingUtils.throwMappingException(e);
- }
- }
-
- return answer;
- }
-
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
deleted file mode 100644
index e6b387b857f..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import com.github.dozermapper.core.Mapper;
-import com.github.dozermapper.core.metadata.ClassMappingMetadata;
-import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
-import org.apache.camel.TypeConversionException;
-import org.apache.camel.TypeConverter;
-import org.apache.camel.support.TypeConverterSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <code>DozerTypeConverter</code> is a standard {@link TypeConverter} that delegates to a {@link Mapper} from the Dozer
- * framework to convert between types. <code>DozerTypeConverter</code>s are created and installed into a
- * {@link CamelContext} by an instance of {@link DozerTypeConverterLoader}.
- * <p>
- * See <a href="https://github.com/DozerMapper/dozer">dozer project page</a> or more information on configuring Dozer
- *
- * @see DozerTypeConverterLoader
- */
-@Deprecated
-public class DozerTypeConverter extends TypeConverterSupport {
-
- private static final Logger LOG = LoggerFactory.getLogger(DozerTypeConverter.class);
-
- private final Mapper mapper;
-
- public DozerTypeConverter(Mapper mapper) {
- this.mapper = mapper;
- }
-
- public Mapper getMapper() {
- return mapper;
- }
-
- @Override
- public <T> T convertTo(Class<T> type, Exchange exchange, Object value) throws TypeConversionException {
-
- CamelContext context = exchange != null ? exchange.getContext() : null;
- ClassLoader appcl = context != null ? context.getApplicationContextClassLoader() : null;
-
- T result;
-
- ClassLoader tccl = Thread.currentThread().getContextClassLoader();
- try {
- if (appcl != null && appcl != tccl) {
- LOG.debug("Switching TCCL to: {}", appcl);
- Thread.currentThread().setContextClassLoader(appcl);
- }
-
- // find the map id, so we can provide that when trying to map from source to destination
- String mapId = null;
- if (value != null) {
- Class<?> sourceType = value.getClass();
- ClassMappingMetadata metadata = getClassMappingMetadata(sourceType, type);
- if (metadata != null) {
- mapId = metadata.getMapId();
- }
- }
-
- result = mapper.map(value, type, mapId);
-
- } finally {
- if (appcl != null && appcl != tccl) {
- Thread.currentThread().setContextClassLoader(tccl);
- LOG.debug("Restored TCCL to: {}", tccl);
- }
- }
-
- return result;
- }
-
- private ClassMappingMetadata getClassMappingMetadata(Class<?> sourceType, Class<?> destType) {
- ClassMappingMetadata result = null;
- for (ClassMappingMetadata aux : mapper.getMappingMetadata().getClassMappingsBySource(sourceType)) {
- if (destType.isAssignableFrom(aux.getDestinationClass())) {
- result = aux;
- break;
- }
- }
- return result;
- }
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverterLoader.java b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverterLoader.java
deleted file mode 100644
index ff94f773fc7..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverterLoader.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.github.dozermapper.core.Mapper;
-import com.github.dozermapper.core.metadata.ClassMappingMetadata;
-import com.github.dozermapper.core.metadata.MappingMetadata;
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelContextAware;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.TypeConverter;
-import org.apache.camel.spi.TypeConverterRegistry;
-import org.apache.camel.support.service.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static com.github.dozermapper.core.classmap.MappingDirection.ONE_WAY;
-
-/**
- * <code>DozerTypeConverterLoader</code> provides the mechanism for registering a Dozer {@link Mapper} as
- * {@link TypeConverter} for a {@link CamelContext}.
- * <p/>
- * While a mapper can be explicitly supplied as a parameter the {@link CamelContext}'s registry will also be searched
- * for {@link Mapper} instances. A {@link DozerTypeConverter} is created to wrap each {@link Mapper} instance and the
- * mapper is queried for the types it converts. The queried types are used to register the {@link TypeConverter} with
- * the context via its {@link TypeConverterRegistry}.
- */
-@Deprecated
-public class DozerTypeConverterLoader extends ServiceSupport implements CamelContextAware {
-
- private final Logger log = LoggerFactory.getLogger(getClass());
- private CamelContext camelContext;
- private transient DozerBeanMapperConfiguration configuration;
- private transient Mapper mapper;
-
- /**
- * Creates a <code>DozerTypeConverter</code> performing no {@link TypeConverter} registration.
- */
- public DozerTypeConverterLoader() {
- }
-
- /**
- * Creates a <code>DozerTypeConverter</code> that will search the given {@link CamelContext} for instances of
- * {@link Mapper}. Each discovered instance will be wrapped as a {@link DozerTypeConverter} and register as a
- * {@link TypeConverter} with the context
- *
- * @param camelContext the context to register the {@link DozerTypeConverter} in
- */
- public DozerTypeConverterLoader(CamelContext camelContext) {
- this.camelContext = camelContext;
- try {
- camelContext.addService(this);
- } catch (Exception e) {
- throw RuntimeCamelException.wrapRuntimeCamelException(e);
- }
- }
-
- /**
- * Creates a <code>DozerTypeConverter</code> using the given {@link DozerBeanMapperConfiguration} configuration.
- *
- * @param camelContext the context to register the {@link DozerTypeConverter} in
- *
- * @param configuration dozer mapping bean configuration.
- */
- public DozerTypeConverterLoader(CamelContext camelContext, DozerBeanMapperConfiguration configuration) {
- ClassLoader tccl = Thread.currentThread().getContextClassLoader();
- try {
- ClassLoader appcl = camelContext.getApplicationContextClassLoader();
- if (appcl != null) {
- Thread.currentThread().setContextClassLoader(appcl);
- }
- log.info("Using DozerBeanMapperConfiguration: {}", configuration);
- MapperFactory factory = new MapperFactory(camelContext, configuration);
- Mapper mapper = factory.create();
-
- this.camelContext = camelContext;
- this.mapper = mapper;
- this.configuration = configuration;
-
- camelContext.addService(this);
- } catch (Exception e) {
- throw RuntimeCamelException.wrapRuntimeCamelException(e);
- } finally {
- Thread.currentThread().setContextClassLoader(tccl);
- }
- }
-
- /**
- * Doses the actual querying and registration of {@link DozerTypeConverter}s with the {@link CamelContext}.
- *
- * @param camelContext the context to register the {@link DozerTypeConverter} in
- * @param mapper the DozerMapperBean to be wrapped as a type converter.
- */
- public void init(CamelContext camelContext, Mapper mapper) {
- this.camelContext = camelContext;
- if (mapper != null) {
- this.mapper = mapper;
- }
-
- ClassLoader tccl = Thread.currentThread().getContextClassLoader();
- try {
- ClassLoader appcl = camelContext.getApplicationContextClassLoader();
- if (appcl != null) {
- Thread.currentThread().setContextClassLoader(appcl);
- }
-
- Map<String, Mapper> mappers = lookupDozerBeanMappers();
- // only add if we do not already have it
- if (mapper != null && !mappers.containsValue(mapper)) {
- mappers.put("parameter", mapper);
- }
-
- // add any dozer bean mapper configurations
- Map<String, DozerBeanMapperConfiguration> configurations = lookupDozerBeanMapperConfigurations();
- if (configurations != null && configuration != null) {
- // filter out existing configuration, as we do not want to use it twice
- String key = null;
- for (Map.Entry<String, DozerBeanMapperConfiguration> entry : configurations.entrySet()) {
- if (entry.getValue() == configuration) {
- key = entry.getKey();
- break;
- }
- }
- if (key != null) {
- configurations.remove(key);
- }
- }
-
- if (configurations != null) {
- for (Map.Entry<String, DozerBeanMapperConfiguration> entry : configurations.entrySet()) {
- String id = entry.getKey();
-
- MapperFactory factory = new MapperFactory(getCamelContext(), entry.getValue());
- Mapper beanMapper = factory.create();
-
- // only add if we do not already have it
- if (!mappers.containsValue(beanMapper)) {
- mappers.put(id, beanMapper);
- }
- }
- }
-
- log.info("Loaded {} Dozer mappers from Camel registry.", mappers.size());
-
- if (mappers.size() == 0) {
- log.warn(
- "No Dozer mappers found in Camel registry. You should add Dozer mappers as beans to the registry of the type: {}",
- Mapper.class.getName());
- }
-
- TypeConverterRegistry registry = camelContext.getTypeConverterRegistry();
- for (Map.Entry<String, Mapper> entry : mappers.entrySet()) {
- String mapperId = entry.getKey();
- Mapper dozer = entry.getValue();
-
- MappingMetadata meta = dozer.getMappingMetadata();
-
- List<ClassMappingMetadata> all = meta.getClassMappings();
- registerClassMaps(registry, mapperId, dozer, all);
- }
-
- } finally {
- Thread.currentThread().setContextClassLoader(tccl);
- }
- }
-
- /**
- * Lookup the dozer {@link Mapper} to be used.
- */
- protected Map<String, Mapper> lookupDozerBeanMappers() {
- return new HashMap<>(camelContext.getRegistry().findByTypeWithName(Mapper.class));
- }
-
- /**
- * Lookup the dozer {@link DozerBeanMapperConfiguration} to be used.
- */
- protected Map<String, DozerBeanMapperConfiguration> lookupDozerBeanMapperConfigurations() {
- return new HashMap<>(camelContext.getRegistry().findByTypeWithName(DozerBeanMapperConfiguration.class));
- }
-
- protected void registerClassMaps(
- TypeConverterRegistry registry, String dozerId, Mapper dozer, List<ClassMappingMetadata> all) {
- DozerTypeConverter converter = new DozerTypeConverter(dozer);
- for (ClassMappingMetadata map : all) {
- addDozerTypeConverter(registry, converter, dozerId, map.getSourceClass(), map.getDestinationClass());
-
- // if not one way then add the other way around also
- if (map.getMappingDirection() != ONE_WAY) {
- addDozerTypeConverter(registry, converter, dozerId, map.getDestinationClass(), map.getSourceClass());
- }
- }
- }
-
- protected void addDozerTypeConverter(
- TypeConverterRegistry registry, DozerTypeConverter converter,
- String dozerId, Class<?> to, Class<?> from) {
- if (log.isInfoEnabled()) {
- if (dozerId != null) {
- log.info("Added Dozer: {} as Camel type converter: {} -> {}", dozerId, from, to);
- } else {
- log.info("Added Dozer as Camel type converter: {} -> {}", from, to);
- }
- }
-
- registry.addTypeConverter(from, to, converter);
- }
-
- @Override
- public CamelContext getCamelContext() {
- return camelContext;
- }
-
- /**
- * Sets the {@link CamelContext} <b>and also</b> initializes this loader.
- * <p/>
- * The reason why {@link #init(org.apache.camel.CamelContext, com.github.dozermapper.core.Mapper)} is also called is
- * because making using Dozer in Spring XML files easier, as no need to use the init-method attribute.
- *
- * @param camelContext the CamelContext
- */
- @Override
- public void setCamelContext(CamelContext camelContext) {
- if (this.camelContext == null) {
- this.camelContext = camelContext;
- try {
- camelContext.addService(this);
- } catch (Exception e) {
- throw RuntimeCamelException.wrapRuntimeCamelException(e);
- }
- }
- }
-
- public Mapper getMapper() {
- return mapper;
- }
-
- public void setMapper(Mapper mapper) {
- this.mapper = mapper;
- }
-
- @Override
- protected void doStart() throws Exception {
- init(camelContext, mapper);
- }
-
- @Override
- protected void doStop() throws Exception {
- // noop
- }
-}
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/MapperFactory.java b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/MapperFactory.java
deleted file mode 100644
index 16c02ebdbb1..00000000000
--- a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/MapperFactory.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import com.github.dozermapper.core.DozerBeanMapperBuilder;
-import com.github.dozermapper.core.Mapper;
-import com.github.dozermapper.core.config.SettingsKeys;
-import com.github.dozermapper.core.el.DefaultELEngine;
-import com.github.dozermapper.core.el.ELEngine;
-import com.github.dozermapper.core.el.ELExpressionFactory;
-import com.github.dozermapper.core.el.NoopELEngine;
-import com.github.dozermapper.core.el.TcclELEngine;
-import com.github.dozermapper.core.util.RuntimeUtils;
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.dozer.DozerEndpoint;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MapperFactory {
-
- private static final Logger LOG = LoggerFactory.getLogger(MapperFactory.class);
-
- private final CamelContext camelContext;
- private final DozerBeanMapperConfiguration configuration;
-
- public MapperFactory(CamelContext camelContext, DozerBeanMapperConfiguration configuration) {
- this.camelContext = camelContext;
- this.configuration = configuration;
- }
-
- public Mapper create() {
- if (camelContext == null) {
- throw new IllegalStateException("CamelContext is null");
- }
-
- return parseConfiguration(configuration);
- }
-
- private Mapper parseConfiguration(DozerBeanMapperConfiguration configuration) {
- configureSettings();
-
- Mapper mapper;
- if (configuration == null) {
- mapper = DozerBeanMapperBuilder.buildDefault();
- } else {
- mapper = DozerBeanMapperBuilder.create()
- .withMappingFiles(configuration.getMappingFiles())
- .withCustomConverters(configuration.getCustomConverters())
- .withEventListeners(configuration.getEventListeners())
- .withCustomConvertersWithIds(configuration.getCustomConvertersWithId())
- .withMappingBuilders(configuration.getBeanMappingBuilders())
- .withCustomFieldMapper(configuration.getCustomFieldMapper())
- .withELEngine(createELEngine())
- .build();
- }
-
- mapper.getMappingMetadata();
-
- return mapper;
- }
-
- private void configureSettings() {
- System.setProperty(SettingsKeys.CLASS_LOADER_BEAN, DozerThreadContextClassLoader.class.getName());
- }
-
- private ELEngine createELEngine() {
- ELEngine answer;
-
- ClassLoader appcl = camelContext.getApplicationContextClassLoader();
- ClassLoader auxcl = appcl == null ? DozerEndpoint.class.getClassLoader() : appcl;
-
- if (Boolean.TRUE.equals(ELExpressionFactory.isSupported(auxcl))) {
- if (RuntimeUtils.isOSGi()) {
- answer = new TcclELEngine(ELExpressionFactory.newInstance(auxcl), auxcl);
- } else {
- answer = new DefaultELEngine(ELExpressionFactory.newInstance());
- }
- } else {
- LOG.warn("Expressions are not supported by Dozer. Are you missing javax.el dependency?");
-
- answer = new NoopELEngine();
- }
-
- return answer;
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/CustomMapperParametersTest.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/CustomMapperParametersTest.java
deleted file mode 100644
index cb87fcd13a9..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/CustomMapperParametersTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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.component.dozer;
-
-import org.apache.camel.impl.engine.DefaultClassResolver;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class CustomMapperParametersTest {
-
- private CustomMapper customMapper;
-
- @BeforeEach
- public void setup() {
- customMapper = new CustomMapper(new DefaultClassResolver());
- }
-
- @Test
- void shouldExecuteCustomFunctionWithArguments() {
- customMapper
- .setParameter(MapperWithMultiParmMethod.class.getName() + ",test,java.lang.Integer=12,java.lang.Integer=20");
- Object result = customMapper.mapCustom("JeremiahWasABullfrog", String.class);
- assertEquals("Bullfrog", result);
- }
-
- @Test
- void shouldExecuteCustomFunctionWithVariableArguments() {
- customMapper.setParameter(MapperWithMultiParmMethod.class.getName() + ",add,java.lang.Integer=12,java.lang.Integer=20");
- Object result = customMapper.mapCustom("JeremiahWasABullfrog", String.class);
- assertEquals(32L, result);
- }
-}
-
-class MapperWithMultiParmMethod {
-
- public Object add(String source, Integer... operands) {
- long sum = 0L;
- for (Integer operand : operands) {
- sum += operand;
- }
- return sum;
- }
-
- public Object test(String source, Integer beginindex, Integer endindex) {
- return source.substring(beginindex.intValue(), endindex.intValue());
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/CustomMapperTest.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/CustomMapperTest.java
deleted file mode 100644
index 1b5caad1dc4..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/CustomMapperTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.component.dozer;
-
-import java.lang.reflect.Method;
-
-import org.apache.camel.impl.engine.DefaultClassResolver;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class CustomMapperTest {
-
- private CustomMapper customMapper;
-
- @BeforeEach
- public void setup() {
- customMapper = new CustomMapper(new DefaultClassResolver());
- }
-
- @Test
- void selectMapperOneMethod() {
- customMapper.setParameter(MapperWithOneMethod.class.getName());
- assertNotNull(customMapper.selectMethod(MapperWithOneMethod.class, String.class));
- }
-
- @Test
- void selectMapperMultipleMethods() throws Exception {
- Method selectedMethod = customMapper.selectMethod(MapperWithTwoMethods.class, B.class);
- assertNotNull(selectedMethod);
- assertEquals(MapperWithTwoMethods.class.getMethod("convertToA", B.class), selectedMethod);
- }
-
- @Test
- void mapCustomFindOperation() {
- customMapper.setParameter(MapperWithTwoMethods.class.getName());
- assertNotNull(customMapper.mapCustom(new B(), B.class));
- }
-
- @Test
- void mapCustomDeclaredOperation() {
- customMapper.setParameter(MapperWithTwoMethods.class.getName() + ",convertToA");
- assertNotNull(customMapper.mapCustom(new B(), B.class));
- }
-
- @Test
- void mapCustomInvalidOperation() {
- customMapper.setParameter(MapperWithTwoMethods.class.getName() + ",convertToB");
- B b = new B();
- Exception ex = assertThrows(RuntimeException.class, () -> customMapper.mapCustom(b, B.class));
- assertTrue(ex.getCause() instanceof NoSuchMethodException);
- }
-
- @Test
- void mapCustomNullField() {
- customMapper.setParameter(MapperWithTwoMethods.class.getName());
- assertNotNull(customMapper.mapCustom(null, B.class));
- }
-}
-
-class A {
-
-}
-
-class B extends A {
-
-}
-
-class MapperWithOneMethod {
-
- public A convertToA(String val) {
- return new A();
- }
-}
-
-class MapperWithTwoMethods {
-
- public A convertToA(String val) {
- return new A();
- }
-
- public A convertToA(B val) {
- return new A();
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/CustomMappingTest.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/CustomMappingTest.java
deleted file mode 100644
index d75f9f20e8e..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/CustomMappingTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.component.dozer;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.dozer.example.abc.ABCOrder;
-import org.apache.camel.component.dozer.example.abc.ABCOrder.Header;
-import org.apache.camel.component.dozer.example.xyz.XYZOrder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.Test;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-@CamelSpringTest
-@ContextConfiguration
-public class CustomMappingTest {
-
- @EndpointInject("mock:result")
- private MockEndpoint resultEndpoint;
-
- @Produce("direct:start")
- private ProducerTemplate startEndpoint;
-
- @AfterEach
- public void tearDown() {
- resultEndpoint.reset();
- }
-
- @Test
- void testCustomMapping() throws Exception {
- resultEndpoint.expectedMessageCount(1);
- ABCOrder abcOrder = new ABCOrder();
- abcOrder.setHeader(new Header());
- abcOrder.getHeader().setStatus("GOLD");
- abcOrder.getHeader().setCustomerNum("ACME");
- startEndpoint.sendBody(abcOrder);
- // check results
- resultEndpoint.assertIsSatisfied();
- XYZOrder result = resultEndpoint.getExchanges().get(0).getIn().getBody(XYZOrder.class);
- assertEquals("custom2:GOLD", result.getPriority());
- assertEquals("mapCustomer:ACME", result.getCustId());
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/DozerComponentTest.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/DozerComponentTest.java
deleted file mode 100644
index 89d9784eec1..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/DozerComponentTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.component.dozer;
-
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.fail;
-
-public class DozerComponentTest extends CamelTestSupport {
-
- private static final String NAME = "examplename";
- private static final String MARSHAL_ID = "marshal123";
- private static final String UNMARSHAL_ID = "unmarshal456";
- private static final String SOURCE_MODEL = "org.example.A";
- private static final String TARGET_MODEL = "org.example.B";
- private static final String DOZER_CONFIG_PATH = "mapping.xml";
- private static final String TRANSFORM_EP_1 = "dozer:" + NAME
- + "?marshalId=" + MARSHAL_ID
- + "&unmarshalId=" + UNMARSHAL_ID
- + "&sourceModel=" + SOURCE_MODEL
- + "&targetModel=" + TARGET_MODEL
- + "&mappingFile=" + DOZER_CONFIG_PATH;
-
- @Test
- void testCreateEndpoint() {
- DozerEndpoint ep = context.getEndpoint(TRANSFORM_EP_1, DozerEndpoint.class);
- DozerConfiguration config = ep.getConfiguration();
- assertEquals(NAME, config.getName());
- assertEquals(MARSHAL_ID, config.getMarshalId());
- assertEquals(UNMARSHAL_ID, config.getUnmarshalId());
- assertEquals(SOURCE_MODEL, config.getSourceModel());
- assertEquals(TARGET_MODEL, config.getTargetModel());
- assertEquals(DOZER_CONFIG_PATH, config.getMappingFile());
- }
-
- @Test
- void requiredTargetModelMissing() {
- try {
- context.getEndpoint("dozer:noTargetModel?mappingFile=mapping.xml", DozerEndpoint.class);
- fail("targetModel is a required parameter");
- } catch (Exception ex) {
- // expected
- }
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/ExpressionMappingClasspathTest.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/ExpressionMappingClasspathTest.java
deleted file mode 100644
index 9a6cfb538bd..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/ExpressionMappingClasspathTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.component.dozer;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.dozer.example.abc.ABCOrder;
-import org.apache.camel.component.dozer.example.xyz.XYZOrder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.Test;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-@CamelSpringTest
-@ContextConfiguration
-public class ExpressionMappingClasspathTest {
-
- @EndpointInject("mock:result")
- private MockEndpoint resultEndpoint;
-
- @Produce("direct:start")
- private ProducerTemplate startEndpoint;
-
- @AfterEach
- public void tearDown() {
- resultEndpoint.reset();
- }
-
- @Test
- void testExpressionMappingScript() throws Exception {
- resultEndpoint.expectedMessageCount(1);
- Map<String, Object> headers = new HashMap<>();
- final String customerNumber = "CAFE-345";
- final String orderNumber = "ABC-001";
- headers.put("customerNumber", customerNumber);
- headers.put("orderNumber", orderNumber);
- ABCOrder abcOrder = new ABCOrder();
- // Header value should be mapped to custId in target model
- startEndpoint.sendBodyAndHeaders(abcOrder, headers);
- // check results
- resultEndpoint.assertIsSatisfied();
- XYZOrder result = resultEndpoint.getExchanges().get(0).getIn().getBody(XYZOrder.class);
- assertEquals(customerNumber, result.getCustId());
- assertEquals(orderNumber, result.getOrderId());
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/ExpressionMappingFileTest.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/ExpressionMappingFileTest.java
deleted file mode 100644
index 4fb2b565132..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/ExpressionMappingFileTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.component.dozer;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.dozer.example.abc.ABCOrder;
-import org.apache.camel.component.dozer.example.xyz.XYZOrder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.Test;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-@CamelSpringTest
-@ContextConfiguration
-public class ExpressionMappingFileTest {
-
- @EndpointInject("mock:result")
- private MockEndpoint resultEndpoint;
-
- @Produce("direct:start")
- private ProducerTemplate startEndpoint;
-
- @AfterEach
- public void tearDown() {
- resultEndpoint.reset();
- }
-
- @Test
- void testExpressionMappingScriptFile() throws Exception {
- resultEndpoint.expectedMessageCount(1);
- Map<String, Object> headers = new HashMap<>();
- final String customerNumber = "CAFE-678";
- final String orderNumber = "ABC-002";
- headers.put("customerNumber", customerNumber);
- headers.put("orderNumber", orderNumber);
- ABCOrder abcOrder = new ABCOrder();
- // Header value should be mapped to custId in target model
- startEndpoint.sendBodyAndHeaders(abcOrder, headers);
- // check results
- resultEndpoint.assertIsSatisfied();
- XYZOrder result = resultEndpoint.getExchanges().get(0).getIn().getBody(XYZOrder.class);
- assertEquals(customerNumber, result.getCustId());
- assertEquals(orderNumber, result.getOrderId());
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/ExpressionMappingTest.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/ExpressionMappingTest.java
deleted file mode 100644
index 54492483fac..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/ExpressionMappingTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.component.dozer;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.dozer.example.abc.ABCOrder;
-import org.apache.camel.component.dozer.example.xyz.XYZOrder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.Test;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-@CamelSpringTest
-@ContextConfiguration
-public class ExpressionMappingTest {
-
- @EndpointInject("mock:result")
- private MockEndpoint resultEndpoint;
-
- @Produce("direct:start")
- private ProducerTemplate startEndpoint;
-
- @AfterEach
- public void tearDown() {
- resultEndpoint.reset();
- }
-
- @Test
- void testExpressionMapping() throws Exception {
- resultEndpoint.expectedMessageCount(1);
- Map<String, Object> headers = new HashMap<>();
- final String customerNumber = "CAFE-123";
- final String orderNumber = "ABC-000";
- headers.put("customerNumber", customerNumber);
- headers.put("orderNumber", orderNumber);
- ABCOrder abcOrder = new ABCOrder();
- // Header value should be mapped to custId in target model
- startEndpoint.sendBodyAndHeaders(abcOrder, headers);
- // check results
- resultEndpoint.assertIsSatisfied();
- XYZOrder result = resultEndpoint.getExchanges().get(0).getIn().getBody(XYZOrder.class);
- assertEquals(customerNumber, result.getCustId());
- assertEquals(orderNumber, result.getOrderId());
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/VariableMappingTest.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/VariableMappingTest.java
deleted file mode 100644
index a2fb9a60d56..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/VariableMappingTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.component.dozer;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.dozer.example.abc.ABCOrder;
-import org.apache.camel.component.dozer.example.abc.ABCOrder.Header;
-import org.apache.camel.component.dozer.example.xyz.XYZOrder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.Test;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-@CamelSpringTest
-@ContextConfiguration
-public class VariableMappingTest {
-
- @EndpointInject("mock:result")
- private MockEndpoint resultEndpoint;
-
- @Produce("direct:start")
- private ProducerTemplate startEndpoint;
-
- @AfterEach
- public void tearDown() {
- resultEndpoint.reset();
- }
-
- @Test
- void testLiteralMapping() throws Exception {
- resultEndpoint.expectedMessageCount(1);
- ABCOrder abcOrder = new ABCOrder();
- abcOrder.setHeader(new Header());
- abcOrder.getHeader().setStatus("GOLD");
- startEndpoint.sendBody(abcOrder);
- // check results
- resultEndpoint.assertIsSatisfied();
- XYZOrder result = resultEndpoint.getExchanges().get(0).getIn().getBody(XYZOrder.class);
- assertEquals("GOLD", result.getPriority());
- assertEquals("ACME-SALES", result.getCustId());
- assertEquals("W123-EG", result.getOrderId());
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/XmlToJsonTest.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/XmlToJsonTest.java
deleted file mode 100644
index 7488b7769d6..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/XmlToJsonTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.component.dozer;
-
-import java.io.InputStream;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-@CamelSpringTest
-@ContextConfiguration
-public class XmlToJsonTest {
-
- private static final String ABC_ORDER_PATH = "org/apache/camel/component/dozer/abc-order.xml";
- private static final String XYZ_ORDER_PATH = "org/apache/camel/component/dozer/xyz-order.json";
-
- @EndpointInject("mock:result")
- private MockEndpoint resultEndpoint;
-
- @Produce("direct:start")
- private ProducerTemplate startEndpoint;
-
- @Autowired
- private CamelContext camelContext;
-
- @AfterEach
- public void tearDown() {
- resultEndpoint.reset();
- }
-
- @Test
- void testXmlToJson() throws Exception {
- resultEndpoint.expectedMessageCount(1);
- startEndpoint.sendBody(getResourceAsString(ABC_ORDER_PATH));
- // check results
- resultEndpoint.assertIsSatisfied();
- String result = resultEndpoint.getExchanges().get(0).getIn().getBody(String.class);
- assertEquals(getResourceAsString(XYZ_ORDER_PATH), result);
- }
-
- @Test
- void testMultipleSends() throws Exception {
- resultEndpoint.expectedMessageCount(2);
- startEndpoint.sendBody(getResourceAsString(ABC_ORDER_PATH));
- startEndpoint.sendBody(getResourceAsString(ABC_ORDER_PATH));
- // check results
- resultEndpoint.assertIsSatisfied();
- String result1 = resultEndpoint.getExchanges().get(0).getIn().getBody(String.class);
- String result2 = resultEndpoint.getExchanges().get(1).getIn().getBody(String.class);
- assertEquals(getResourceAsString(XYZ_ORDER_PATH), result1);
- assertEquals(getResourceAsString(XYZ_ORDER_PATH), result2);
- }
-
- private String getResourceAsString(String resourcePath) {
- InputStream is = getClass().getClassLoader().getResourceAsStream(resourcePath);
- return camelContext.getTypeConverter().convertTo(String.class, is);
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/CustomMapper.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/CustomMapper.java
deleted file mode 100644
index 757cbf52d2c..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/CustomMapper.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.component.dozer.example;
-
-/**
- * Custom mapping class with one operation.
- */
-public class CustomMapper {
-
- public Object mapCustomer(String source) {
- return "mapCustomer:" + source;
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/CustomMapperOperations.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/CustomMapperOperations.java
deleted file mode 100644
index 7b628ee0838..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/CustomMapperOperations.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.component.dozer.example;
-
-/**
- * Custom mapping class with multiple operations.
- */
-public class CustomMapperOperations {
-
- public Object custom1(String source) {
- return "custom1:" + source.toString();
- }
-
- public Object custom2(String source) {
- return "custom2:" + source.toString();
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/abc/ABCOrder.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/abc/ABCOrder.java
deleted file mode 100644
index 1c4d8cdf41e..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/abc/ABCOrder.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * 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.component.dozer.example.abc;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * <p>
- * Java class for anonymous complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="header">
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="status" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="customer-num" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="order-num" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </element>
- * <element name="order-items">
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="item" maxOccurs="unbounded" minOccurs="0">
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="price" type="{http://www.w3.org/2001/XMLSchema}float"/>
- * <element name="quantity" type="{http://www.w3.org/2001/XMLSchema}short"/>
- * </sequence>
- * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </element>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </element>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "header",
- "orderItems"
-})
-@XmlRootElement(name = "ABCOrder")
-public class ABCOrder {
-
- @XmlElement(required = true)
- protected ABCOrder.Header header;
- @XmlElement(name = "order-items", required = true)
- protected ABCOrder.OrderItems orderItems;
-
- /**
- * Gets the value of the header property.
- *
- * @return possible object is {@link ABCOrder.Header }
- *
- */
- public ABCOrder.Header getHeader() {
- return header;
- }
-
- /**
- * Sets the value of the header property.
- *
- * @param value allowed object is {@link ABCOrder.Header }
- *
- */
- public void setHeader(ABCOrder.Header value) {
- this.header = value;
- }
-
- /**
- * Gets the value of the orderItems property.
- *
- * @return possible object is {@link ABCOrder.OrderItems }
- *
- */
- public ABCOrder.OrderItems getOrderItems() {
- return orderItems;
- }
-
- /**
- * Sets the value of the orderItems property.
- *
- * @param value allowed object is {@link ABCOrder.OrderItems }
- *
- */
- public void setOrderItems(ABCOrder.OrderItems value) {
- this.orderItems = value;
- }
-
- /**
- * <p>
- * Java class for anonymous complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="status" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="customer-num" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="order-num" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "status",
- "customerNum",
- "orderNum"
- })
- public static class Header {
-
- @XmlElement(required = true)
- protected String status;
- @XmlElement(name = "customer-num", required = true)
- protected String customerNum;
- @XmlElement(name = "order-num", required = true)
- protected String orderNum;
-
- /**
- * Gets the value of the status property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getStatus() {
- return status;
- }
-
- /**
- * Sets the value of the status property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setStatus(String value) {
- this.status = value;
- }
-
- /**
- * Gets the value of the customerNum property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getCustomerNum() {
- return customerNum;
- }
-
- /**
- * Sets the value of the customerNum property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setCustomerNum(String value) {
- this.customerNum = value;
- }
-
- /**
- * Gets the value of the orderNum property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getOrderNum() {
- return orderNum;
- }
-
- /**
- * Sets the value of the orderNum property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setOrderNum(String value) {
- this.orderNum = value;
- }
-
- }
-
- /**
- * <p>
- * Java class for anonymous complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="item" maxOccurs="unbounded" minOccurs="0">
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="price" type="{http://www.w3.org/2001/XMLSchema}float"/>
- * <element name="quantity" type="{http://www.w3.org/2001/XMLSchema}short"/>
- * </sequence>
- * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </element>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "item"
- })
- public static class OrderItems {
-
- protected List<ABCOrder.OrderItems.Item> item;
-
- /**
- * Gets the value of the item property.
- *
- * <p>
- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you
- * make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE>
- * method for the item property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- *
- * <pre>
- * getItem().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list {@link ABCOrder.OrderItems.Item }
- *
- *
- */
- public List<ABCOrder.OrderItems.Item> getItem() {
- if (item == null) {
- item = new ArrayList<>();
- }
- return this.item;
- }
-
- /**
- * <p>
- * Java class for anonymous complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="price" type="{http://www.w3.org/2001/XMLSchema}float"/>
- * <element name="quantity" type="{http://www.w3.org/2001/XMLSchema}short"/>
- * </sequence>
- * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "price",
- "quantity"
- })
- public static class Item {
-
- protected float price;
- protected short quantity;
- @XmlAttribute(name = "id")
- protected String id;
-
- /**
- * Gets the value of the price property.
- *
- */
- public float getPrice() {
- return price;
- }
-
- /**
- * Sets the value of the price property.
- *
- */
- public void setPrice(float value) {
- this.price = value;
- }
-
- /**
- * Gets the value of the quantity property.
- *
- */
- public short getQuantity() {
- return quantity;
- }
-
- /**
- * Sets the value of the quantity property.
- *
- */
- public void setQuantity(short value) {
- this.quantity = value;
- }
-
- /**
- * Gets the value of the id property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getId() {
- return id;
- }
-
- /**
- * Sets the value of the id property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setId(String value) {
- this.id = value;
- }
-
- }
-
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/abc/ObjectFactory.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/abc/ObjectFactory.java
deleted file mode 100644
index 6ac08931fb8..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/abc/ObjectFactory.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.component.dozer.example.abc;
-
-import javax.xml.bind.annotation.XmlRegistry;
-
-/**
- * This object contains factory methods for each Java content interface and Java element interface generated in the
- * example.abc package.
- * <p>
- * An ObjectFactory allows you to programatically construct new instances of the Java representation for XML content.
- * The Java representation of XML content can consist of schema derived interfaces and classes representing the binding
- * of schema type definitions, element declarations and model groups. Factory methods for each of these are provided in
- * this class.
- */
-@XmlRegistry
-public class ObjectFactory {
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package:
- * example.abc
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link ABCOrder }
- *
- */
- public ABCOrder createABCOrder() {
- return new ABCOrder();
- }
-
- /**
- * Create an instance of {@link ABCOrder.OrderItems }
- *
- */
- public ABCOrder.OrderItems createABCOrderOrderItems() {
- return new ABCOrder.OrderItems();
- }
-
- /**
- * Create an instance of {@link ABCOrder.Header }
- *
- */
- public ABCOrder.Header createABCOrderHeader() {
- return new ABCOrder.Header();
- }
-
- /**
- * Create an instance of {@link ABCOrder.OrderItems.Item }
- *
- */
- public ABCOrder.OrderItems.Item createABCOrderOrderItemsItem() {
- return new ABCOrder.OrderItems.Item();
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/xyz/LineItem.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/xyz/LineItem.java
deleted file mode 100644
index b0b04b6ad98..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/xyz/LineItem.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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.component.dozer.example.xyz;
-
-import javax.annotation.Generated;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-/**
- * LineItem
- * <p>
- *
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@Generated("org.jsonschema2pojo")
-@JsonPropertyOrder({
- "itemId",
- "amount",
- "cost"
-})
-public class LineItem {
-
- @JsonProperty("itemId")
- private String itemId;
- @JsonProperty("amount")
- private int amount;
- @JsonProperty("cost")
- private double cost;
-
- /**
- *
- * @return The itemId
- */
- @JsonProperty("itemId")
- public String getItemId() {
- return itemId;
- }
-
- /**
- *
- * @param itemId The itemId
- */
- @JsonProperty("itemId")
- public void setItemId(String itemId) {
- this.itemId = itemId;
- }
-
- /**
- *
- * @return The amount
- */
- @JsonProperty("amount")
- public int getAmount() {
- return amount;
- }
-
- /**
- *
- * @param amount The amount
- */
- @JsonProperty("amount")
- public void setAmount(int amount) {
- this.amount = amount;
- }
-
- /**
- *
- * @return The cost
- */
- @JsonProperty("cost")
- public double getCost() {
- return cost;
- }
-
- /**
- *
- * @param cost The cost
- */
- @JsonProperty("cost")
- public void setCost(double cost) {
- this.cost = cost;
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/xyz/XYZOrder.java b/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/xyz/XYZOrder.java
deleted file mode 100644
index 55dd9567986..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/component/dozer/example/xyz/XYZOrder.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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.component.dozer.example.xyz;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.Generated;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-/**
- * XYZOrder
- * <p>
- *
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@Generated("org.jsonschema2pojo")
-@JsonPropertyOrder({
- "custId",
- "priority",
- "orderId",
- "lineItems"
-})
-public class XYZOrder {
-
- @JsonProperty("custId")
- private String custId;
- @JsonProperty("priority")
- private String priority;
- @JsonProperty("orderId")
- private String orderId;
- @JsonProperty("lineItems")
- private List<LineItem> lineItems = new ArrayList<>();
-
- /**
- *
- * @return The custId
- */
- @JsonProperty("custId")
- public String getCustId() {
- return custId;
- }
-
- /**
- *
- * @param custId The custId
- */
- @JsonProperty("custId")
- public void setCustId(String custId) {
- this.custId = custId;
- }
-
- /**
- *
- * @return The priority
- */
- @JsonProperty("priority")
- public String getPriority() {
- return priority;
- }
-
- /**
- *
- * @param priority The priority
- */
- @JsonProperty("priority")
- public void setPriority(String priority) {
- this.priority = priority;
- }
-
- /**
- *
- * @return The orderId
- */
- @JsonProperty("orderId")
- public String getOrderId() {
- return orderId;
- }
-
- /**
- *
- * @param orderId The orderId
- */
- @JsonProperty("orderId")
- public void setOrderId(String orderId) {
- this.orderId = orderId;
- }
-
- /**
- *
- * @return The lineItems
- */
- @JsonProperty("lineItems")
- public List<LineItem> getLineItems() {
- return lineItems;
- }
-
- /**
- *
- * @param lineItems The lineItems
- */
- @JsonProperty("lineItems")
- public void setLineItems(List<LineItem> lineItems) {
- this.lineItems = lineItems;
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/CustomerProcessor.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/CustomerProcessor.java
deleted file mode 100644
index e487426f385..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/CustomerProcessor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import org.apache.camel.converter.dozer.model.Customer;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class CustomerProcessor {
-
- public Customer processCustomer(Customer customer) {
- assertEquals(DozerTestArtifactsFactory.createModelCustomer(), customer);
- return customer;
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java
deleted file mode 100644
index 30eee554f46..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.converter.dozer.model.Customer;
-import org.apache.camel.converter.dozer.model.CustomerA;
-import org.apache.camel.converter.dozer.model.CustomerB;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class DozerBeanMappingTest {
-
- @Test
- void testMarshalViaDozer() throws Exception {
-
- CamelContext context = new DefaultCamelContext();
- context.addRoutes(new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").convertBodyTo(HashMap.class);
- }
- });
-
- DozerBeanMapperConfiguration mconfig = new DozerBeanMapperConfiguration();
- mconfig.setMappingFiles(Arrays.asList("bean-to-map-dozer-mappings.xml"));
- try (DozerTypeConverterLoader dtcl = new DozerTypeConverterLoader(context, mconfig)) {
- }
-
- context.start();
- try {
- ProducerTemplate producer = context.createProducerTemplate();
- Map<?, ?> result = producer.requestBody("direct:start", new Customer("John", "Doe", null), Map.class);
- assertEquals("John", result.get("firstName"));
- assertEquals("Doe", result.get("lastName"));
- } finally {
- context.stop();
- }
- }
-
- @Test
- void testMarshalToInterfaceViaDozer() throws Exception {
-
- CamelContext context = new DefaultCamelContext();
- context.addRoutes(new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").convertBodyTo(Map.class);
- }
- });
-
- DozerBeanMapperConfiguration mconfig = new DozerBeanMapperConfiguration();
- mconfig.setMappingFiles(Arrays.asList("bean-to-map-dozer-mappings.xml"));
- try (DozerTypeConverterLoader dtcl = new DozerTypeConverterLoader(context, mconfig)) {
- }
-
- context.start();
- try {
- ProducerTemplate producer = context.createProducerTemplate();
- Map<?, ?> result = producer.requestBody("direct:start", new Customer("John", "Doe", null), Map.class);
- assertEquals("John", result.get("firstName"));
- assertEquals("Doe", result.get("lastName"));
- } finally {
- context.stop();
- }
- }
-
- @Test
- void testBeanMapping() throws Exception {
-
- CamelContext context = new DefaultCamelContext();
- context.addRoutes(new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").convertBodyTo(CustomerB.class);
- }
- });
-
- DozerBeanMapperConfiguration mconfig = new DozerBeanMapperConfiguration();
- mconfig.setMappingFiles(Arrays.asList("bean-to-bean-dozer-mappings.xml"));
- try (DozerTypeConverterLoader dtcl = new DozerTypeConverterLoader(context, mconfig)) {
- }
-
- CustomerA customerA = new CustomerA("Peter", "Post", "SomeStreet", "12345");
-
- context.start();
- try {
- ProducerTemplate producer = context.createProducerTemplate();
- CustomerB result = producer.requestBody("direct:start", customerA, CustomerB.class);
- assertEquals(customerA.getFirstName(), result.getFirstName());
- assertEquals(customerA.getLastName(), result.getLastName());
- assertEquals(customerA.getStreet(), result.getAddress().getStreet());
- assertEquals(customerA.getZip(), result.getAddress().getZip());
- } finally {
- context.stop();
- }
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerTestArtifactsFactory.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerTestArtifactsFactory.java
deleted file mode 100644
index 6da8d388e67..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerTestArtifactsFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import java.util.Arrays;
-
-import com.github.dozermapper.core.Mapper;
-import org.apache.camel.CamelContext;
-import org.apache.camel.converter.dozer.dto.AddressDTO;
-import org.apache.camel.converter.dozer.dto.CustomerDTO;
-import org.apache.camel.converter.dozer.model.Address;
-import org.apache.camel.converter.dozer.service.Customer;
-
-public final class DozerTestArtifactsFactory {
-
- private DozerTestArtifactsFactory() {
- }
-
- public static Customer createServiceCustomer() {
- return new Customer("Bob", "Roberts", "12345", "1 main st");
- }
-
- public static org.apache.camel.converter.dozer.model.Customer createModelCustomer() {
- return new org.apache.camel.converter.dozer.model.Customer("Bob", "Roberts", new Address("12345", "1 main st"));
- }
-
- public static CustomerDTO createDtoCustomer() {
- return new CustomerDTO("Bob", "Roberts", new AddressDTO("12345", "1 main st"));
- }
-
- public static Mapper createMapper(CamelContext camelContext) {
- DozerBeanMapperConfiguration config = new DozerBeanMapperConfiguration();
- config.setMappingFiles(Arrays.asList("mapping.xml"));
-
- MapperFactory factory = new MapperFactory(camelContext, config);
- return factory.create();
- }
-
- public static Mapper createCleanMapper(CamelContext camelContext) {
- MapperFactory factory = new MapperFactory(camelContext, null);
- return factory.create();
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerTypeConverterDTOTest.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerTypeConverterDTOTest.java
deleted file mode 100644
index 58bfade36a0..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerTypeConverterDTOTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import java.util.Arrays;
-
-import com.github.dozermapper.core.loader.api.BeanMappingBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.converter.dozer.dto.CustomerDTO;
-import org.apache.camel.converter.dozer.model.Customer;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import static org.apache.camel.converter.dozer.DozerTestArtifactsFactory.createDtoCustomer;
-
-public class DozerTypeConverterDTOTest extends CamelTestSupport {
-
- @Override
- @BeforeEach
- public void setUp() throws Exception {
- super.setUp();
-
- BeanMappingBuilder beanMappingBuilder = new BeanMappingBuilder() {
- @Override
- protected void configure() {
- mapping(CustomerDTO.class, Customer.class);
- }
- };
-
- DozerBeanMapperConfiguration config = new DozerBeanMapperConfiguration();
- config.setBeanMappingBuilders(Arrays.asList(beanMappingBuilder));
-
- try (DozerTypeConverterLoader dtcl = new DozerTypeConverterLoader(context, config)) {
- }
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:service-in").bean(new CustomerProcessor()).to("mock:verify-model");
- }
- };
- }
-
- @Test
- void verifyCamelConversionViaDozer() throws Exception {
- MockEndpoint mock = getMockEndpoint("mock:verify-model");
- mock.expectedMessageCount(1);
-
- template.sendBody("direct:service-in", createDtoCustomer());
-
- MockEndpoint.assertIsSatisfied(context);
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerTypeConverterTest.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerTypeConverterTest.java
deleted file mode 100644
index 9679fe65978..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerTypeConverterTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import java.util.Arrays;
-
-import com.github.dozermapper.core.Mapper;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.converter.dozer.service.Customer;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import static org.apache.camel.converter.dozer.DozerTestArtifactsFactory.createServiceCustomer;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class DozerTypeConverterTest extends CamelTestSupport {
-
- @Override
- @BeforeEach
- public void setUp() throws Exception {
- super.setUp();
-
- DozerBeanMapperConfiguration config = new DozerBeanMapperConfiguration();
- config.setMappingFiles(Arrays.asList("mapping.xml"));
-
- try (DozerTypeConverterLoader dtcl = new DozerTypeConverterLoader(context, config)) {
- }
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:service-in").bean(new CustomerProcessor()).to("mock:verify-model");
- }
- };
- }
-
- @Test
- void verifyCamelConversionViaDozer() throws Exception {
- MockEndpoint mock = getMockEndpoint("mock:verify-model");
- mock.expectedMessageCount(1);
-
- template.sendBody("direct:service-in", createServiceCustomer());
-
- MockEndpoint.assertIsSatisfied(context);
- }
-
- @Test
- void verifyCustomerMapping() {
- Mapper mapper = DozerTestArtifactsFactory.createMapper(context);
- Customer service = createServiceCustomer();
- org.apache.camel.converter.dozer.model.Customer model
- = mapper.map(service, org.apache.camel.converter.dozer.model.Customer.class);
- Customer roundTrip = mapper.map(model, Customer.class);
- assertEquals(service, roundTrip);
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/SpringDozerTypeConverterConfigurationTest.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/SpringDozerTypeConverterConfigurationTest.java
deleted file mode 100644
index eb10c7a0a32..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/SpringDozerTypeConverterConfigurationTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import static org.apache.camel.converter.dozer.DozerTestArtifactsFactory.createServiceCustomer;
-
-public class SpringDozerTypeConverterConfigurationTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractXmlApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("SpringDozerTypeConverterConfigurationTest.xml");
- }
-
- @Test
- void verifyCamelConversionViaDozer() throws Exception {
- MockEndpoint mock = getMockEndpoint("mock:verify-model");
- mock.expectedMessageCount(1);
-
- template.sendBody("direct:service-in", createServiceCustomer());
-
- MockEndpoint.assertIsSatisfied(context);
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/SpringDozerTypeConverterTest.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/SpringDozerTypeConverterTest.java
deleted file mode 100644
index f3d06ced805..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/SpringDozerTypeConverterTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import static org.apache.camel.converter.dozer.DozerTestArtifactsFactory.createServiceCustomer;
-
-public class SpringDozerTypeConverterTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractXmlApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("application-context.xml");
- }
-
- @Test
- void verifyCamelConversionViaDozer() throws Exception {
- MockEndpoint mock = getMockEndpoint("mock:verify-model");
- mock.expectedMessageCount(1);
-
- template.sendBody("direct:service-in", createServiceCustomer());
-
- MockEndpoint.assertIsSatisfied(context);
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/SpringDozerTypeConverterWithMapIdTest.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/SpringDozerTypeConverterWithMapIdTest.java
deleted file mode 100644
index 8367af16b42..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/SpringDozerTypeConverterWithMapIdTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.converter.dozer;
-
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import static org.apache.camel.converter.dozer.DozerTestArtifactsFactory.createServiceCustomer;
-
-public class SpringDozerTypeConverterWithMapIdTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractXmlApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("application-context-map-id.xml");
- }
-
- @Test
- void verifyCamelConversionViaDozer() throws Exception {
- MockEndpoint mock = getMockEndpoint("mock:verify-model");
- mock.expectedMessageCount(1);
-
- template.sendBody("direct:service-in", createServiceCustomer());
-
- MockEndpoint.assertIsSatisfied(context);
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/dto/AddressDTO.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/dto/AddressDTO.java
deleted file mode 100644
index c06dad324fa..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/dto/AddressDTO.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.converter.dozer.dto;
-
-public class AddressDTO {
-
- private String zipCode;
- private String streetName;
-
- public AddressDTO(String zipCode, String streetName) {
- this.zipCode = zipCode;
- this.streetName = streetName;
- }
-
- public String getZipCode() {
- return zipCode;
- }
-
- public void setZipCode(String zipCode) {
- this.zipCode = zipCode;
- }
-
- public String getStreetName() {
- return streetName;
- }
-
- public void setStreetName(String streetName) {
- this.streetName = streetName;
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/dto/CustomerDTO.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/dto/CustomerDTO.java
deleted file mode 100644
index 1a8db7fddcc..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/dto/CustomerDTO.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.converter.dozer.dto;
-
-import java.io.Serializable;
-
-public class CustomerDTO implements Serializable {
-
- private static final long serialVersionUID = 1L;
- private String firstName;
- private String lastName;
- private AddressDTO address;
-
- public CustomerDTO(String firstName, String lastName, AddressDTO address) {
- this.firstName = firstName;
- this.lastName = lastName;
- this.address = address;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public AddressDTO getAddress() {
- return address;
- }
-
- public void setAddress(AddressDTO address) {
- this.address = address;
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/Address.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/Address.java
deleted file mode 100644
index 546caa0f058..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/Address.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.converter.dozer.model;
-
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-public class Address {
-
- private String zipCode;
- private String streetName;
-
- public Address() {
- }
-
- public Address(String zipCode, String streetName) {
- this.zipCode = zipCode;
- this.streetName = streetName;
- }
-
- public String getZipCode() {
- return zipCode;
- }
-
- public void setZipCode(String zipCode) {
- this.zipCode = zipCode;
- }
-
- public String getStreetName() {
- return streetName;
- }
-
- public void setStreetName(String streetName) {
- this.streetName = streetName;
- }
-
- @Override
- public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public String toString() {
- return ToStringBuilder.reflectionToString(this);
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/Customer.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/Customer.java
deleted file mode 100644
index e9f76f0d126..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/Customer.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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.converter.dozer.model;
-
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-public class Customer {
-
- private String firstName;
- private String lastName;
- private Address address;
-
- public Customer() {
- }
-
- public Customer(String firstName, String lastName, Address address) {
- this.firstName = firstName;
- this.lastName = lastName;
- this.address = address;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public Address getAddress() {
- return address;
- }
-
- public void setAddress(Address address) {
- this.address = address;
- }
-
- @Override
- public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public String toString() {
- return ToStringBuilder.reflectionToString(this);
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java
deleted file mode 100644
index 8d248b61646..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.converter.dozer.model;
-
-public class CustomerA {
-
- private String firstName;
- private String lastName;
- private String street;
- private String zip;
-
- public CustomerA() {
- }
-
- public CustomerA(String firstName, String lastName, String street, String zip) {
- this.firstName = firstName;
- this.lastName = lastName;
- this.street = street;
- this.zip = zip;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public String getStreet() {
- return street;
- }
-
- public void setStreet(String street) {
- this.street = street;
- }
-
- public String getZip() {
- return zip;
- }
-
- public void setZip(String zip) {
- this.zip = zip;
- }
-
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java
deleted file mode 100644
index 1ecfbd459d5..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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.converter.dozer.model;
-
-public class CustomerB {
-
- private String firstName;
- private String lastName;
- private Address address;
-
- public CustomerB() {
- }
-
- public CustomerB(String firstName, String lastName, Address address) {
- this.firstName = firstName;
- this.lastName = lastName;
- this.address = address;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public Address getAddress() {
- return address;
- }
-
- public void setAddress(Address address) {
- this.address = address;
- }
-
- public static class Address {
-
- private String street;
- private String zip;
-
- public Address() {
- }
-
- public Address(String street, String zip) {
- this.street = street;
- this.zip = zip;
- }
-
- public String getStreet() {
- return street;
- }
-
- public void setStreet(String street) {
- this.street = street;
- }
-
- public String getZip() {
- return zip;
- }
-
- public void setZip(String zip) {
- this.zip = zip;
- }
- }
-}
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/service/Customer.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/service/Customer.java
deleted file mode 100644
index 58df74b8171..00000000000
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/service/Customer.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.converter.dozer.service;
-
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-public class Customer {
-
- private String firstName;
-
- private String lastName;
-
- private String street;
-
- private String zip;
-
- public Customer() {
- }
-
- public Customer(String firstName, String lastName, String zip, String street) {
- this.firstName = firstName;
- this.lastName = lastName;
- this.zip = zip;
- this.street = street;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public String getStreet() {
- return street;
- }
-
- public void setStreet(String street) {
- this.street = street;
- }
-
- public String getZip() {
- return zip;
- }
-
- public void setZip(String zip) {
- this.zip = zip;
- }
-
- @Override
- public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public String toString() {
- return ToStringBuilder.reflectionToString(this);
- }
-
-}
diff --git a/components/camel-dozer/src/test/resources/SpringDozerTypeConverterConfigurationTest.xml b/components/camel-dozer/src/test/resources/SpringDozerTypeConverterConfigurationTest.xml
deleted file mode 100644
index 07b5ee2478a..00000000000
--- a/components/camel-dozer/src/test/resources/SpringDozerTypeConverterConfigurationTest.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:service-in"/>
- <to uri="bean:customer-processor"/>
- <to uri="mock:verify-model"/>
- </route>
- </camelContext>
-
- <bean id="customer-processor" class="org.apache.camel.converter.dozer.CustomerProcessor"/>
-
- <bean id="dozerConverterLoader" class="org.apache.camel.converter.dozer.DozerTypeConverterLoader">
- <constructor-arg index="0" ref="camel"/>
- <constructor-arg index="1" ref="mapper"/>
- </bean>
-
- <!-- use bean mapping configuration -->
- <bean id="mapper" class="org.apache.camel.converter.dozer.DozerBeanMapperConfiguration">
- <property name="mappingFiles">
- <list>
- <value>mapping.xml</value>
- </list>
- </property>
- </bean>
-
-</beans>
\ No newline at end of file
diff --git a/components/camel-dozer/src/test/resources/application-context-map-id.xml b/components/camel-dozer/src/test/resources/application-context-map-id.xml
deleted file mode 100644
index 53461d34310..00000000000
--- a/components/camel-dozer/src/test/resources/application-context-map-id.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:service-in"/>
- <to uri="bean:customer-processor"/>
- <to uri="mock:verify-model"/>
- </route>
- </camelContext>
-
- <bean id="customer-processor" class="org.apache.camel.converter.dozer.CustomerProcessor"/>
- <bean id="dozerConverterLoader" class="org.apache.camel.converter.dozer.DozerTypeConverterLoader"/>
-
- <bean id="mapConfig" class="org.apache.camel.converter.dozer.DozerBeanMapperConfiguration">
- <property name="mappingFiles">
- <list>
- <value>mapping-map-id.xml</value>
- </list>
- </property>
- </bean>
-
- <bean id="mapperFactory" class="org.apache.camel.converter.dozer.MapperFactory">
- <constructor-arg index="0" ref="camel"/>
- <constructor-arg index="1" ref="mapConfig"/>
- </bean>
-
- <bean id="mapper" class="com.github.dozermapper.core.Mapper" factory-bean="mapperFactory" factory-method="create"/>
-
-</beans>
diff --git a/components/camel-dozer/src/test/resources/application-context.xml b/components/camel-dozer/src/test/resources/application-context.xml
deleted file mode 100644
index 2d2eb299849..00000000000
--- a/components/camel-dozer/src/test/resources/application-context.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:service-in"/>
- <to uri="bean:customer-processor"/>
- <to uri="mock:verify-model"/>
- </route>
- </camelContext>
-
- <bean id="customer-processor" class="org.apache.camel.converter.dozer.CustomerProcessor"/>
- <bean id="dozerConverterLoader" class="org.apache.camel.converter.dozer.DozerTypeConverterLoader"/>
-
- <bean id="mapConfig" class="org.apache.camel.converter.dozer.DozerBeanMapperConfiguration">
- <property name="mappingFiles">
- <list>
- <value>mapping.xml</value>
- </list>
- </property>
- </bean>
-
- <bean id="mapperFactory" class="org.apache.camel.converter.dozer.MapperFactory">
- <constructor-arg index="0" ref="camel"/>
- <constructor-arg index="1" ref="mapConfig"/>
- </bean>
-
- <bean id="mapper" class="com.github.dozermapper.core.Mapper" factory-bean="mapperFactory" factory-method="create"/>
-
-</beans>
diff --git a/components/camel-dozer/src/test/resources/bean-to-bean-dozer-mappings.xml b/components/camel-dozer/src/test/resources/bean-to-bean-dozer-mappings.xml
deleted file mode 100644
index 00db0a744fe..00000000000
--- a/components/camel-dozer/src/test/resources/bean-to-bean-dozer-mappings.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping>
- <class-a>org.apache.camel.converter.dozer.model.CustomerA</class-a>
- <class-b>org.apache.camel.converter.dozer.model.CustomerB</class-b>
- <field>
- <a>street</a>
- <b>address.street</b>
- </field>
- <field>
- <a>zip</a>
- <b>address.zip</b>
- </field>
- </mapping>
-
-</mappings>
diff --git a/components/camel-dozer/src/test/resources/bean-to-map-dozer-mappings.xml b/components/camel-dozer/src/test/resources/bean-to-map-dozer-mappings.xml
deleted file mode 100644
index c8d0177538f..00000000000
--- a/components/camel-dozer/src/test/resources/bean-to-map-dozer-mappings.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping>
- <class-a>org.apache.camel.converter.dozer.model.Customer</class-a>
- <class-b>java.util.HashMap</class-b>
- <field>
- <a>firstName</a>
- <b key="firstName">this</b>
- </field>
- <field>
- <a>lastName</a>
- <b key="lastName">this</b>
- </field>
- </mapping>
-
-</mappings>
diff --git a/components/camel-dozer/src/test/resources/log4j2.properties b/components/camel-dozer/src/test/resources/log4j2.properties
deleted file mode 100644
index fc36344db2a..00000000000
--- a/components/camel-dozer/src/test/resources/log4j2.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-appender.out.type = File
-appender.out.name = out
-appender.out.fileName = target/camel-dozer-test.log
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-appender.stdout.type = Console
-appender.stdout.name = stdout
-appender.stdout.layout.type = PatternLayout
-appender.stdout.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-logger.springframework.name = org.springframework
-logger.springframework.level = WARN
-rootLogger.level = INFO
-rootLogger.appenderRef.out.ref = out
diff --git a/components/camel-dozer/src/test/resources/mapping-map-id.xml b/components/camel-dozer/src/test/resources/mapping-map-id.xml
deleted file mode 100644
index db8abaacc17..00000000000
--- a/components/camel-dozer/src/test/resources/mapping-map-id.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping map-id="foo">
- <class-a>org.apache.camel.converter.dozer.service.Customer</class-a>
- <class-b>org.apache.camel.converter.dozer.model.Customer</class-b>
- <field>
- <a>street</a>
- <b>address.streetName</b>
- </field>
- <field>
- <a>zip</a>
- <b>address.zipCode</b>
- </field>
- </mapping>
-</mappings>
diff --git a/components/camel-dozer/src/test/resources/mapping.xml b/components/camel-dozer/src/test/resources/mapping.xml
deleted file mode 100644
index 10852822f18..00000000000
--- a/components/camel-dozer/src/test/resources/mapping.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping>
- <class-a>org.apache.camel.converter.dozer.service.Customer</class-a>
- <class-b>org.apache.camel.converter.dozer.model.Customer</class-b>
- <field>
- <a>street</a>
- <b>address.streetName</b>
- </field>
- <field>
- <a>zip</a>
- <b>address.zipCode</b>
- </field>
- </mapping>
-</mappings>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/CustomMappingTest-context.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/CustomMappingTest-context.xml
deleted file mode 100644
index a6435fd49e3..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/CustomMappingTest-context.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <!-- Camel route -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <endpoint uri="dozer:java2java?mappingConfiguration=#mapConfig&targetModel=org.apache.camel.component.dozer.example.xyz.XYZOrder" id="java2java"/>
- <route>
- <from uri="direct:start"/>
- <to uri="ref:java2java"/>
- <to uri="mock:result"/>
- </route>
- </camelContext>
-
- <bean id="mapConfig" class="org.apache.camel.converter.dozer.DozerBeanMapperConfiguration">
- <property name="mappingFiles">
- <list>
- <value>org/apache/camel/component/dozer/customMapping.xml</value>
- </list>
- </property>
- </bean>
-</beans>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/ExpressionMappingClasspathTest-context.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/ExpressionMappingClasspathTest-context.xml
deleted file mode 100644
index 704b63abcf2..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/ExpressionMappingClasspathTest-context.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <!-- Camel route -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <endpoint uri="dozer:java2java?mappingFile=org/apache/camel/component/dozer/expressionMappingClasspath.xml&targetModel=org.apache.camel.component.dozer.example.xyz.XYZOrder&sourceModel=org.apache.camel.component.dozer.example.abc.ABCOrder" id="java2java"/>
- <route>
- <from uri="direct:start"/>
- <to uri="ref:java2java"/>
- <to uri="mock:result"/>
- </route>
-</camelContext>
-</beans>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/ExpressionMappingFileTest-context.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/ExpressionMappingFileTest-context.xml
deleted file mode 100644
index 6b80add339d..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/ExpressionMappingFileTest-context.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <!-- Camel route -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <endpoint uri="dozer:java2java?mappingFile=org/apache/camel/component/dozer/expressionMappingFile.xml&targetModel=org.apache.camel.component.dozer.example.xyz.XYZOrder&sourceModel=org.apache.camel.component.dozer.example.abc.ABCOrder" id="java2java"/>
- <route>
- <from uri="direct:start"/>
- <to uri="ref:java2java"/>
- <to uri="mock:result"/>
- </route>
-</camelContext>
-</beans>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/ExpressionMappingTest-context.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/ExpressionMappingTest-context.xml
deleted file mode 100644
index 72161ec806a..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/ExpressionMappingTest-context.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <!-- Camel route -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <endpoint uri="dozer:java2java?mappingFile=org/apache/camel/component/dozer/expressionMapping.xml&targetModel=org.apache.camel.component.dozer.example.xyz.XYZOrder&sourceModel=org.apache.camel.component.dozer.example.abc.ABCOrder" id="java2java"/>
- <route>
- <from uri="direct:start"/>
- <to uri="ref:java2java"/>
- <to uri="mock:result"/>
- </route>
-</camelContext>
-</beans>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/VariableMappingTest-context.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/VariableMappingTest-context.xml
deleted file mode 100644
index 90583529a16..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/VariableMappingTest-context.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <!-- Camel route -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <endpoint uri="dozer:java2java?mappingFile=org/apache/camel/component/dozer/variableMapping.xml&targetModel=org.apache.camel.component.dozer.example.xyz.XYZOrder&sourceModel=org.apache.camel.component.dozer.example.abc.ABCOrder" id="java2java"/>
- <route>
- <from uri="direct:start"/>
- <to uri="ref:java2java"/>
- <to uri="mock:result"/>
- </route>
-</camelContext>
-</beans>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/XmlToJsonTest-context.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/XmlToJsonTest-context.xml
deleted file mode 100644
index 6820bbd6c41..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/XmlToJsonTest-context.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <!-- Camel route -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <endpoint uri="dozer:xml2json?mappingFile=org/apache/camel/component/dozer/dozerBeanMapping.xml&marshalId=myjson&unmarshalId=myjaxb&targetModel=org.apache.camel.component.dozer.example.xyz.XYZOrder&sourceModel=org.apache.camel.component.dozer.example.abc.ABCOrder" id="xml2json"/>
- <dataFormats>
- <json library="Jackson" id="myjson"/>
- <jaxb contextPath="org.apache.camel.component.dozer.example.abc" id="myjaxb"/>
- </dataFormats>
- <route>
- <from uri="direct:start"/>
- <to uri="ref:xml2json"/>
- <to uri="mock:result"/>
- </route>
-</camelContext>
-</beans>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/abc-order.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/abc-order.xml
deleted file mode 100644
index bd985cb6b57..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/abc-order.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<ABCOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:java="http://java.sun.com">
- <header>
- <status>GOLD</status>
- <customer-num>ACME-123</customer-num>
- <order-num>ORDER1</order-num>
- </header>
- <order-items>
- <item id="PICKLE">
- <price>2.25</price>
- <quantity>1000</quantity>
- </item>
- </order-items>
-</ABCOrder>
\ No newline at end of file
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/customMapping.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/customMapping.xml
deleted file mode 100644
index fe41e409942..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/customMapping.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
- 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.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping>
- <class-a>org.apache.camel.component.dozer.example.abc.ABCOrder</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.XYZOrder</class-b>
- <field custom-converter-id="_customMapping"
- custom-converter-param="org.apache.camel.component.dozer.example.CustomMapper">
- <a>header.customerNum</a>
- <b>custId</b>
- </field>
- <field custom-converter-id="_customMapping"
- custom-converter-param="org.apache.camel.component.dozer.example.CustomMapperOperations,custom2">
- <a>header.status</a>
- <b>priority</b>
- </field>
- <field>
- <a>header.orderNum</a>
- <b>orderId</b>
- </field>
- <field>
- <a>orderItems.item</a>
- <b>lineItems</b>
- </field>
- </mapping>
- <mapping>
- <class-a>org.apache.camel.component.dozer.example.abc.ABCOrder$OrderItems$Item</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.LineItem</class-b>
- <field>
- <a>id</a>
- <b>itemId</b>
- </field>
- <field>
- <a>price</a>
- <b>cost</b>
- </field>
- <field>
- <a>quantity</a>
- <b>amount</b>
- </field>
- </mapping>
-</mappings>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/dozerBeanMapping.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/dozerBeanMapping.xml
deleted file mode 100644
index 03e6d738739..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/dozerBeanMapping.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
- 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.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping>
- <class-a>org.apache.camel.component.dozer.example.abc.ABCOrder</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.XYZOrder</class-b>
- <field>
- <a>header.customerNum</a>
- <b>custId</b>
- </field>
- <field>
- <a>header.status</a>
- <b>priority</b>
- </field>
- <field>
- <a>header.orderNum</a>
- <b>orderId</b>
- </field>
- <field>
- <a>orderItems.item</a>
- <b>lineItems</b>
- </field>
- </mapping>
- <mapping>
- <class-a>org.apache.camel.component.dozer.example.abc.ABCOrder$OrderItems$Item</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.LineItem</class-b>
- <field>
- <a>id</a>
- <b>itemId</b>
- </field>
- <field>
- <a>price</a>
- <b>cost</b>
- </field>
- <field>
- <a>quantity</a>
- <b>amount</b>
- </field>
- </mapping>
-</mappings>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionClasspath.txt b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionClasspath.txt
deleted file mode 100644
index 418906f8cd2..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionClasspath.txt
+++ /dev/null
@@ -1 +0,0 @@
-orderNumber
\ No newline at end of file
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionFile.txt b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionFile.txt
deleted file mode 100644
index 418906f8cd2..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionFile.txt
+++ /dev/null
@@ -1 +0,0 @@
-orderNumber
\ No newline at end of file
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionMapping.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionMapping.xml
deleted file mode 100644
index 1640e251e58..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionMapping.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
- 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.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping>
- <class-a>org.apache.camel.component.dozer.example.abc.ABCOrder</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.XYZOrder</class-b>
- <field>
- <a>header.status</a>
- <b>priority</b>
- </field>
- <field>
- <a>header.orderNum</a>
- <b>orderId</b>
- </field>
- </mapping>
- <mapping>
- <class-a>org.apache.camel.component.dozer.ExpressionMapper</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.XYZOrder</class-b>
- <field custom-converter-id="_expressionMapping" custom-converter-param="simple:\${header.customerNumber}">
- <a>expression</a>
- <b>custId</b>
- </field>
- <field custom-converter-id="_expressionMapping" custom-converter-param="header:orderNumber">
- <a>expression</a>
- <b>orderId</b>
- </field>
- </mapping>
-</mappings>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionMappingClasspath.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionMappingClasspath.xml
deleted file mode 100644
index 5c303ab3ffd..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionMappingClasspath.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
- 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.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping>
- <class-a>org.apache.camel.component.dozer.example.abc.ABCOrder</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.XYZOrder</class-b>
- <field>
- <a>header.status</a>
- <b>priority</b>
- </field>
- <field>
- <a>header.orderNum</a>
- <b>orderId</b>
- </field>
- </mapping>
- <mapping>
- <class-a>org.apache.camel.component.dozer.ExpressionMapper</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.XYZOrder</class-b>
- <field custom-converter-id="_expressionMapping" custom-converter-param="simple:\${header.customerNumber}">
- <a>expression</a>
- <b>custId</b>
- </field>
- <field custom-converter-id="_expressionMapping" custom-converter-param="header:classpath:/org/apache/camel/component/dozer/expressionClasspath.txt">
- <a>expression</a>
- <b>orderId</b>
- </field>
- </mapping>
-</mappings>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionMappingFile.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionMappingFile.xml
deleted file mode 100644
index 40859bfc79a..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/expressionMappingFile.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
- 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.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping>
- <class-a>org.apache.camel.component.dozer.example.abc.ABCOrder</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.XYZOrder</class-b>
- <field>
- <a>header.status</a>
- <b>priority</b>
- </field>
- <field>
- <a>header.orderNum</a>
- <b>orderId</b>
- </field>
- </mapping>
- <mapping>
- <class-a>org.apache.camel.component.dozer.ExpressionMapper</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.XYZOrder</class-b>
- <field custom-converter-id="_expressionMapping" custom-converter-param="simple:\${header.customerNumber}">
- <a>expression</a>
- <b>custId</b>
- </field>
- <field custom-converter-id="_expressionMapping" custom-converter-param="header:file:src/test/resources/org/apache/camel/component/dozer/expressionFile.txt">
- <a>expression</a>
- <b>orderId</b>
- </field>
- </mapping>
-</mappings>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/variableMapping.xml b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/variableMapping.xml
deleted file mode 100644
index 978b90741d9..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/variableMapping.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
- 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.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <configuration>
- <variables>
- <variable name="CUST_ID">ACME-SALES</variable>
- <variable name="ORDER_ID">W123-EG</variable>
- </variables>
- </configuration>
- <mapping>
- <class-a>org.apache.camel.component.dozer.example.abc.ABCOrder</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.XYZOrder</class-b>
- <field>
- <a>header.status</a>
- <b>priority</b>
- </field>
- <field>
- <a>header.orderNum</a>
- <b>orderId</b>
- </field>
- </mapping>
- <mapping>
- <class-a>org.apache.camel.component.dozer.VariableMapper</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.XYZOrder</class-b>
- <field custom-converter-id="_variableMapping" custom-converter-param="${CUST_ID}">
- <a>literal</a>
- <b>custId</b>
- </field>
- <field custom-converter-id="_variableMapping" custom-converter-param="${ORDER_ID}">
- <a>literal</a>
- <b>orderId</b>
- </field>
- </mapping>
- <mapping>
- <class-a>org.apache.camel.component.dozer.example.abc.ABCOrder$OrderItems$Item</class-a>
- <class-b>org.apache.camel.component.dozer.example.xyz.LineItem</class-b>
- <field>
- <a>id</a>
- <b>itemId</b>
- </field>
- <field>
- <a>price</a>
- <b>cost</b>
- </field>
- <field>
- <a>quantity</a>
- <b>amount</b>
- </field>
- </mapping>
-</mappings>
diff --git a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/xyz-order.json b/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/xyz-order.json
deleted file mode 100644
index cc90787dbc9..00000000000
--- a/components/camel-dozer/src/test/resources/org/apache/camel/component/dozer/xyz-order.json
+++ /dev/null
@@ -1 +0,0 @@
-{"custId":"ACME-123","priority":"GOLD","orderId":"ORDER1","lineItems":[{"itemId":"PICKLE","amount":1000,"cost":2.25}]}
\ No newline at end of file
diff --git a/components/pom.xml b/components/pom.xml
index e32aa8cd883..ed6b269285f 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -128,7 +128,6 @@
<module>camel-djl</module>
<module>camel-dns</module>
<module>camel-docker</module>
- <module>camel-dozer</module>
<module>camel-drill</module>
<module>camel-dropbox</module>
<module>camel-dynamic-router</module>
diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
index fe1b8342514..6ad2a105e1c 100644
--- a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
+++ b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
@@ -84,7 +84,6 @@ disruptor-vm
djl
dns
docker
-dozer
drill
dropbox
dynamic-router
diff --git a/docs/components/modules/ROOT/examples/json/dozer.json b/docs/components/modules/ROOT/examples/json/dozer.json
deleted file mode 120000
index 94326a7aebb..00000000000
--- a/docs/components/modules/ROOT/examples/json/dozer.json
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../components/camel-dozer/src/generated/resources/org/apache/camel/component/dozer/dozer.json
\ No newline at end of file
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index 878b1b33e40..639bd2b631a 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -87,7 +87,6 @@
** xref:disruptor-vm-component.adoc[Disruptor VM]
** xref:dns-component.adoc[DNS]
** xref:docker-component.adoc[Docker]
-** xref:dozer-component.adoc[Dozer]
** xref:drill-component.adoc[Drill]
** xref:dropbox-component.adoc[Dropbox]
** xref:dynamic-router-component.adoc[Dynamic Router]
diff --git a/docs/components/modules/ROOT/pages/dozer-component.adoc b/docs/components/modules/ROOT/pages/dozer-component.adoc
deleted file mode 120000
index 0430bcf94fa..00000000000
--- a/docs/components/modules/ROOT/pages/dozer-component.adoc
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../components/camel-dozer/src/main/docs/dozer-component.adoc
\ No newline at end of file
diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc
index 0e116698538..c13e8174399 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc
@@ -85,4 +85,11 @@ For example as shown below for the context health check:
}
}
}
-----
\ No newline at end of file
+----
+
+
+=== Deprecated Components
+
+The following components that had been marked as deprecated, were removed in this release:
+
+* camel-dozer
diff --git a/docs/user-manual/modules/ROOT/pages/transformer.adoc b/docs/user-manual/modules/ROOT/pages/transformer.adoc
index 6f6ca6fa3a1..b5a27cb69c6 100644
--- a/docs/user-manual/modules/ROOT/pages/transformer.adoc
+++ b/docs/user-manual/modules/ROOT/pages/transformer.adoc
@@ -94,14 +94,14 @@ Here is an example to specify endpoint URI in Java DSL:
transformer()
.fromType("xml")
.toType("json")
- .withUri("dozer:myDozer?mappingFile=myMapping.xml...");
+ .withUri("component:componentPathOptions?mappingFile=myMapping.xml...");
----
And here is an example to specify endpoint ref in XML DSL:
[source,xml]
----
-<endpointTransformer ref="myDozerEndpoint" fromType="xml" toType="json"/>
+<endpointTransformer ref="myEndpoint" fromType="xml" toType="json"/>
----
== Custom Transformer Options
@@ -196,4 +196,4 @@ XML DSL:
== See Also
-The xref:validator.adoc[Validator] is a related functionality.
\ No newline at end of file
+The xref:validator.adoc[Validator] is a related functionality.
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index db5aaa3a824..6c859bfaa7d 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -1187,20 +1187,6 @@ public interface ComponentsBuilderFactory {
static org.apache.camel.builder.component.dsl.DockerComponentBuilderFactory.DockerComponentBuilder docker() {
return org.apache.camel.builder.component.dsl.DockerComponentBuilderFactory.docker();
}
- /**
- * Dozer (camel-dozer)
- * Map between Java beans using the Dozer mapping library.
- *
- * Category: transformation
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-dozer
- *
- * @return the dsl builder
- */
- @Deprecated
- static org.apache.camel.builder.component.dsl.DozerComponentBuilderFactory.DozerComponentBuilder dozer() {
- return org.apache.camel.builder.component.dsl.DozerComponentBuilderFactory.dozer();
- }
/**
* Drill (camel-drill)
* Perform queries against an Apache Drill cluster.
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DozerComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DozerComponentBuilderFactory.java
deleted file mode 100644
index de9165e5dac..00000000000
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DozerComponentBuilderFactory.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.builder.component.dsl;
-
-import javax.annotation.Generated;
-import org.apache.camel.Component;
-import org.apache.camel.builder.component.AbstractComponentBuilder;
-import org.apache.camel.builder.component.ComponentBuilder;
-import org.apache.camel.component.dozer.DozerComponent;
-
-/**
- * Map between Java beans using the Dozer mapping library.
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
-public interface DozerComponentBuilderFactory {
-
- /**
- * Dozer (camel-dozer)
- * Map between Java beans using the Dozer mapping library.
- *
- * Category: transformation
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-dozer
- *
- * @return the dsl builder
- */
- @Deprecated
- static DozerComponentBuilder dozer() {
- return new DozerComponentBuilderImpl();
- }
-
- /**
- * Builder for the Dozer component.
- */
- interface DozerComponentBuilder extends ComponentBuilder<DozerComponent> {
- /**
- * Whether the producer should be started lazy (on the first message).
- * By starting lazy you can use this to allow CamelContext and routes to
- * startup in situations where a producer may otherwise fail during
- * starting and cause the route to fail being started. By deferring this
- * startup to be lazy then the startup failure can be handled during
- * routing messages via Camel's routing error handlers. Beware that when
- * the first message is processed then creating and starting the
- * producer may take a little time and prolong the total processing time
- * of the processing.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: producer
- *
- * @param lazyStartProducer the value to set
- * @return the dsl builder
- */
- default DozerComponentBuilder lazyStartProducer(
- boolean lazyStartProducer) {
- doSetProperty("lazyStartProducer", lazyStartProducer);
- return this;
- }
- /**
- * Whether autowiring is enabled. This is used for automatic autowiring
- * options (the option must be marked as autowired) by looking up in the
- * registry to find if there is a single instance of matching type,
- * which then gets configured on the component. This can be used for
- * automatic configuring JDBC data sources, JMS connection factories,
- * AWS Clients, etc.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: advanced
- *
- * @param autowiredEnabled the value to set
- * @return the dsl builder
- */
- default DozerComponentBuilder autowiredEnabled(boolean autowiredEnabled) {
- doSetProperty("autowiredEnabled", autowiredEnabled);
- return this;
- }
- }
-
- class DozerComponentBuilderImpl
- extends
- AbstractComponentBuilder<DozerComponent>
- implements
- DozerComponentBuilder {
- @Override
- protected DozerComponent buildConcreteComponent() {
- return new DozerComponent();
- }
- @Override
- protected boolean setPropertyOnComponent(
- Component component,
- String name,
- Object value) {
- switch (name) {
- case "lazyStartProducer": ((DozerComponent) component).setLazyStartProducer((boolean) value); return true;
- case "autowiredEnabled": ((DozerComponent) component).setAutowiredEnabled((boolean) value); return true;
- default: return false;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/dsl/camel-componentdsl/src/generated/resources/metadata.json b/dsl/camel-componentdsl/src/generated/resources/metadata.json
index 9235d25b454..a260b408adb 100644
--- a/dsl/camel-componentdsl/src/generated/resources/metadata.json
+++ b/dsl/camel-componentdsl/src/generated/resources/metadata.json
@@ -1905,28 +1905,6 @@
"producerOnly": false,
"lenientProperties": true
},
- "DozerComponentBuilderFactory": {
- "kind": "component",
- "name": "dozer",
- "title": "Dozer",
- "description": "Map between Java beans using the Dozer mapping library.",
- "deprecated": true,
- "firstVersion": "2.15.0",
- "label": "transformation",
- "javaType": "org.apache.camel.component.dozer.DozerComponent",
- "supportLevel": "Stable",
- "groupId": "org.apache.camel",
- "artifactId": "camel-dozer",
- "version": "3.21.0-SNAPSHOT",
- "scheme": "dozer",
- "extendsScheme": "",
- "syntax": "dozer:name",
- "async": false,
- "api": false,
- "consumerOnly": false,
- "producerOnly": true,
- "lenientProperties": false
- },
"DrillComponentBuilderFactory": {
"kind": "component",
"name": "drill",
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index 6084e60cf7e..44c70187de2 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -93,7 +93,6 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.DisruptorVmEndpointBuilderFactory.DisruptorVmBuilders,
org.apache.camel.builder.endpoint.dsl.DnsEndpointBuilderFactory.DnsBuilders,
org.apache.camel.builder.endpoint.dsl.DockerEndpointBuilderFactory.DockerBuilders,
- org.apache.camel.builder.endpoint.dsl.DozerEndpointBuilderFactory.DozerBuilders,
org.apache.camel.builder.endpoint.dsl.DrillEndpointBuilderFactory.DrillBuilders,
org.apache.camel.builder.endpoint.dsl.DropboxEndpointBuilderFactory.DropboxBuilders,
org.apache.camel.builder.endpoint.dsl.DynamicRouterEndpointBuilderFactory.DynamicRouterBuilders,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index 5d9763bc4c9..e0c23a5a6e7 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -90,7 +90,6 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.DisruptorVmEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.DnsEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.DockerEndpointBuilderFactory,
- org.apache.camel.builder.endpoint.dsl.DozerEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.DrillEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.DropboxEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.DynamicRouterEndpointBuilderFactory,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 12fa27e5e70..924168a2931 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -3951,51 +3951,6 @@ public class StaticEndpointBuilders {
String path) {
return org.apache.camel.builder.endpoint.dsl.DockerEndpointBuilderFactory.endpointBuilder(componentName, path);
}
- /**
- * Dozer (camel-dozer)
- * Map between Java beans using the Dozer mapping library.
- *
- * Category: transformation
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-dozer
- *
- * Syntax: <code>dozer:name</code>
- *
- * Path parameter: name (required)
- * A human readable name of the mapping.
- *
- * @param path name
- * @return the dsl builder
- */
- @Deprecated
- public static org.apache.camel.builder.endpoint.dsl.DozerEndpointBuilderFactory.DozerEndpointBuilder dozer(
- String path) {
- return org.apache.camel.builder.endpoint.dsl.DozerEndpointBuilderFactory.endpointBuilder("dozer", path);
- }
- /**
- * Dozer (camel-dozer)
- * Map between Java beans using the Dozer mapping library.
- *
- * Category: transformation
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-dozer
- *
- * Syntax: <code>dozer:name</code>
- *
- * Path parameter: name (required)
- * A human readable name of the mapping.
- *
- * @param componentName to use a custom component name for the endpoint
- * instead of the default name
- * @param path name
- * @return the dsl builder
- */
- @Deprecated
- public static org.apache.camel.builder.endpoint.dsl.DozerEndpointBuilderFactory.DozerEndpointBuilder dozer(
- String componentName,
- String path) {
- return org.apache.camel.builder.endpoint.dsl.DozerEndpointBuilderFactory.endpointBuilder(componentName, path);
- }
/**
* Drill (camel-drill)
* Perform queries against an Apache Drill cluster.
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DozerEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DozerEndpointBuilderFactory.java
deleted file mode 100644
index 9dcfc6139ed..00000000000
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DozerEndpointBuilderFactory.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * 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.builder.endpoint.dsl;
-
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.function.*;
-import java.util.stream.*;
-import javax.annotation.Generated;
-import org.apache.camel.builder.EndpointConsumerBuilder;
-import org.apache.camel.builder.EndpointProducerBuilder;
-import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
-
-/**
- * Map between Java beans using the Dozer mapping library.
- *
- * Generated by camel build tools - do NOT edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
-public interface DozerEndpointBuilderFactory {
-
-
- /**
- * Builder for endpoint for the Dozer component.
- */
- public interface DozerEndpointBuilder extends EndpointProducerBuilder {
- default AdvancedDozerEndpointBuilder advanced() {
- return (AdvancedDozerEndpointBuilder) this;
- }
- /**
- * 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).
- *
- * The option is a:
- * <code>org.apache.camel.converter.dozer.DozerBeanMapperConfiguration</code> type.
- *
- * Group: producer
- *
- * @param mappingConfiguration the value to set
- * @return the dsl builder
- */
- default DozerEndpointBuilder mappingConfiguration(
- org.apache.camel.converter.dozer.DozerBeanMapperConfiguration mappingConfiguration) {
- doSetProperty("mappingConfiguration", mappingConfiguration);
- return this;
- }
- /**
- * 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).
- *
- * The option will be converted to a
- * <code>org.apache.camel.converter.dozer.DozerBeanMapperConfiguration</code> type.
- *
- * Group: producer
- *
- * @param mappingConfiguration the value to set
- * @return the dsl builder
- */
- default DozerEndpointBuilder mappingConfiguration(
- String mappingConfiguration) {
- doSetProperty("mappingConfiguration", mappingConfiguration);
- return this;
- }
- /**
- * 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.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Default: dozerBeanMapping.xml
- * Group: producer
- *
- * @param mappingFile the value to set
- * @return the dsl builder
- */
- default DozerEndpointBuilder mappingFile(String mappingFile) {
- doSetProperty("mappingFile", mappingFile);
- return this;
- }
- /**
- * The id of a dataFormat defined within the Camel Context to use for
- * marshalling the mapping output to a non-Java type.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: producer
- *
- * @param marshalId the value to set
- * @return the dsl builder
- */
- default DozerEndpointBuilder marshalId(String marshalId) {
- doSetProperty("marshalId", marshalId);
- return this;
- }
- /**
- * 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.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: producer
- *
- * @param sourceModel the value to set
- * @return the dsl builder
- */
- default DozerEndpointBuilder sourceModel(String sourceModel) {
- doSetProperty("sourceModel", sourceModel);
- return this;
- }
- /**
- * Fully-qualified class name for the target type used in the mapping.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Required: true
- * Group: producer
- *
- * @param targetModel the value to set
- * @return the dsl builder
- */
- default DozerEndpointBuilder targetModel(String targetModel) {
- doSetProperty("targetModel", targetModel);
- return this;
- }
- /**
- * The id of a dataFormat defined within the Camel Context to use for
- * unmarshalling the mapping input from a non-Java type.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: producer
- *
- * @param unmarshalId the value to set
- * @return the dsl builder
- */
- default DozerEndpointBuilder unmarshalId(String unmarshalId) {
- doSetProperty("unmarshalId", unmarshalId);
- return this;
- }
- }
-
- /**
- * Advanced builder for endpoint for the Dozer component.
- */
- public interface AdvancedDozerEndpointBuilder
- extends
- EndpointProducerBuilder {
- default DozerEndpointBuilder basic() {
- return (DozerEndpointBuilder) this;
- }
- /**
- * Whether the producer should be started lazy (on the first message).
- * By starting lazy you can use this to allow CamelContext and routes to
- * startup in situations where a producer may otherwise fail during
- * starting and cause the route to fail being started. By deferring this
- * startup to be lazy then the startup failure can be handled during
- * routing messages via Camel's routing error handlers. Beware that when
- * the first message is processed then creating and starting the
- * producer may take a little time and prolong the total processing time
- * of the processing.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: producer (advanced)
- *
- * @param lazyStartProducer the value to set
- * @return the dsl builder
- */
- default AdvancedDozerEndpointBuilder lazyStartProducer(
- boolean lazyStartProducer) {
- doSetProperty("lazyStartProducer", lazyStartProducer);
- return this;
- }
- /**
- * Whether the producer should be started lazy (on the first message).
- * By starting lazy you can use this to allow CamelContext and routes to
- * startup in situations where a producer may otherwise fail during
- * starting and cause the route to fail being started. By deferring this
- * startup to be lazy then the startup failure can be handled during
- * routing messages via Camel's routing error handlers. Beware that when
- * the first message is processed then creating and starting the
- * producer may take a little time and prolong the total processing time
- * of the processing.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: false
- * Group: producer (advanced)
- *
- * @param lazyStartProducer the value to set
- * @return the dsl builder
- */
- default AdvancedDozerEndpointBuilder lazyStartProducer(
- String lazyStartProducer) {
- doSetProperty("lazyStartProducer", lazyStartProducer);
- return this;
- }
- }
-
- public interface DozerBuilders {
- /**
- * Dozer (camel-dozer)
- * Map between Java beans using the Dozer mapping library.
- *
- * Category: transformation
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-dozer
- *
- * Syntax: <code>dozer:name</code>
- *
- * Path parameter: name (required)
- * A human readable name of the mapping.
- *
- * @param path name
- * @return the dsl builder
- */
- @Deprecated
- default DozerEndpointBuilder dozer(String path) {
- return DozerEndpointBuilderFactory.endpointBuilder("dozer", path);
- }
- /**
- * Dozer (camel-dozer)
- * Map between Java beans using the Dozer mapping library.
- *
- * Category: transformation
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-dozer
- *
- * Syntax: <code>dozer:name</code>
- *
- * Path parameter: name (required)
- * A human readable name of the mapping.
- *
- * @param componentName to use a custom component name for the endpoint
- * instead of the default name
- * @param path name
- * @return the dsl builder
- */
- @Deprecated
- default DozerEndpointBuilder dozer(String componentName, String path) {
- return DozerEndpointBuilderFactory.endpointBuilder(componentName, path);
- }
- }
- @Deprecated
- static DozerEndpointBuilder endpointBuilder(
- String componentName,
- String path) {
- class DozerEndpointBuilderImpl extends AbstractEndpointBuilder implements DozerEndpointBuilder, AdvancedDozerEndpointBuilder {
- public DozerEndpointBuilderImpl(String path) {
- super(componentName, path);
- }
- }
- return new DozerEndpointBuilderImpl(path);
- }
-}
\ No newline at end of file
diff --git a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
index 8bc66766e28..30ed91d2985 100644
--- a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
+++ b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
@@ -99,7 +99,6 @@ org.apache.camel.component.disruptor.vm.DisruptorVmComponent=camel:disruptor
org.apache.camel.component.djl.DJLComponent=camel:djl
org.apache.camel.component.dns.DnsComponent=camel:dns
org.apache.camel.component.docker.DockerComponent=camel:docker
-org.apache.camel.component.dozer.DozerComponent=camel:dozer
org.apache.camel.component.drill.DrillComponent=camel:drill
org.apache.camel.component.dropbox.DropboxComponent=camel:dropbox
org.apache.camel.component.dynamicrouter.DynamicRouterComponent=camel:dynamic-router
diff --git a/parent/pom.xml b/parent/pom.xml
index ec9cf8f33e1..2372196075a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -152,7 +152,6 @@
<djl-pytorch-native-version>1.8.1</djl-pytorch-native-version>
<djl-tensorflow-native-version>2.4.1</djl-tensorflow-native-version>
<docker-java-version>3.2.13</docker-java-version>
- <dozer-version>6.5.2</dozer-version>
<dropbox-version>5.4.4</dropbox-version>
<debezium-version>1.9.6.Final</debezium-version>
<debezium-mysql-connector-version>8.0.28</debezium-mysql-connector-version>
@@ -1269,11 +1268,6 @@
<artifactId>camel-docker</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-dozer</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-drill</artifactId>
@@ -3539,13 +3533,6 @@
<version>${disruptor-version}</version>
</dependency>
- <!-- optional dozer dependencies -->
- <dependency>
- <groupId>com.github.dozermapper</groupId>
- <artifactId>dozer-core</artifactId>
- <version>${dozer-version}</version>
- </dependency>
-
<!-- optional Dropbox dependencies -->
<dependency>
<groupId>com.dropbox.core</groupId>