You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/05/01 07:26:07 UTC
[camel] branch master updated: CAMEL-13473: Move dataformats back
from camel-base to camel-core and put in better package name,
as they are not part of the engine impl.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 7498da4 CAMEL-13473: Move dataformats back from camel-base to camel-core and put in better package name, as they are not part of the engine impl.
7498da4 is described below
commit 7498da42faddbf0ec855db32fec76bfcbd8fe57b
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed May 1 08:12:38 2019 +0200
CAMEL-13473: Move dataformats back from camel-base to camel-core and put in better package name, as they are not part of the engine impl.
---
.../apache/camel/dataformat}/GzipDataFormat.java | 2 +-
.../camel/dataformat}/SerializationDataFormat.java | 2 +-
.../apache/camel/dataformat}/StringDataFormat.java | 2 +-
.../apache/camel/dataformat}/ZipDataFormat.java | 5 +-
.../reifier/dataformat/GzipDataFormatReifier.java | 2 +-
.../dataformat/SerializationDataFormatReifier.java | 2 +-
.../dataformat/StringDataFormatReifier.java | 2 +-
.../reifier/dataformat/ZipDataFormatReifier.java | 4 +-
.../camel/builder/TransformerBuilderTest.java | 2 +-
.../org/apache/camel/impl/ZipDataFormatTest.java | 2 +-
.../camel/processor/DataFormatFactoryTest.java | 4 +-
.../GzipDataFormatAutoConfiguration.java | 4 +-
.../springboot/GzipDataFormatConfiguration.java | 2 +-
.../SerializationDataFormatAutoConfiguration.java | 4 +-
.../SerializationDataFormatConfiguration.java | 2 +-
.../StringDataFormatAutoConfiguration.java | 4 +-
.../springboot/StringDataFormatConfiguration.java | 2 +-
.../springboot/ZipDataFormatAutoConfiguration.java | 4 +-
.../springboot/ZipDataFormatConfiguration.java | 2 +-
.../springboot/GzipDataFormatConfiguration.java | 55 ---------
.../SerializationDataFormatConfiguration.java | 56 ---------
.../springboot/StringDataFormatConfiguration.java | 68 -----------
.../springboot/ZipDataFormatConfiguration.java | 68 -----------
.../GzipDataFormatAutoConfiguration.java | 126 --------------------
.../SerializationDataFormatAutoConfiguration.java | 127 ---------------------
.../StringDataFormatAutoConfiguration.java | 126 --------------------
.../springboot/ZipDataFormatAutoConfiguration.java | 126 --------------------
.../src/main/resources/META-INF/spring.factories | 8 +-
.../apache/camel/itest/async/HttpAsyncDslTest.java | 2 +-
29 files changed, 31 insertions(+), 784 deletions(-)
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/GzipDataFormat.java b/core/camel-core/src/main/java/org/apache/camel/dataformat/GzipDataFormat.java
similarity index 98%
rename from core/camel-base/src/main/java/org/apache/camel/impl/engine/GzipDataFormat.java
rename to core/camel-core/src/main/java/org/apache/camel/dataformat/GzipDataFormat.java
index 3388757..73ebb8d 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/GzipDataFormat.java
+++ b/core/camel-core/src/main/java/org/apache/camel/dataformat/GzipDataFormat.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.engine;
+package org.apache.camel.dataformat;
import java.io.InputStream;
import java.io.OutputStream;
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/SerializationDataFormat.java b/core/camel-core/src/main/java/org/apache/camel/dataformat/SerializationDataFormat.java
similarity index 98%
rename from core/camel-base/src/main/java/org/apache/camel/impl/engine/SerializationDataFormat.java
rename to core/camel-core/src/main/java/org/apache/camel/dataformat/SerializationDataFormat.java
index 84b57ad..6df85ed 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/SerializationDataFormat.java
+++ b/core/camel-core/src/main/java/org/apache/camel/dataformat/SerializationDataFormat.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.engine;
+package org.apache.camel.dataformat;
import java.io.IOException;
import java.io.InputStream;
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/StringDataFormat.java b/core/camel-core/src/main/java/org/apache/camel/dataformat/StringDataFormat.java
similarity index 98%
rename from core/camel-base/src/main/java/org/apache/camel/impl/engine/StringDataFormat.java
rename to core/camel-core/src/main/java/org/apache/camel/dataformat/StringDataFormat.java
index 1619b6f..a7cb734 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/StringDataFormat.java
+++ b/core/camel-core/src/main/java/org/apache/camel/dataformat/StringDataFormat.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.engine;
+package org.apache.camel.dataformat;
import java.io.IOException;
import java.io.InputStream;
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/ZipDataFormat.java b/core/camel-core/src/main/java/org/apache/camel/dataformat/ZipDataFormat.java
similarity index 95%
rename from core/camel-base/src/main/java/org/apache/camel/impl/engine/ZipDataFormat.java
rename to core/camel-core/src/main/java/org/apache/camel/dataformat/ZipDataFormat.java
index 4c1bffe..9613637 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/ZipDataFormat.java
+++ b/core/camel-core/src/main/java/org/apache/camel/dataformat/ZipDataFormat.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.engine;
+package org.apache.camel.dataformat;
import java.io.InputStream;
import java.io.OutputStream;
@@ -31,8 +31,7 @@ import org.apache.camel.support.service.ServiceSupport;
import org.apache.camel.util.IOHelper;
/**
- * "Deflate" compression data format.
- * See {@link org.apache.camel.model.dataformat.ZipFileDataFormat} for Zip file compression.
+ * Deflate (zip) compression data format (does not support zip files, instead use zipfile dataformat).
*/
@Dataformat("zip")
public class ZipDataFormat extends ServiceSupport implements DataFormat, DataFormatName {
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/GzipDataFormatReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/GzipDataFormatReifier.java
index 01ad83e..a0ba3ba 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/GzipDataFormatReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/GzipDataFormatReifier.java
@@ -29,6 +29,6 @@ public class GzipDataFormatReifier extends DataFormatReifier<GzipDataFormat> {
@Override
protected DataFormat doCreateDataFormat(CamelContext camelContext) {
- return new org.apache.camel.impl.engine.GzipDataFormat();
+ return new org.apache.camel.dataformat.GzipDataFormat();
}
}
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/SerializationDataFormatReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/SerializationDataFormatReifier.java
index cbb184d..84f721b 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/SerializationDataFormatReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/SerializationDataFormatReifier.java
@@ -29,6 +29,6 @@ public class SerializationDataFormatReifier extends DataFormatReifier<Serializat
@Override
protected DataFormat doCreateDataFormat(CamelContext camelContext) {
- return new org.apache.camel.impl.engine.SerializationDataFormat();
+ return new org.apache.camel.dataformat.SerializationDataFormat();
}
}
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/StringDataFormatReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/StringDataFormatReifier.java
index 88e7bfa..769b994 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/StringDataFormatReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/StringDataFormatReifier.java
@@ -29,7 +29,7 @@ public class StringDataFormatReifier extends DataFormatReifier<StringDataFormat>
@Override
protected DataFormat doCreateDataFormat(CamelContext camelContext) {
- return new org.apache.camel.impl.engine.StringDataFormat(definition.getCharset());
+ return new org.apache.camel.dataformat.StringDataFormat(definition.getCharset());
}
}
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/ZipDataFormatReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/ZipDataFormatReifier.java
index a1dac2b..6a12304 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/ZipDataFormatReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/ZipDataFormatReifier.java
@@ -32,9 +32,9 @@ public class ZipDataFormatReifier extends DataFormatReifier<ZipDataFormat> {
@Override
protected DataFormat doCreateDataFormat(CamelContext camelContext) {
if (definition.getCompressionLevel() == null) {
- return new org.apache.camel.impl.engine.ZipDataFormat(Deflater.DEFAULT_COMPRESSION);
+ return new org.apache.camel.dataformat.ZipDataFormat(Deflater.DEFAULT_COMPRESSION);
} else {
- return new org.apache.camel.impl.engine.ZipDataFormat(definition.getCompressionLevel());
+ return new org.apache.camel.dataformat.ZipDataFormat(definition.getCompressionLevel());
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/TransformerBuilderTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/TransformerBuilderTest.java
index 4197ca79..5e15757 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/TransformerBuilderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/TransformerBuilderTest.java
@@ -51,7 +51,7 @@ public class TransformerBuilderTest extends TestSupport {
Field f = DataFormatTransformer.class.getDeclaredField("dataFormat");
f.setAccessible(true);
Object dataFormat = f.get(dft);
- assertEquals(org.apache.camel.impl.engine.StringDataFormat.class, dataFormat.getClass());
+ assertEquals(org.apache.camel.dataformat.StringDataFormat.class, dataFormat.getClass());
}
@Test
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/ZipDataFormatTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/ZipDataFormatTest.java
index 001c50f..2514e10 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/ZipDataFormatTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/ZipDataFormatTest.java
@@ -28,7 +28,7 @@ import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.converter.stream.InputStreamCache;
-import org.apache.camel.impl.engine.ZipDataFormat;
+import org.apache.camel.dataformat.ZipDataFormat;
import org.apache.camel.spi.DataFormat;
import org.apache.camel.support.DefaultExchange;
import org.junit.Test;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/DataFormatFactoryTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/DataFormatFactoryTest.java
index bac5bc7..cabf7bd 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/DataFormatFactoryTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/DataFormatFactoryTest.java
@@ -18,8 +18,8 @@ package org.apache.camel.processor;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.impl.JndiRegistry;
-import org.apache.camel.impl.engine.SerializationDataFormat;
-import org.apache.camel.impl.engine.StringDataFormat;
+import org.apache.camel.dataformat.SerializationDataFormat;
+import org.apache.camel.dataformat.StringDataFormat;
import org.apache.camel.spi.DataFormat;
import org.apache.camel.spi.DataFormatFactory;
import org.junit.Test;
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/GzipDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/GzipDataFormatAutoConfiguration.java
similarity index 98%
rename from platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/GzipDataFormatAutoConfiguration.java
rename to platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/GzipDataFormatAutoConfiguration.java
index 464dad5..6250205 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/GzipDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/GzipDataFormatAutoConfiguration.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.engine.springboot;
+package org.apache.camel.dataformat.springboot;
import java.util.HashMap;
import java.util.List;
@@ -23,7 +23,7 @@ import javax.annotation.Generated;
import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.impl.engine.GzipDataFormat;
+import org.apache.camel.dataformat.GzipDataFormat;
import org.apache.camel.spi.DataFormat;
import org.apache.camel.spi.DataFormatCustomizer;
import org.apache.camel.spi.DataFormatFactory;
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/GzipDataFormatConfiguration.java
similarity index 97%
rename from platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatConfiguration.java
rename to platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/GzipDataFormatConfiguration.java
index f67165c..1199928 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/GzipDataFormatConfiguration.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.springboot;
+package org.apache.camel.dataformat.springboot;
import javax.annotation.Generated;
import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/SerializationDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/SerializationDataFormatAutoConfiguration.java
similarity index 98%
rename from platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/SerializationDataFormatAutoConfiguration.java
rename to platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/SerializationDataFormatAutoConfiguration.java
index 2551330..0592ddd 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/SerializationDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/SerializationDataFormatAutoConfiguration.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.engine.springboot;
+package org.apache.camel.dataformat.springboot;
import java.util.HashMap;
import java.util.List;
@@ -23,7 +23,7 @@ import javax.annotation.Generated;
import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.impl.engine.SerializationDataFormat;
+import org.apache.camel.dataformat.SerializationDataFormat;
import org.apache.camel.spi.DataFormat;
import org.apache.camel.spi.DataFormatCustomizer;
import org.apache.camel.spi.DataFormatFactory;
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/SerializationDataFormatConfiguration.java
similarity index 97%
rename from platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatConfiguration.java
rename to platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/SerializationDataFormatConfiguration.java
index 66d05cf..3863509 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/SerializationDataFormatConfiguration.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.springboot;
+package org.apache.camel.dataformat.springboot;
import javax.annotation.Generated;
import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/StringDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/StringDataFormatAutoConfiguration.java
similarity index 98%
rename from platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/StringDataFormatAutoConfiguration.java
rename to platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/StringDataFormatAutoConfiguration.java
index 0c78cf1..214f8ce 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/StringDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/StringDataFormatAutoConfiguration.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.engine.springboot;
+package org.apache.camel.dataformat.springboot;
import java.util.HashMap;
import java.util.List;
@@ -23,7 +23,7 @@ import javax.annotation.Generated;
import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.impl.engine.StringDataFormat;
+import org.apache.camel.dataformat.StringDataFormat;
import org.apache.camel.spi.DataFormat;
import org.apache.camel.spi.DataFormatCustomizer;
import org.apache.camel.spi.DataFormatFactory;
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/StringDataFormatConfiguration.java
similarity index 98%
rename from platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatConfiguration.java
rename to platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/StringDataFormatConfiguration.java
index 690cc07..b485961 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/StringDataFormatConfiguration.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.springboot;
+package org.apache.camel.dataformat.springboot;
import javax.annotation.Generated;
import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/ZipDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/ZipDataFormatAutoConfiguration.java
similarity index 98%
rename from platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/ZipDataFormatAutoConfiguration.java
rename to platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/ZipDataFormatAutoConfiguration.java
index 458b283..d5930fc 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/ZipDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/ZipDataFormatAutoConfiguration.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.engine.springboot;
+package org.apache.camel.dataformat.springboot;
import java.util.HashMap;
import java.util.List;
@@ -23,7 +23,7 @@ import javax.annotation.Generated;
import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.impl.engine.ZipDataFormat;
+import org.apache.camel.dataformat.ZipDataFormat;
import org.apache.camel.spi.DataFormat;
import org.apache.camel.spi.DataFormatCustomizer;
import org.apache.camel.spi.DataFormatFactory;
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/ZipDataFormatConfiguration.java
similarity index 98%
rename from platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatConfiguration.java
rename to platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/ZipDataFormatConfiguration.java
index 1c141ba..d7630cd 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/dataformat/springboot/ZipDataFormatConfiguration.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.impl.springboot;
+package org.apache.camel.dataformat.springboot;
import javax.annotation.Generated;
import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/GzipDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/GzipDataFormatConfiguration.java
deleted file mode 100644
index dfaab3a..0000000
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/GzipDataFormatConfiguration.java
+++ /dev/null
@@ -1,55 +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.impl.engine.springboot;
-
-import javax.annotation.Generated;
-import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-/**
- * The GZip data format is a message compression and de-compression format
- * (which works with the popular gzip/gunzip tools).
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@ConfigurationProperties(prefix = "camel.dataformat.gzip")
-public class GzipDataFormatConfiguration
- extends
- DataFormatConfigurationPropertiesCommon {
-
- /**
- * Whether to enable auto configuration of the gzip data format. This is
- * enabled by default.
- */
- private Boolean enabled;
- /**
- * Whether the data format should set the Content-Type header with the type
- * from the data format if the data format is capable of doing so. For
- * example application/xml for data formats marshalling to XML, or
- * application/json for data formats marshalling to JSon etc.
- */
- private Boolean contentTypeHeader = false;
-
- public Boolean getContentTypeHeader() {
- return contentTypeHeader;
- }
-
- public void setContentTypeHeader(Boolean contentTypeHeader) {
- this.contentTypeHeader = contentTypeHeader;
- }
-}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/SerializationDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/SerializationDataFormatConfiguration.java
deleted file mode 100644
index d6c8b9d..0000000
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/SerializationDataFormatConfiguration.java
+++ /dev/null
@@ -1,56 +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.impl.engine.springboot;
-
-import javax.annotation.Generated;
-import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-/**
- * Serialization is a data format which uses the standard Java Serialization
- * mechanism to unmarshal a binary payload into Java objects or to marshal Java
- * objects into a binary blob.
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@ConfigurationProperties(prefix = "camel.dataformat.serialization")
-public class SerializationDataFormatConfiguration
- extends
- DataFormatConfigurationPropertiesCommon {
-
- /**
- * Whether to enable auto configuration of the serialization data format.
- * This is enabled by default.
- */
- private Boolean enabled;
- /**
- * Whether the data format should set the Content-Type header with the type
- * from the data format if the data format is capable of doing so. For
- * example application/xml for data formats marshalling to XML, or
- * application/json for data formats marshalling to JSon etc.
- */
- private Boolean contentTypeHeader = false;
-
- public Boolean getContentTypeHeader() {
- return contentTypeHeader;
- }
-
- public void setContentTypeHeader(Boolean contentTypeHeader) {
- this.contentTypeHeader = contentTypeHeader;
- }
-}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/StringDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/StringDataFormatConfiguration.java
deleted file mode 100644
index 8602f46..0000000
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/StringDataFormatConfiguration.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.impl.engine.springboot;
-
-import javax.annotation.Generated;
-import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-/**
- * String data format is a textual based format that supports character
- * encoding.
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@ConfigurationProperties(prefix = "camel.dataformat.string")
-public class StringDataFormatConfiguration
- extends
- DataFormatConfigurationPropertiesCommon {
-
- /**
- * Whether to enable auto configuration of the string data format. This is
- * enabled by default.
- */
- private Boolean enabled;
- /**
- * Sets an encoding to use. Will by default use the JVM platform default
- * charset.
- */
- private String charset;
- /**
- * Whether the data format should set the Content-Type header with the type
- * from the data format if the data format is capable of doing so. For
- * example application/xml for data formats marshalling to XML, or
- * application/json for data formats marshalling to JSon etc.
- */
- private Boolean contentTypeHeader = false;
-
- public String getCharset() {
- return charset;
- }
-
- public void setCharset(String charset) {
- this.charset = charset;
- }
-
- public Boolean getContentTypeHeader() {
- return contentTypeHeader;
- }
-
- public void setContentTypeHeader(Boolean contentTypeHeader) {
- this.contentTypeHeader = contentTypeHeader;
- }
-}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/ZipDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/ZipDataFormatConfiguration.java
deleted file mode 100644
index 3d5fec6..0000000
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/engine/springboot/ZipDataFormatConfiguration.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.impl.engine.springboot;
-
-import javax.annotation.Generated;
-import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-/**
- * Zip Deflate Compression data format is a message compression and
- * de-compression format (not zip files).
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@ConfigurationProperties(prefix = "camel.dataformat.zip")
-public class ZipDataFormatConfiguration
- extends
- DataFormatConfigurationPropertiesCommon {
-
- /**
- * Whether to enable auto configuration of the zip data format. This is
- * enabled by default.
- */
- private Boolean enabled;
- /**
- * To specify a specific compression between 0-9. -1 is default compression,
- * 0 is no compression, and 9 is best compression.
- */
- private Integer compressionLevel = -1;
- /**
- * Whether the data format should set the Content-Type header with the type
- * from the data format if the data format is capable of doing so. For
- * example application/xml for data formats marshalling to XML, or
- * application/json for data formats marshalling to JSon etc.
- */
- private Boolean contentTypeHeader = false;
-
- public Integer getCompressionLevel() {
- return compressionLevel;
- }
-
- public void setCompressionLevel(Integer compressionLevel) {
- this.compressionLevel = compressionLevel;
- }
-
- public Boolean getContentTypeHeader() {
- return contentTypeHeader;
- }
-
- public void setContentTypeHeader(Boolean contentTypeHeader) {
- this.contentTypeHeader = contentTypeHeader;
- }
-}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java
deleted file mode 100644
index 447d43a..0000000
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java
+++ /dev/null
@@ -1,126 +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.impl.springboot;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelContextAware;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.impl.engine.GzipDataFormat;
-import org.apache.camel.spi.DataFormat;
-import org.apache.camel.spi.DataFormatCustomizer;
-import org.apache.camel.spi.DataFormatFactory;
-import org.apache.camel.spi.HasId;
-import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
-import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
-import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
-import org.apache.camel.spring.boot.util.GroupCondition;
-import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
-import org.apache.camel.support.IntrospectionSupport;
-import org.apache.camel.util.ObjectHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@Configuration
-@Conditional({ConditionalOnCamelContextAndAutoConfigurationBeans.class,
- GzipDataFormatAutoConfiguration.GroupConditions.class})
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
- GzipDataFormatConfiguration.class})
-public class GzipDataFormatAutoConfiguration {
-
- private static final Logger LOGGER = LoggerFactory
- .getLogger(GzipDataFormatAutoConfiguration.class);
- @Autowired
- private ApplicationContext applicationContext;
- @Autowired
- private CamelContext camelContext;
- @Autowired
- private GzipDataFormatConfiguration configuration;
- @Autowired(required = false)
- private List<DataFormatCustomizer<GzipDataFormat>> customizers;
-
- static class GroupConditions extends GroupCondition {
- public GroupConditions() {
- super("camel.dataformat", "camel.dataformat.gzip");
- }
- }
-
- @Bean(name = "gzip-dataformat-factory")
- @ConditionalOnMissingBean(GzipDataFormat.class)
- public DataFormatFactory configureGzipDataFormatFactory() throws Exception {
- return new DataFormatFactory() {
- @Override
- public DataFormat newInstance() {
- GzipDataFormat dataformat = new GzipDataFormat();
- if (CamelContextAware.class
- .isAssignableFrom(GzipDataFormat.class)) {
- CamelContextAware contextAware = CamelContextAware.class
- .cast(dataformat);
- if (contextAware != null) {
- contextAware.setCamelContext(camelContext);
- }
- }
- try {
- Map<String, Object> parameters = new HashMap<>();
- IntrospectionSupport.getProperties(configuration,
- parameters, null, false);
- CamelPropertiesHelper.setCamelProperties(camelContext,
- dataformat, parameters, false);
- } catch (Exception e) {
- throw new RuntimeCamelException(e);
- }
- if (ObjectHelper.isNotEmpty(customizers)) {
- for (DataFormatCustomizer<GzipDataFormat> customizer : customizers) {
- boolean useCustomizer = (customizer instanceof HasId)
- ? HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.dataformat.customizer",
- "camel.dataformat.gzip.customizer",
- ((HasId) customizer).getId())
- : HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.dataformat.customizer",
- "camel.dataformat.gzip.customizer");
- if (useCustomizer) {
- LOGGER.debug(
- "Configure dataformat {}, with customizer {}",
- dataformat, customizer);
- customizer.customize(dataformat);
- }
- }
- }
- return dataformat;
- }
- };
- }
-}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java
deleted file mode 100644
index 1637e3f..0000000
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java
+++ /dev/null
@@ -1,127 +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.impl.springboot;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelContextAware;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.impl.engine.SerializationDataFormat;
-import org.apache.camel.spi.DataFormat;
-import org.apache.camel.spi.DataFormatCustomizer;
-import org.apache.camel.spi.DataFormatFactory;
-import org.apache.camel.spi.HasId;
-import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
-import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
-import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
-import org.apache.camel.spring.boot.util.GroupCondition;
-import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
-import org.apache.camel.support.IntrospectionSupport;
-import org.apache.camel.util.ObjectHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@Configuration
-@Conditional({ConditionalOnCamelContextAndAutoConfigurationBeans.class,
- SerializationDataFormatAutoConfiguration.GroupConditions.class})
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
- SerializationDataFormatConfiguration.class})
-public class SerializationDataFormatAutoConfiguration {
-
- private static final Logger LOGGER = LoggerFactory
- .getLogger(SerializationDataFormatAutoConfiguration.class);
- @Autowired
- private ApplicationContext applicationContext;
- @Autowired
- private CamelContext camelContext;
- @Autowired
- private SerializationDataFormatConfiguration configuration;
- @Autowired(required = false)
- private List<DataFormatCustomizer<SerializationDataFormat>> customizers;
-
- static class GroupConditions extends GroupCondition {
- public GroupConditions() {
- super("camel.dataformat", "camel.dataformat.serialization");
- }
- }
-
- @Bean(name = "serialization-dataformat-factory")
- @ConditionalOnMissingBean(SerializationDataFormat.class)
- public DataFormatFactory configureSerializationDataFormatFactory()
- throws Exception {
- return new DataFormatFactory() {
- @Override
- public DataFormat newInstance() {
- SerializationDataFormat dataformat = new SerializationDataFormat();
- if (CamelContextAware.class
- .isAssignableFrom(SerializationDataFormat.class)) {
- CamelContextAware contextAware = CamelContextAware.class
- .cast(dataformat);
- if (contextAware != null) {
- contextAware.setCamelContext(camelContext);
- }
- }
- try {
- Map<String, Object> parameters = new HashMap<>();
- IntrospectionSupport.getProperties(configuration,
- parameters, null, false);
- CamelPropertiesHelper.setCamelProperties(camelContext,
- dataformat, parameters, false);
- } catch (Exception e) {
- throw new RuntimeCamelException(e);
- }
- if (ObjectHelper.isNotEmpty(customizers)) {
- for (DataFormatCustomizer<SerializationDataFormat> customizer : customizers) {
- boolean useCustomizer = (customizer instanceof HasId)
- ? HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.dataformat.customizer",
- "camel.dataformat.serialization.customizer",
- ((HasId) customizer).getId())
- : HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.dataformat.customizer",
- "camel.dataformat.serialization.customizer");
- if (useCustomizer) {
- LOGGER.debug(
- "Configure dataformat {}, with customizer {}",
- dataformat, customizer);
- customizer.customize(dataformat);
- }
- }
- }
- return dataformat;
- }
- };
- }
-}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java
deleted file mode 100644
index 4004c18..0000000
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java
+++ /dev/null
@@ -1,126 +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.impl.springboot;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelContextAware;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.impl.engine.StringDataFormat;
-import org.apache.camel.spi.DataFormat;
-import org.apache.camel.spi.DataFormatCustomizer;
-import org.apache.camel.spi.DataFormatFactory;
-import org.apache.camel.spi.HasId;
-import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
-import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
-import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
-import org.apache.camel.spring.boot.util.GroupCondition;
-import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
-import org.apache.camel.support.IntrospectionSupport;
-import org.apache.camel.util.ObjectHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@Configuration
-@Conditional({ConditionalOnCamelContextAndAutoConfigurationBeans.class,
- StringDataFormatAutoConfiguration.GroupConditions.class})
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
- StringDataFormatConfiguration.class})
-public class StringDataFormatAutoConfiguration {
-
- private static final Logger LOGGER = LoggerFactory
- .getLogger(StringDataFormatAutoConfiguration.class);
- @Autowired
- private ApplicationContext applicationContext;
- @Autowired
- private CamelContext camelContext;
- @Autowired
- private StringDataFormatConfiguration configuration;
- @Autowired(required = false)
- private List<DataFormatCustomizer<StringDataFormat>> customizers;
-
- static class GroupConditions extends GroupCondition {
- public GroupConditions() {
- super("camel.dataformat", "camel.dataformat.string");
- }
- }
-
- @Bean(name = "string-dataformat-factory")
- @ConditionalOnMissingBean(StringDataFormat.class)
- public DataFormatFactory configureStringDataFormatFactory() throws Exception {
- return new DataFormatFactory() {
- @Override
- public DataFormat newInstance() {
- StringDataFormat dataformat = new StringDataFormat();
- if (CamelContextAware.class
- .isAssignableFrom(StringDataFormat.class)) {
- CamelContextAware contextAware = CamelContextAware.class
- .cast(dataformat);
- if (contextAware != null) {
- contextAware.setCamelContext(camelContext);
- }
- }
- try {
- Map<String, Object> parameters = new HashMap<>();
- IntrospectionSupport.getProperties(configuration,
- parameters, null, false);
- CamelPropertiesHelper.setCamelProperties(camelContext,
- dataformat, parameters, false);
- } catch (Exception e) {
- throw new RuntimeCamelException(e);
- }
- if (ObjectHelper.isNotEmpty(customizers)) {
- for (DataFormatCustomizer<StringDataFormat> customizer : customizers) {
- boolean useCustomizer = (customizer instanceof HasId)
- ? HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.dataformat.customizer",
- "camel.dataformat.string.customizer",
- ((HasId) customizer).getId())
- : HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.dataformat.customizer",
- "camel.dataformat.string.customizer");
- if (useCustomizer) {
- LOGGER.debug(
- "Configure dataformat {}, with customizer {}",
- dataformat, customizer);
- customizer.customize(dataformat);
- }
- }
- }
- return dataformat;
- }
- };
- }
-}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java
deleted file mode 100644
index 30c0e64..0000000
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java
+++ /dev/null
@@ -1,126 +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.impl.springboot;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelContextAware;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.impl.engine.ZipDataFormat;
-import org.apache.camel.spi.DataFormat;
-import org.apache.camel.spi.DataFormatCustomizer;
-import org.apache.camel.spi.DataFormatFactory;
-import org.apache.camel.spi.HasId;
-import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
-import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
-import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
-import org.apache.camel.spring.boot.util.GroupCondition;
-import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
-import org.apache.camel.support.IntrospectionSupport;
-import org.apache.camel.util.ObjectHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@Configuration
-@Conditional({ConditionalOnCamelContextAndAutoConfigurationBeans.class,
- ZipDataFormatAutoConfiguration.GroupConditions.class})
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
- ZipDataFormatConfiguration.class})
-public class ZipDataFormatAutoConfiguration {
-
- private static final Logger LOGGER = LoggerFactory
- .getLogger(ZipDataFormatAutoConfiguration.class);
- @Autowired
- private ApplicationContext applicationContext;
- @Autowired
- private CamelContext camelContext;
- @Autowired
- private ZipDataFormatConfiguration configuration;
- @Autowired(required = false)
- private List<DataFormatCustomizer<ZipDataFormat>> customizers;
-
- static class GroupConditions extends GroupCondition {
- public GroupConditions() {
- super("camel.dataformat", "camel.dataformat.zip");
- }
- }
-
- @Bean(name = "zip-dataformat-factory")
- @ConditionalOnMissingBean(ZipDataFormat.class)
- public DataFormatFactory configureZipDataFormatFactory() throws Exception {
- return new DataFormatFactory() {
- @Override
- public DataFormat newInstance() {
- ZipDataFormat dataformat = new ZipDataFormat();
- if (CamelContextAware.class
- .isAssignableFrom(ZipDataFormat.class)) {
- CamelContextAware contextAware = CamelContextAware.class
- .cast(dataformat);
- if (contextAware != null) {
- contextAware.setCamelContext(camelContext);
- }
- }
- try {
- Map<String, Object> parameters = new HashMap<>();
- IntrospectionSupport.getProperties(configuration,
- parameters, null, false);
- CamelPropertiesHelper.setCamelProperties(camelContext,
- dataformat, parameters, false);
- } catch (Exception e) {
- throw new RuntimeCamelException(e);
- }
- if (ObjectHelper.isNotEmpty(customizers)) {
- for (DataFormatCustomizer<ZipDataFormat> customizer : customizers) {
- boolean useCustomizer = (customizer instanceof HasId)
- ? HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.dataformat.customizer",
- "camel.dataformat.zip.customizer",
- ((HasId) customizer).getId())
- : HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.dataformat.customizer",
- "camel.dataformat.zip.customizer");
- if (useCustomizer) {
- LOGGER.debug(
- "Configure dataformat {}, with customizer {}",
- dataformat, customizer);
- customizer.customize(dataformat);
- }
- }
- }
- return dataformat;
- }
- };
- }
-}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/resources/META-INF/spring.factories b/platforms/spring-boot/components-starter/camel-core-starter/src/main/resources/META-INF/spring.factories
index a54974d..c227c75 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/resources/META-INF/spring.factories
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/resources/META-INF/spring.factories
@@ -15,10 +15,10 @@
## limitations under the License.
## ---------------------------------------------------------------------------
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.impl.springboot.GzipDataFormatAutoConfiguration,\
-org.apache.camel.impl.springboot.SerializationDataFormatAutoConfiguration,\
-org.apache.camel.impl.springboot.StringDataFormatAutoConfiguration,\
-org.apache.camel.impl.springboot.ZipDataFormatAutoConfiguration,\
+org.apache.camel.dataformat.springboot.GzipDataFormatAutoConfiguration,\
+org.apache.camel.dataformat.springboot.SerializationDataFormatAutoConfiguration,\
+org.apache.camel.dataformat.springboot.StringDataFormatAutoConfiguration,\
+org.apache.camel.dataformat.springboot.ZipDataFormatAutoConfiguration,\
org.apache.camel.language.constant.springboot.ConstantLanguageAutoConfiguration,\
org.apache.camel.language.header.springboot.HeaderLanguageAutoConfiguration,\
org.apache.camel.language.property.springboot.ExchangePropertyLanguageAutoConfiguration,\
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncDslTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncDslTest.java
index 1a7ff50..33540d2 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncDslTest.java
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncDslTest.java
@@ -21,7 +21,7 @@ import javax.jms.ConnectionFactory;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.jms.JmsComponent;
import org.apache.camel.impl.JndiRegistry;
-import org.apache.camel.impl.engine.StringDataFormat;
+import org.apache.camel.dataformat.StringDataFormat;
import org.apache.camel.itest.CamelJmsTestHelper;
import org.apache.camel.spi.DataFormat;
import org.apache.camel.spi.Registry;