This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 2ea75a6744be76f1b8cb91ffee7bc4a5c40a6553 Author: Roberto Flores <betoflow...@gmail.com> AuthorDate: Mon Jun 10 01:04:12 2019 -0500 some clean-up --- apache-camel/pom.xml | 10 +++ apache-camel/src/main/descriptors/common-bin.xml | 2 + components/camel-any23/pom.xml | 2 +- .../src/main/docs/any23-dataformat.adoc | 12 ++- .../{any23DataFormat.java => Any23DataFormat.java} | 8 +- ...asicTest.java => Any23DataFormatBasicTest.java} | 2 +- .../any23/TidyMarkupDataFormatAsDomNodeTest.java | 82 --------------------- .../TidyMarkupDataFormatWithUnmarshalTypeTest.java | 37 ---------- .../dataformat/any23/TidyMarkupTestSupport.java | 86 ---------------------- components/readme.adoc | 2 + docs/components/modules/ROOT/nav.adoc | 1 + .../modules/ROOT/pages}/any23-dataformat.adoc | 12 ++- parent/pom.xml | 10 +++ .../components-starter/camel-any23-starter/pom.xml | 2 +- ....java => Any23DataFormatAutoConfiguration.java} | 24 +++--- ...tion.java => Any23DataFormatConfiguration.java} | 2 +- .../src/main/resources/META-INF/spring.factories | 2 +- 17 files changed, 56 insertions(+), 240 deletions(-) diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml index 154c55e..f61b9d3 100644 --- a/apache-camel/pom.xml +++ b/apache-camel/pom.xml @@ -133,6 +133,11 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-any23</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-apns</artifactId> <version>${project.version}</version> </dependency> @@ -1677,6 +1682,11 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-any23-starter</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-apns-starter</artifactId> <version>${project.version}</version> </dependency> diff --git a/apache-camel/src/main/descriptors/common-bin.xml b/apache-camel/src/main/descriptors/common-bin.xml index b20fa84..48c86f6 100644 --- a/apache-camel/src/main/descriptors/common-bin.xml +++ b/apache-camel/src/main/descriptors/common-bin.xml @@ -47,6 +47,7 @@ <include>org.apache.camel:camel-ahc</include> <include>org.apache.camel:camel-ahc-ws</include> <include>org.apache.camel:camel-amqp</include> + <include>org.apache.camel:camel-any23</include> <include>org.apache.camel:camel-apns</include> <include>org.apache.camel:camel-as2</include> <include>org.apache.camel:camel-as2-api</include> @@ -395,6 +396,7 @@ <include>org.apache.camel:camel-ahc-starter</include> <include>org.apache.camel:camel-ahc-ws-starter</include> <include>org.apache.camel:camel-amqp-starter</include> + <include>org.apache.camel:camel-any23-starter</include> <include>org.apache.camel:camel-apns-starter</include> <include>org.apache.camel:camel-as2-starter</include> <include>org.apache.camel:camel-asn1-starter</include> diff --git a/components/camel-any23/pom.xml b/components/camel-any23/pom.xml index e42a960..534cbae 100644 --- a/components/camel-any23/pom.xml +++ b/components/camel-any23/pom.xml @@ -29,7 +29,7 @@ <artifactId>camel-any23</artifactId> <packaging>jar</packaging> - <name>Camel :: any23</name> + <name>Camel :: Any23</name> <description>Camel Any23 support</description> <properties> diff --git a/components/camel-any23/src/main/docs/any23-dataformat.adoc b/components/camel-any23/src/main/docs/any23-dataformat.adoc index bb50788..6ce4081 100644 --- a/components/camel-any23/src/main/docs/any23-dataformat.adoc +++ b/components/camel-any23/src/main/docs/any23-dataformat.adoc @@ -44,24 +44,22 @@ When using Spring Boot make sure to use the following Maven dependency to have s ---- <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-tagsoup-starter</artifactId> + <artifactId>camel-any23-starter</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> ---- -The component supports 4 options, which are listed below. +The component supports 2 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *camel.dataformat.tidymarkup.content-type-header* | 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. | false | Boolean -| *camel.dataformat.tidymarkup.data-object-type* | What data type to unmarshal as, can either be org.w3c.dom.Node or java.lang.String. Is by default org.w3c.dom.Node | org.w3c.dom.Node | String -| *camel.dataformat.tidymarkup.enabled* | Enable tidymarkup dataformat | true | Boolean -| *camel.dataformat.tidymarkup.omit-xml-declaration* | When returning a String, do we omit the XML declaration in the top. | false | Boolean +| *camel.dataformat.any23.content-type-header* | 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. | false | Boolean +| *camel.dataformat.any23.enabled* | Whether to enable auto configuration of the any23 data format. This is enabled by default. | | Boolean |=== // spring-boot-auto-configure options: END @@ -111,4 +109,4 @@ the download page for the latest versions). <artifactId>camel-tagsoup</artifactId> <version>x.x.x</version> </dependency> ----------------------------------------- \ No newline at end of file +---------------------------------------- diff --git a/components/camel-any23/src/main/java/org/apache/camel/dataformat/any23/any23DataFormat.java b/components/camel-any23/src/main/java/org/apache/camel/dataformat/any23/Any23DataFormat.java similarity index 89% rename from components/camel-any23/src/main/java/org/apache/camel/dataformat/any23/any23DataFormat.java rename to components/camel-any23/src/main/java/org/apache/camel/dataformat/any23/Any23DataFormat.java index 9dd325d..9f97c98 100644 --- a/components/camel-any23/src/main/java/org/apache/camel/dataformat/any23/any23DataFormat.java +++ b/components/camel-any23/src/main/java/org/apache/camel/dataformat/any23/Any23DataFormat.java @@ -33,12 +33,12 @@ import org.slf4j.LoggerFactory; * site (or file) into rdf. */ @Dataformat("any23") -public class any23DataFormat extends ServiceSupport implements DataFormat, DataFormatName { +public class Any23DataFormat extends ServiceSupport implements DataFormat, DataFormatName { /* * Our Logger */ - private static final Logger LOG = LoggerFactory.getLogger(any23DataFormat.class); + private static final Logger LOG = LoggerFactory.getLogger(Any23DataFormat.class); @@ -61,7 +61,7 @@ public class any23DataFormat extends ServiceSupport implements DataFormat, DataF * Marshal data. Generate RDF. */ public void marshal(Exchange exchange, Object object, OutputStream outputStream) throws Exception { - throw new CamelException("Sin implementaci[on aun"); + throw new CamelException("Under construction"); } /** @@ -69,7 +69,7 @@ public class any23DataFormat extends ServiceSupport implements DataFormat, DataF */ public Object unmarshal(Exchange exchange, InputStream inputStream) throws Exception { - throw new CamelException("Sin implementaci[on aun"); + throw new CamelException("Under construction"); } @Override diff --git a/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/any23DataFormatBasicTest.java b/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/Any23DataFormatBasicTest.java similarity index 97% rename from components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/any23DataFormatBasicTest.java rename to components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/Any23DataFormatBasicTest.java index e0305bd..c65f9e5 100644 --- a/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/any23DataFormatBasicTest.java +++ b/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/Any23DataFormatBasicTest.java @@ -29,7 +29,7 @@ import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; -public class any23DataFormatBasicTest extends CamelTestSupport { +public class Any23DataFormatBasicTest extends CamelTestSupport { @Test public void testUnMarshalToStringOfXml() throws Exception { diff --git a/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/TidyMarkupDataFormatAsDomNodeTest.java b/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/TidyMarkupDataFormatAsDomNodeTest.java deleted file mode 100644 index 1f38ff2..0000000 --- a/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/TidyMarkupDataFormatAsDomNodeTest.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.dataformat.any23; - -import java.io.File; -import java.util.List; - -import org.apache.camel.Exchange; -import org.apache.camel.Message; -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.component.mock.MockEndpoint; -import org.apache.camel.test.junit4.CamelTestSupport; -import org.junit.Test; - -public class TidyMarkupDataFormatAsDomNodeTest extends CamelTestSupport { - - @Test - public void testUnMarshalToStringOfXml() throws Exception { - MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class); - resultEndpoint.expectedMessageCount(2); - - /* - * each of these files has a <p>TidyMarkupNode section. (no closing tag) - * - * See the route below, we send the tidyMarkup to xpath and boolean that out. - */ - String badHtml = TidyMarkupTestSupport.loadFileAsString(new File( - "src/test/resources/org/apache/camel/dataformat/tagsoup/testfile1.html")); - String evilHtml = TidyMarkupTestSupport.loadFileAsString(new File( - "src/test/resources/org/apache/camel/dataformat/tagsoup/testfile2-evilHtml.html")); - - template.sendBody("direct:start", badHtml); - template.sendBody("direct:start", evilHtml); - - resultEndpoint.assertIsSatisfied(); - List<Exchange> list = resultEndpoint.getReceivedExchanges(); - for (Exchange exchange : list) { - Message in = exchange.getIn(); - String response = in.getBody(String.class); - - log.debug("Received " + response); - assertNotNull("Should be able to convert received body to a string", response); - - try { - /* - * our route xpaths the existence of our signature "<p>TidyMarkupNode" - * but of course, by the xpath time, it is well formed - */ - assertTrue(response.equals("true")); - } catch (Exception e) { - - fail("Failed to convert the resulting String to XML: " + e.getLocalizedMessage()); - } - - } - } - - @Override - protected RouteBuilder createRouteBuilder() { - return new RouteBuilder() { - public void configure() { - from("direct:start").unmarshal().tidyMarkup().setBody().xpath( - "boolean(//p[contains(text(),'TidyMarkupNode')])", String.class).to("mock:result"); - } - }; - } - -} diff --git a/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/TidyMarkupDataFormatWithUnmarshalTypeTest.java b/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/TidyMarkupDataFormatWithUnmarshalTypeTest.java deleted file mode 100644 index a99664e..0000000 --- a/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/TidyMarkupDataFormatWithUnmarshalTypeTest.java +++ /dev/null @@ -1,37 +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.dataformat.any23; - -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.model.dataformat.TidyMarkupDataFormat; - -/* - * This just tests whether this dataformat is available to UnmarshalType - */ -public class TidyMarkupDataFormatWithUnmarshalTypeTest extends any23DataFormatBasicTest { - - @Override - protected RouteBuilder createRouteBuilder() { - return new RouteBuilder() { - public void configure() { - TidyMarkupDataFormat dataFormat = new TidyMarkupDataFormat(String.class); - from("direct:start").unmarshal(dataFormat).to("mock:result"); - } - }; - } - -} diff --git a/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/TidyMarkupTestSupport.java b/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/TidyMarkupTestSupport.java deleted file mode 100644 index 7048373..0000000 --- a/components/camel-any23/src/test/java/org/apache/camel/dataformat/any23/TidyMarkupTestSupport.java +++ /dev/null @@ -1,86 +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.dataformat.any23; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; - -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -import org.apache.camel.util.IOHelper; - -public final class TidyMarkupTestSupport { - - private TidyMarkupTestSupport() { - // Utility class - } - - public static String loadFileAsString(File file) throws Exception { - StringBuilder fileContent = new StringBuilder(); - BufferedReader input = IOHelper.buffered(new FileReader(file)); - try { - String line = null; - while ((line = input.readLine()) != null) { - fileContent.append(line); - fileContent.append(System.lineSeparator()); - } - } finally { - input.close(); - } - return fileContent.toString(); - } - - /** - * Convert XML String to a Document. - * - * @param xmlString - * @return document Document - * @throws IOException - * @throws SAXException - * @throws ParserConfigurationException - */ - public static Document stringToXml(String xmlString) throws SAXException, IOException, ParserConfigurationException { - return createDocumentBuilder().parse(new InputSource(new StringReader(xmlString))); - } - - /** - * Static to generate a documentBuilder - * - * @return - * @throws ParserConfigurationException - */ - public static DocumentBuilder createDocumentBuilder() throws ParserConfigurationException { - - DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); - docBuilderFactory.setIgnoringComments(true); - docBuilderFactory.setIgnoringElementContentWhitespace(true); - docBuilderFactory.setCoalescing(true); - docBuilderFactory.setExpandEntityReferences(true); - docBuilderFactory.setNamespaceAware(true); - return docBuilderFactory.newDocumentBuilder(); - } -} diff --git a/components/readme.adoc b/components/readme.adoc index 803fa2d..4364608 100644 --- a/components/readme.adoc +++ b/components/readme.adoc @@ -908,6 +908,8 @@ Number of Data Formats: 44 in 36 JAR artifacts (0 deprecated) |=== | Data Format | Available From | Description +| link:camel-any23/src/main/docs/any23-dataformat.adoc[Any23] (camel-any23) | 1.0 | Any23 data format is used for parsing data to RDF. + | link:camel-asn1/src/main/docs/asn1-dataformat.adoc[ASN.1 File] (camel-asn1) | 2.20 | The ASN.1 data format is used for file transfer with telecommunications protocols. | link:camel-avro/src/main/docs/avro-dataformat.adoc[Avro] (camel-avro) | 2.14 | The Avro data format is used for serialization and deserialization of messages using Apache Avro binary dataformat. diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc index c53f5c6..b9a07cc 100644 --- a/docs/components/modules/ROOT/nav.adoc +++ b/docs/components/modules/ROOT/nav.adoc @@ -5,6 +5,7 @@ * xref:ahc-ws-component.adoc[AHC Websocket Component] * xref:ahc-component.adoc[AHC Component] * xref:amqp-component.adoc[AMQP Component] +* xref:any23-dataformat.adoc[Any23 DataFormat] * xref:apns-component.adoc[APNS Component] * xref:as2-component.adoc[AS2 Component] * xref:asn1-dataformat.adoc[ASN.1 File DataFormat] diff --git a/components/camel-any23/src/main/docs/any23-dataformat.adoc b/docs/components/modules/ROOT/pages/any23-dataformat.adoc similarity index 77% copy from components/camel-any23/src/main/docs/any23-dataformat.adoc copy to docs/components/modules/ROOT/pages/any23-dataformat.adoc index bb50788..6ce4081 100644 --- a/components/camel-any23/src/main/docs/any23-dataformat.adoc +++ b/docs/components/modules/ROOT/pages/any23-dataformat.adoc @@ -44,24 +44,22 @@ When using Spring Boot make sure to use the following Maven dependency to have s ---- <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-tagsoup-starter</artifactId> + <artifactId>camel-any23-starter</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> ---- -The component supports 4 options, which are listed below. +The component supports 2 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *camel.dataformat.tidymarkup.content-type-header* | 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. | false | Boolean -| *camel.dataformat.tidymarkup.data-object-type* | What data type to unmarshal as, can either be org.w3c.dom.Node or java.lang.String. Is by default org.w3c.dom.Node | org.w3c.dom.Node | String -| *camel.dataformat.tidymarkup.enabled* | Enable tidymarkup dataformat | true | Boolean -| *camel.dataformat.tidymarkup.omit-xml-declaration* | When returning a String, do we omit the XML declaration in the top. | false | Boolean +| *camel.dataformat.any23.content-type-header* | 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. | false | Boolean +| *camel.dataformat.any23.enabled* | Whether to enable auto configuration of the any23 data format. This is enabled by default. | | Boolean |=== // spring-boot-auto-configure options: END @@ -111,4 +109,4 @@ the download page for the latest versions). <artifactId>camel-tagsoup</artifactId> <version>x.x.x</version> </dependency> ----------------------------------------- \ No newline at end of file +---------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index bc4fe83..445abf9 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -825,6 +825,11 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-any23</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-apns</artifactId> <version>${project.version}</version> </dependency> @@ -2419,6 +2424,11 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-any23-starter</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-apns-starter</artifactId> <version>${project.version}</version> </dependency> diff --git a/platforms/spring-boot/components-starter/camel-any23-starter/pom.xml b/platforms/spring-boot/components-starter/camel-any23-starter/pom.xml index 5c3558f..3bb59a6 100644 --- a/platforms/spring-boot/components-starter/camel-any23-starter/pom.xml +++ b/platforms/spring-boot/components-starter/camel-any23-starter/pom.xml @@ -26,7 +26,7 @@ </parent> <artifactId>camel-any23-starter</artifactId> <packaging>jar</packaging> - <name>Spring-Boot Starter :: Camel :: any23</name> + <name>Spring-Boot Starter :: Camel :: Any23</name> <description>Spring-Boot Starter for Camel Any23 support</description> <dependencies> <dependency> diff --git a/platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/any23DataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/Any23DataFormatAutoConfiguration.java similarity index 88% rename from platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/any23DataFormatAutoConfiguration.java rename to platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/Any23DataFormatAutoConfiguration.java index 3caaebc..15ae6b2 100644 --- a/platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/any23DataFormatAutoConfiguration.java +++ b/platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/Any23DataFormatAutoConfiguration.java @@ -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.dataformat.any23.any23DataFormat; +import org.apache.camel.dataformat.any23.Any23DataFormat; import org.apache.camel.spi.DataFormat; import org.apache.camel.spi.DataFormatCustomizer; import org.apache.camel.spi.DataFormatFactory; @@ -54,22 +54,22 @@ import org.springframework.context.annotation.Configuration; @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo") @Configuration @Conditional({ConditionalOnCamelContextAndAutoConfigurationBeans.class, - any23DataFormatAutoConfiguration.GroupConditions.class}) + Any23DataFormatAutoConfiguration.GroupConditions.class}) @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration") @EnableConfigurationProperties({DataFormatConfigurationProperties.class, - any23DataFormatConfiguration.class}) -public class any23DataFormatAutoConfiguration { + Any23DataFormatConfiguration.class}) +public class Any23DataFormatAutoConfiguration { private static final Logger LOGGER = LoggerFactory - .getLogger(any23DataFormatAutoConfiguration.class); + .getLogger(Any23DataFormatAutoConfiguration.class); @Autowired private ApplicationContext applicationContext; @Autowired private CamelContext camelContext; @Autowired - private any23DataFormatConfiguration configuration; + private Any23DataFormatConfiguration configuration; @Autowired(required = false) - private List<DataFormatCustomizer<any23DataFormat>> customizers; + private List<DataFormatCustomizer<Any23DataFormat>> customizers; static class GroupConditions extends GroupCondition { public GroupConditions() { @@ -78,14 +78,14 @@ public class any23DataFormatAutoConfiguration { } @Bean(name = "any23-dataformat-factory") - @ConditionalOnMissingBean(any23DataFormat.class) - public DataFormatFactory configureany23DataFormatFactory() throws Exception { + @ConditionalOnMissingBean(Any23DataFormat.class) + public DataFormatFactory configureAny23DataFormatFactory() throws Exception { return new DataFormatFactory() { @Override public DataFormat newInstance() { - any23DataFormat dataformat = new any23DataFormat(); + Any23DataFormat dataformat = new Any23DataFormat(); if (CamelContextAware.class - .isAssignableFrom(any23DataFormat.class)) { + .isAssignableFrom(Any23DataFormat.class)) { CamelContextAware contextAware = CamelContextAware.class .cast(dataformat); if (contextAware != null) { @@ -102,7 +102,7 @@ public class any23DataFormatAutoConfiguration { throw new RuntimeCamelException(e); } if (ObjectHelper.isNotEmpty(customizers)) { - for (DataFormatCustomizer<any23DataFormat> customizer : customizers) { + for (DataFormatCustomizer<Any23DataFormat> customizer : customizers) { boolean useCustomizer = (customizer instanceof HasId) ? HierarchicalPropertiesEvaluator.evaluate( applicationContext.getEnvironment(), diff --git a/platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/any23DataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/Any23DataFormatConfiguration.java similarity index 97% rename from platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/any23DataFormatConfiguration.java rename to platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/Any23DataFormatConfiguration.java index 06565e8..423812f 100644 --- a/platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/any23DataFormatConfiguration.java +++ b/platforms/spring-boot/components-starter/camel-any23-starter/src/main/java/org/apache/camel/dataformat/any23/springboot/Any23DataFormatConfiguration.java @@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; */ @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo") @ConfigurationProperties(prefix = "camel.dataformat.any23") -public class any23DataFormatConfiguration +public class Any23DataFormatConfiguration extends DataFormatConfigurationPropertiesCommon { diff --git a/platforms/spring-boot/components-starter/camel-any23-starter/src/main/resources/META-INF/spring.factories b/platforms/spring-boot/components-starter/camel-any23-starter/src/main/resources/META-INF/spring.factories index 77190b5..78f4e51 100644 --- a/platforms/spring-boot/components-starter/camel-any23-starter/src/main/resources/META-INF/spring.factories +++ b/platforms/spring-boot/components-starter/camel-any23-starter/src/main/resources/META-INF/spring.factories @@ -16,4 +16,4 @@ ## --------------------------------------------------------------------------- org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -org.apache.camel.dataformat.any23.springboot.any23DataFormatAutoConfiguration +org.apache.camel.dataformat.any23.springboot.Any23DataFormatAutoConfiguration