CAMEL-9419: Generate spring-boot auto configuration for all Camel components that has options that can be configured.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/75251730 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/75251730 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/75251730 Branch: refs/heads/master Commit: 75251730cbc7c17d155bdf22efd31c3b21e2b3c0 Parents: ff46f80 Author: Claus Ibsen <davscl...@apache.org> Authored: Wed Jun 8 13:17:24 2016 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Wed Jun 8 13:48:57 2016 +0200 ---------------------------------------------------------------------- camel-core/pom.xml | 23 + .../DirectComponentAutoConfiguration.java | 50 + .../DirectComponentConfiguration.java | 56 + .../DirectVmComponentAutoConfiguration.java | 50 + .../DirectVmComponentConfiguration.java | 85 ++ .../LogComponentAutoConfiguration.java | 50 + .../springboot/LogComponentConfiguration.java | 44 + .../PropertiesComponentAutoConfiguration.java | 50 + .../PropertiesComponentConfiguration.java | 230 ++++ .../SchedulerComponentAutoConfiguration.java | 50 + .../SchedulerComponentConfiguration.java | 43 + .../SedaComponentAutoConfiguration.java | 50 + .../springboot/SedaComponentConfiguration.java | 70 ++ .../StubComponentAutoConfiguration.java | 50 + .../springboot/StubComponentConfiguration.java | 70 ++ .../ValidatorComponentAutoConfiguration.java | 50 + .../ValidatorComponentConfiguration.java | 44 + .../VmComponentAutoConfiguration.java | 50 + .../vm/springboot/VmComponentConfiguration.java | 70 ++ .../XsltComponentAutoConfiguration.java | 50 + .../springboot/XsltComponentConfiguration.java | 104 ++ .../main/resources/META-INF/spring.factories | 35 + components-starter/pom.xml | 34 + .../WsComponentAutoConfiguration.java | 50 + .../ws/springboot/WsComponentConfiguration.java | 118 ++ .../main/resources/META-INF/spring.factories | 19 + .../camel/component/ahc/AhcComponent.java | 2 - .../AhcComponentAutoConfiguration.java | 50 + .../springboot/AhcComponentConfiguration.java | 118 ++ .../main/resources/META-INF/spring.factories | 19 + .../AMQPComponentAutoConfiguration.java | 50 + .../springboot/AMQPComponentConfiguration.java | 1122 +++++++++++++++++ .../main/resources/META-INF/spring.factories | 19 + .../ApnsComponentAutoConfiguration.java | 50 + .../springboot/ApnsComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../WebsocketComponentAutoConfiguration.java | 50 + .../WebsocketComponentConfiguration.java | 126 ++ .../main/resources/META-INF/spring.factories | 19 + .../AvroComponentAutoConfiguration.java | 50 + .../springboot/AvroComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../BeanstalkComponentAutoConfiguration.java | 50 + .../BeanstalkComponentConfiguration.java | 46 + .../main/resources/META-INF/spring.factories | 19 + .../BoxComponentAutoConfiguration.java | 50 + .../springboot/BoxComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../BraintreeComponentAutoConfiguration.java | 50 + .../BraintreeComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../CacheComponentAutoConfiguration.java | 50 + .../springboot/CacheComponentConfiguration.java | 70 ++ .../main/resources/META-INF/spring.factories | 19 + .../CometdComponentAutoConfiguration.java | 50 + .../CometdComponentConfiguration.java | 108 ++ .../main/resources/META-INF/spring.factories | 19 + ...italSignatureComponentAutoConfiguration.java | 52 + .../DigitalSignatureComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../CxfRsComponentAutoConfiguration.java | 50 + .../springboot/CxfRsComponentConfiguration.java | 44 + .../CxfComponentAutoConfiguration.java | 50 + .../springboot/CxfComponentConfiguration.java | 59 + .../main/resources/META-INF/spring.factories | 21 + .../DisruptorComponentAutoConfiguration.java | 50 + .../DisruptorComponentConfiguration.java | 120 ++ .../DisruptorVmComponentAutoConfiguration.java | 50 + .../DisruptorVmComponentConfiguration.java | 120 ++ .../main/resources/META-INF/spring.factories | 21 + .../DockerComponentAutoConfiguration.java | 50 + .../DockerComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../EjbComponentAutoConfiguration.java | 50 + .../springboot/EjbComponentConfiguration.java | 56 + .../main/resources/META-INF/spring.factories | 19 + ...ElasticsearchComponentAutoConfiguration.java | 50 + .../ElasticsearchComponentConfiguration.java | 44 + .../main/resources/META-INF/spring.factories | 19 + .../ElsqlComponentAutoConfiguration.java | 50 + .../springboot/ElsqlComponentConfiguration.java | 86 ++ .../main/resources/META-INF/spring.factories | 19 + .../EventAdminComponentAutoConfiguration.java | 50 + .../EventAdminComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../FacebookComponentAutoConfiguration.java | 50 + .../FacebookComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../FlinkComponentAutoConfiguration.java | 50 + .../springboot/FlinkComponentConfiguration.java | 81 ++ .../main/resources/META-INF/spring.factories | 19 + .../FreemarkerComponentAutoConfiguration.java | 50 + .../FreemarkerComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../GangliaComponentAutoConfiguration.java | 50 + .../GangliaComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + ...oogleCalendarComponentAutoConfiguration.java | 52 + .../GoogleCalendarComponentConfiguration.java | 56 + .../main/resources/META-INF/spring.factories | 19 + .../GoogleDriveComponentAutoConfiguration.java | 50 + .../GoogleDriveComponentConfiguration.java | 57 + .../main/resources/META-INF/spring.factories | 19 + .../GoogleMailComponentAutoConfiguration.java | 50 + .../GoogleMailComponentConfiguration.java | 56 + .../main/resources/META-INF/spring.factories | 19 + ...GuavaEventBusComponentAutoConfiguration.java | 50 + .../GuavaEventBusComponentConfiguration.java | 59 + .../main/resources/META-INF/spring.factories | 19 + .../HazelcastComponentAutoConfiguration.java | 50 + .../HazelcastComponentConfiguration.java | 45 + .../main/resources/META-INF/spring.factories | 19 + .../HBaseComponentAutoConfiguration.java | 50 + .../springboot/HBaseComponentConfiguration.java | 55 + .../main/resources/META-INF/spring.factories | 19 + .../HdfsComponentAutoConfiguration.java | 50 + .../springboot/HdfsComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../HdfsComponentAutoConfiguration.java | 50 + .../springboot/HdfsComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../HttpComponentAutoConfiguration.java | 50 + .../springboot/HttpComponentConfiguration.java | 116 ++ .../main/resources/META-INF/spring.factories | 19 + .../HttpComponentAutoConfiguration.java | 50 + .../springboot/HttpComponentConfiguration.java | 217 ++++ .../main/resources/META-INF/spring.factories | 19 + .../IBatisComponentAutoConfiguration.java | 50 + .../IBatisComponentConfiguration.java | 68 ++ .../main/resources/META-INF/spring.factories | 19 + .../JcloudsComponentAutoConfiguration.java | 50 + .../JcloudsComponentConfiguration.java | 57 + .../main/resources/META-INF/spring.factories | 19 + .../JdbcComponentAutoConfiguration.java | 50 + .../springboot/JdbcComponentConfiguration.java | 44 + .../main/resources/META-INF/spring.factories | 19 + .../JettyHttpComponentAutoConfiguration9.java | 50 + .../JettyHttpComponentConfiguration9.java | 436 +++++++ .../main/resources/META-INF/spring.factories | 19 + .../JGroupsComponentAutoConfiguration.java | 50 + .../JGroupsComponentConfiguration.java | 69 ++ .../main/resources/META-INF/spring.factories | 19 + .../JmsComponentAutoConfiguration.java | 50 + .../springboot/JmsComponentConfiguration.java | 1123 ++++++++++++++++++ .../main/resources/META-INF/spring.factories | 19 + .../JoltComponentAutoConfiguration.java | 50 + .../springboot/JoltComponentConfiguration.java | 44 + .../main/resources/META-INF/spring.factories | 19 + .../JpaComponentAutoConfiguration.java | 50 + .../springboot/JpaComponentConfiguration.java | 89 ++ .../main/resources/META-INF/spring.factories | 19 + .../ScpComponentAutoConfiguration.java | 50 + .../springboot/ScpComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../Jt400ComponentAutoConfiguration.java | 50 + .../springboot/Jt400ComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../KafkaComponentAutoConfiguration.java | 50 + .../springboot/KafkaComponentConfiguration.java | 47 + .../main/resources/META-INF/spring.factories | 19 + .../KestrelComponentAutoConfiguration.java | 50 + .../KestrelComponentConfiguration.java | 44 + .../main/resources/META-INF/spring.factories | 19 + .../LinkedInComponentAutoConfiguration.java | 50 + .../LinkedInComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../LuceneComponentAutoConfiguration.java | 50 + .../LuceneComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../MailComponentAutoConfiguration.java | 50 + .../springboot/MailComponentConfiguration.java | 55 + .../main/resources/META-INF/spring.factories | 19 + .../MetricsComponentAutoConfiguration.java | 50 + .../MetricsComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../MinaComponentAutoConfiguration.java | 50 + .../springboot/MinaComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../Mina2ComponentAutoConfiguration.java | 50 + .../springboot/Mina2ComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../MQTTComponentAutoConfiguration.java | 50 + .../springboot/MQTTComponentConfiguration.java | 67 ++ .../main/resources/META-INF/spring.factories | 19 + .../MsvComponentAutoConfiguration.java | 50 + .../springboot/MsvComponentConfiguration.java | 57 + .../main/resources/META-INF/spring.factories | 19 + .../MustacheComponentAutoConfiguration.java | 50 + .../MustacheComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../MyBatisComponentAutoConfiguration.java | 50 + .../MyBatisComponentConfiguration.java | 56 + .../main/resources/META-INF/spring.factories | 19 + .../NagiosComponentAutoConfiguration.java | 50 + .../NagiosComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../NettyHttpComponentAutoConfiguration.java | 50 + .../NettyHttpComponentConfiguration.java | 100 ++ .../main/resources/META-INF/spring.factories | 19 + .../NettyComponentAutoConfiguration.java | 50 + .../springboot/NettyComponentConfiguration.java | 55 + .../main/resources/META-INF/spring.factories | 19 + .../NettyHttpComponentAutoConfiguration.java | 50 + .../NettyHttpComponentConfiguration.java | 113 ++ .../main/resources/META-INF/spring.factories | 19 + .../NettyComponentAutoConfiguration.java | 50 + .../springboot/NettyComponentConfiguration.java | 68 ++ .../main/resources/META-INF/spring.factories | 19 + .../Olingo2ComponentAutoConfiguration.java | 50 + .../Olingo2ComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../OpenShiftComponentAutoConfiguration.java | 50 + .../OpenShiftComponentConfiguration.java | 79 ++ .../main/resources/META-INF/spring.factories | 19 + .../PahoComponentAutoConfiguration.java | 50 + .../springboot/PahoComponentConfiguration.java | 67 ++ .../main/resources/META-INF/spring.factories | 19 + .../PaxLoggingComponentAutoConfiguration.java | 50 + .../PaxLoggingComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../QuartzComponentAutoConfiguration.java | 50 + .../QuartzComponentConfiguration.java | 119 ++ .../main/resources/META-INF/spring.factories | 19 + .../QuartzComponentAutoConfiguration.java | 50 + .../QuartzComponentConfiguration.java | 149 +++ .../main/resources/META-INF/spring.factories | 19 + .../QuickfixjComponentAutoConfiguration.java | 50 + .../QuickfixjComponentConfiguration.java | 98 ++ .../main/resources/META-INF/spring.factories | 19 + .../RestletComponentAutoConfiguration.java | 50 + .../RestletComponentConfiguration.java | 296 +++++ .../main/resources/META-INF/spring.factories | 19 + .../SalesforceComponentAutoConfiguration.java | 50 + .../SalesforceComponentConfiguration.java | 231 ++++ .../main/resources/META-INF/spring.factories | 19 + .../XQueryComponentAutoConfiguration.java | 50 + .../XQueryComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../ServletComponentAutoConfiguration.java | 50 + .../ServletComponentConfiguration.java | 127 ++ .../main/resources/META-INF/spring.factories | 19 + .../SjmsBatchComponentAutoConfiguration.java | 50 + .../SjmsBatchComponentConfiguration.java | 43 + .../SjmsComponentAutoConfiguration.java | 50 + .../springboot/SjmsComponentConfiguration.java | 166 +++ .../main/resources/META-INF/spring.factories | 21 + .../SlackComponentAutoConfiguration.java | 50 + .../springboot/SlackComponentConfiguration.java | 41 + .../main/resources/META-INF/spring.factories | 19 + .../SmppComponentAutoConfiguration.java | 50 + .../springboot/SmppComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../SparkComponentAutoConfiguration.java | 50 + .../springboot/SparkComponentConfiguration.java | 166 +++ .../main/resources/META-INF/spring.factories | 19 + .../SparkComponentAutoConfiguration.java | 50 + .../springboot/SparkComponentConfiguration.java | 56 + .../main/resources/META-INF/spring.factories | 19 + .../SplunkComponentAutoConfiguration.java | 50 + .../SplunkComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../SpringBatchComponentAutoConfiguration.java | 50 + .../SpringBatchComponentConfiguration.java | 43 + .../main/resources/META-INF/spring.factories | 19 + .../EventComponentAutoConfiguration.java | 50 + .../springboot/EventComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../SqlComponentAutoConfiguration.java | 50 + .../springboot/SqlComponentConfiguration.java | 55 + .../SqlStoredComponentAutoConfiguration.java | 50 + .../SqlStoredComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 21 + .../SshComponentAutoConfiguration.java | 50 + .../springboot/SshComponentConfiguration.java | 175 +++ .../main/resources/META-INF/spring.factories | 19 + .../camel/component/stomp/StompComponent.java | 32 +- .../StompComponentAutoConfiguration.java | 50 + .../springboot/StompComponentConfiguration.java | 91 ++ .../main/resources/META-INF/spring.factories | 19 + .../TwitterComponentAutoConfiguration.java | 50 + .../TwitterComponentConfiguration.java | 126 ++ .../main/resources/META-INF/spring.factories | 19 + .../UndertowComponentAutoConfiguration.java | 50 + .../UndertowComponentConfiguration.java | 58 + .../main/resources/META-INF/spring.factories | 19 + .../VelocityComponentAutoConfiguration.java | 50 + .../VelocityComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + .../VertxComponentAutoConfiguration.java | 50 + .../springboot/VertxComponentConfiguration.java | 107 ++ .../main/resources/META-INF/spring.factories | 19 + .../WebsocketComponentAutoConfiguration.java | 50 + .../WebsocketComponentConfiguration.java | 192 +++ .../main/resources/META-INF/spring.factories | 19 + components/camel-xmlbeans/pom.xml | 127 +- .../XmlSignatureComponentAutoConfiguration.java | 50 + .../XmlSignatureComponentConfiguration.java | 59 + .../main/resources/META-INF/spring.factories | 19 + .../YammerComponentAutoConfiguration.java | 50 + .../YammerComponentConfiguration.java | 79 ++ .../main/resources/META-INF/spring.factories | 19 + .../ZooKeeperComponentAutoConfiguration.java | 50 + .../ZooKeeperComponentConfiguration.java | 42 + .../main/resources/META-INF/spring.factories | 19 + components/pom.xml | 33 +- .../src/main/resources/application.yml | 4 + parent/pom.xml | 1 + pom.xml | 1 + .../maven/camel-package-maven-plugin/pom.xml | 25 +- .../SpringBootAutoConfigurationMojo.java | 498 ++++++++ .../src/main/resources/license-header-java.txt | 16 + .../src/main/resources/license-header.txt | 16 + 312 files changed, 17992 insertions(+), 60 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/pom.xml ---------------------------------------------------------------------- diff --git a/camel-core/pom.xml b/camel-core/pom.xml index ca2ac54..6f999e3 100644 --- a/camel-core/pom.xml +++ b/camel-core/pom.xml @@ -355,6 +355,7 @@ <id>validate</id> <goals> <goal>validate-components</goal> + <goal>prepare-spring-boot-auto-configuration</goal> </goals> <phase>prepare-package</phase> </execution> @@ -534,12 +535,34 @@ </activation> <dependencies> + + <!-- to support spring-boot auto configuration in the Camel components --> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot</artifactId> + <version>${spring-boot-version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-autoconfigure</artifactId> + <version>${spring-boot-version}</version> + <scope>provided</scope> + </dependency> + <!-- enable the APT processor --> <dependency> <groupId>org.apache.camel</groupId> <artifactId>apt</artifactId> <scope>provided</scope> </dependency> + <!-- enable Spring Boot configuration APT processor --> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-configuration-processor</artifactId> + <version>${spring-boot-version}</version> + <scope>provided</scope> + </dependency> </dependencies> </profile> http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java new file mode 100644 index 0000000..675fefa --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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.direct.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.direct.DirectComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(DirectComponentConfiguration.class) +public class DirectComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(DirectComponent.class) + public DirectComponent configureComponent(CamelContext camelContext, + DirectComponentConfiguration configuration) throws Exception { + DirectComponent component = new DirectComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java new file mode 100644 index 0000000..848e762 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java @@ -0,0 +1,56 @@ +/** + * 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.direct.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * The direct component provides direct synchronous call to another endpoint + * from the same CamelContext. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.direct") +public class DirectComponentConfiguration { + + /** + * If sending a message to a direct endpoint which has no active consumer + * then we can tell the producer to block and wait for the consumer to + * become active. + */ + private boolean block; + /** + * The timeout value to use if block is enabled. + */ + private long timeout; + + public boolean isBlock() { + return block; + } + + public void setBlock(boolean block) { + this.block = block; + } + + public long getTimeout() { + return timeout; + } + + public void setTimeout(long timeout) { + this.timeout = timeout; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java new file mode 100644 index 0000000..97c9f1a --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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.directvm.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.directvm.DirectVmComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(DirectVmComponentConfiguration.class) +public class DirectVmComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(DirectVmComponent.class) + public DirectVmComponent configureComponent(CamelContext camelContext, + DirectVmComponentConfiguration configuration) throws Exception { + DirectVmComponent component = new DirectVmComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java new file mode 100644 index 0000000..b336e8a --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java @@ -0,0 +1,85 @@ +/** + * 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.directvm.springboot; + +import org.apache.camel.spi.HeaderFilterStrategy; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * The direct-vm component provides direct synchronous call to another endpoint + * from any CamelContext in the same JVM. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.direct-vm") +public class DirectVmComponentConfiguration { + + /** + * If sending a message to a direct endpoint which has no active consumer + * then we can tell the producer to block and wait for the consumer to + * become active. + */ + private boolean block; + /** + * The timeout value to use if block is enabled. + */ + private long timeout; + /** + * Sets a HeaderFilterStrategy that will only be applied on producer + * endpoints (on both directions: request and response). Default value: + * none. + */ + private HeaderFilterStrategy headerFilterStrategy; + /** + * Whether to propagate or not properties from the producer side to the + * consumer side and viceversa. Default value: true. + */ + private boolean propagateProperties; + + public boolean isBlock() { + return block; + } + + public void setBlock(boolean block) { + this.block = block; + } + + public long getTimeout() { + return timeout; + } + + public void setTimeout(long timeout) { + this.timeout = timeout; + } + + public HeaderFilterStrategy getHeaderFilterStrategy() { + return headerFilterStrategy; + } + + public void setHeaderFilterStrategy( + HeaderFilterStrategy headerFilterStrategy) { + this.headerFilterStrategy = headerFilterStrategy; + } + + public boolean isPropagateProperties() { + return propagateProperties; + } + + public void setPropagateProperties(boolean propagateProperties) { + this.propagateProperties = propagateProperties; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java new file mode 100644 index 0000000..b6fb50b --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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.log.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.log.LogComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(LogComponentConfiguration.class) +public class LogComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(LogComponent.class) + public LogComponent configureComponent(CamelContext camelContext, + LogComponentConfiguration configuration) throws Exception { + LogComponent component = new LogComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/log/springboot/LogComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/log/springboot/LogComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/log/springboot/LogComponentConfiguration.java new file mode 100644 index 0000000..8b40ee6 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/log/springboot/LogComponentConfiguration.java @@ -0,0 +1,44 @@ +/** + * 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.log.springboot; + +import org.apache.camel.spi.ExchangeFormatter; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * The log component logs message exchanges to the underlying logging mechanism. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.log") +public class LogComponentConfiguration { + + /** + * Sets a custom ExchangeFormatter to convert the Exchange to a String + * suitable for logging. If not specified we default to + * DefaultExchangeFormatter. + */ + private ExchangeFormatter exchangeFormatter; + + public ExchangeFormatter getExchangeFormatter() { + return exchangeFormatter; + } + + public void setExchangeFormatter(ExchangeFormatter exchangeFormatter) { + this.exchangeFormatter = exchangeFormatter; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java new file mode 100644 index 0000000..86de648 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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.properties.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.properties.PropertiesComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(PropertiesComponentConfiguration.class) +public class PropertiesComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(PropertiesComponent.class) + public PropertiesComponent configureComponent(CamelContext camelContext, + PropertiesComponentConfiguration configuration) throws Exception { + PropertiesComponent component = new PropertiesComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java new file mode 100644 index 0000000..2d31111 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java @@ -0,0 +1,230 @@ +/** + * 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.properties.springboot; + +import java.util.Properties; +import org.apache.camel.component.properties.PropertiesParser; +import org.apache.camel.component.properties.PropertiesResolver; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * The properties component is used for using property placeholders in endpoint + * uris. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.properties") +public class PropertiesComponentConfiguration { + + /** + * A list of locations to load properties. You can use comma to separate + * multiple locations. This option will override any default locations and + * only use the locations from this option. + */ + private String[] locations; + /** + * A list of locations to load properties. You can use comma to separate + * multiple locations. This option will override any default locations and + * only use the locations from this option. + */ + private String location; + /** + * Encoding to use when loading properties file from the file system or + * classpath. If no encoding has been set then the properties files is + * loaded using ISO-8859-1 encoding (latin-1) as documented by link + * java.util.Propertiesload(java.io.InputStream) + */ + private String encoding; + /** + * To use a custom PropertiesResolver + */ + private PropertiesResolver propertiesResolver; + /** + * To use a custom PropertiesParser + */ + private PropertiesParser propertiesParser; + /** + * Whether or not to cache loaded properties. The default value is true. + */ + private boolean cache; + /** + * Optional prefix prepended to property names before resolution. + */ + private String propertyPrefix; + /** + * Optional suffix appended to property names before resolution. + */ + private String propertySuffix; + /** + * If true first attempt resolution of property name augmented with + * propertyPrefix and propertySuffix before falling back the plain property + * name specified. If false only the augmented property name is searched. + */ + private boolean fallbackToUnaugmentedProperty; + /** + * Whether to silently ignore if a location cannot be located such as a + * properties file not found. + */ + private boolean ignoreMissingLocation; + /** + * Sets the value of the prefix token used to identify properties to + * replace. Setting a value of null restores the default token (link link + * DEFAULT_PREFIX_TOKEN). + */ + private String prefixToken; + /** + * Sets the value of the suffix token used to identify properties to + * replace. Setting a value of null restores the default token (link link + * DEFAULT_SUFFIX_TOKEN). + */ + private String suffixToken; + /** + * Sets initial properties which will be used before any locations are + * resolved. + */ + private Properties initialProperties; + /** + * Sets a special list of override properties that take precedence and will + * use first if a property exist. + */ + private Properties overrideProperties; + /** + * Sets the system property mode. + */ + private int systemPropertiesMode; + + public String[] getLocations() { + return locations; + } + + public void setLocations(String[] locations) { + this.locations = locations; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getEncoding() { + return encoding; + } + + public void setEncoding(String encoding) { + this.encoding = encoding; + } + + public PropertiesResolver getPropertiesResolver() { + return propertiesResolver; + } + + public void setPropertiesResolver(PropertiesResolver propertiesResolver) { + this.propertiesResolver = propertiesResolver; + } + + public PropertiesParser getPropertiesParser() { + return propertiesParser; + } + + public void setPropertiesParser(PropertiesParser propertiesParser) { + this.propertiesParser = propertiesParser; + } + + public boolean isCache() { + return cache; + } + + public void setCache(boolean cache) { + this.cache = cache; + } + + public String getPropertyPrefix() { + return propertyPrefix; + } + + public void setPropertyPrefix(String propertyPrefix) { + this.propertyPrefix = propertyPrefix; + } + + public String getPropertySuffix() { + return propertySuffix; + } + + public void setPropertySuffix(String propertySuffix) { + this.propertySuffix = propertySuffix; + } + + public boolean isFallbackToUnaugmentedProperty() { + return fallbackToUnaugmentedProperty; + } + + public void setFallbackToUnaugmentedProperty( + boolean fallbackToUnaugmentedProperty) { + this.fallbackToUnaugmentedProperty = fallbackToUnaugmentedProperty; + } + + public boolean isIgnoreMissingLocation() { + return ignoreMissingLocation; + } + + public void setIgnoreMissingLocation(boolean ignoreMissingLocation) { + this.ignoreMissingLocation = ignoreMissingLocation; + } + + public String getPrefixToken() { + return prefixToken; + } + + public void setPrefixToken(String prefixToken) { + this.prefixToken = prefixToken; + } + + public String getSuffixToken() { + return suffixToken; + } + + public void setSuffixToken(String suffixToken) { + this.suffixToken = suffixToken; + } + + public Properties getInitialProperties() { + return initialProperties; + } + + public void setInitialProperties(Properties initialProperties) { + this.initialProperties = initialProperties; + } + + public Properties getOverrideProperties() { + return overrideProperties; + } + + public void setOverrideProperties(Properties overrideProperties) { + this.overrideProperties = overrideProperties; + } + + public int getSystemPropertiesMode() { + return systemPropertiesMode; + } + + public void setSystemPropertiesMode(int systemPropertiesMode) { + this.systemPropertiesMode = systemPropertiesMode; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java new file mode 100644 index 0000000..e5e3800 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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.scheduler.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.scheduler.SchedulerComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(SchedulerComponentConfiguration.class) +public class SchedulerComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(SchedulerComponent.class) + public SchedulerComponent configureComponent(CamelContext camelContext, + SchedulerComponentConfiguration configuration) throws Exception { + SchedulerComponent component = new SchedulerComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentConfiguration.java new file mode 100644 index 0000000..a4c7e6f --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentConfiguration.java @@ -0,0 +1,43 @@ +/** + * 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.scheduler.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * The scheduler component is used for generating message exchanges when a + * scheduler fires. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.scheduler") +public class SchedulerComponentConfiguration { + + /** + * Number of threads used by the scheduling thread pool. Is by default using + * a single thread + */ + private int concurrentTasks; + + public int getConcurrentTasks() { + return concurrentTasks; + } + + public void setConcurrentTasks(int concurrentTasks) { + this.concurrentTasks = concurrentTasks; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java new file mode 100644 index 0000000..009b1ea --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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.seda.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.seda.SedaComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(SedaComponentConfiguration.class) +public class SedaComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(SedaComponent.class) + public SedaComponent configureComponent(CamelContext camelContext, + SedaComponentConfiguration configuration) throws Exception { + SedaComponent component = new SedaComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java new file mode 100644 index 0000000..1f4ec64 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java @@ -0,0 +1,70 @@ +/** + * 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.seda.springboot; + +import org.apache.camel.Exchange; +import org.apache.camel.component.seda.BlockingQueueFactory; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * The seda component provides asynchronous call to another endpoint from any + * CamelContext in the same JVM. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.seda") +public class SedaComponentConfiguration { + + /** + * Sets the default maximum capacity of the SEDA queue (i.e. the number of + * messages it can hold). + */ + private int queueSize; + /** + * Sets the default number of concurrent threads processing exchanges. + */ + private int concurrentConsumers; + /** + * Sets the default queue factory. + */ + private BlockingQueueFactory<org.apache.camel.Exchange> defaultQueueFactory; + + public int getQueueSize() { + return queueSize; + } + + public void setQueueSize(int queueSize) { + this.queueSize = queueSize; + } + + public int getConcurrentConsumers() { + return concurrentConsumers; + } + + public void setConcurrentConsumers(int concurrentConsumers) { + this.concurrentConsumers = concurrentConsumers; + } + + public BlockingQueueFactory<Exchange> getDefaultQueueFactory() { + return defaultQueueFactory; + } + + public void setDefaultQueueFactory( + BlockingQueueFactory<Exchange> defaultQueueFactory) { + this.defaultQueueFactory = defaultQueueFactory; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java new file mode 100644 index 0000000..b49ac9c --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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.stub.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.stub.StubComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(StubComponentConfiguration.class) +public class StubComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(StubComponent.class) + public StubComponent configureComponent(CamelContext camelContext, + StubComponentConfiguration configuration) throws Exception { + StubComponent component = new StubComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java new file mode 100644 index 0000000..f40268c --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java @@ -0,0 +1,70 @@ +/** + * 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.stub.springboot; + +import org.apache.camel.Exchange; +import org.apache.camel.component.seda.BlockingQueueFactory; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * The stub component provides a simple way to stub out any physical endpoints + * while in development or testing. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.stub") +public class StubComponentConfiguration { + + /** + * Sets the default maximum capacity of the SEDA queue (i.e. the number of + * messages it can hold). + */ + private int queueSize; + /** + * Sets the default number of concurrent threads processing exchanges. + */ + private int concurrentConsumers; + /** + * Sets the default queue factory. + */ + private BlockingQueueFactory<org.apache.camel.Exchange> defaultQueueFactory; + + public int getQueueSize() { + return queueSize; + } + + public void setQueueSize(int queueSize) { + this.queueSize = queueSize; + } + + public int getConcurrentConsumers() { + return concurrentConsumers; + } + + public void setConcurrentConsumers(int concurrentConsumers) { + this.concurrentConsumers = concurrentConsumers; + } + + public BlockingQueueFactory<Exchange> getDefaultQueueFactory() { + return defaultQueueFactory; + } + + public void setDefaultQueueFactory( + BlockingQueueFactory<Exchange> defaultQueueFactory) { + this.defaultQueueFactory = defaultQueueFactory; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java new file mode 100644 index 0000000..9f14137 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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.validator.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.validator.ValidatorComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(ValidatorComponentConfiguration.class) +public class ValidatorComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(ValidatorComponent.class) + public ValidatorComponent configureComponent(CamelContext camelContext, + ValidatorComponentConfiguration configuration) throws Exception { + ValidatorComponent component = new ValidatorComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentConfiguration.java new file mode 100644 index 0000000..40e5a2d --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentConfiguration.java @@ -0,0 +1,44 @@ +/** + * 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.validator.springboot; + +import org.apache.camel.component.validator.ValidatorResourceResolverFactory; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Validates the payload of a message using XML Schema and JAXP Validation. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.validator") +public class ValidatorComponentConfiguration { + + /** + * To use a custom LSResourceResolver which depends on a dynamic endpoint + * resource URI + */ + private ValidatorResourceResolverFactory resourceResolverFactory; + + public ValidatorResourceResolverFactory getResourceResolverFactory() { + return resourceResolverFactory; + } + + public void setResourceResolverFactory( + ValidatorResourceResolverFactory resourceResolverFactory) { + this.resourceResolverFactory = resourceResolverFactory; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java new file mode 100644 index 0000000..49747e1 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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.vm.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.vm.VmComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(VmComponentConfiguration.class) +public class VmComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(VmComponent.class) + public VmComponent configureComponent(CamelContext camelContext, + VmComponentConfiguration configuration) throws Exception { + VmComponent component = new VmComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java new file mode 100644 index 0000000..106cf89 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java @@ -0,0 +1,70 @@ +/** + * 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.vm.springboot; + +import org.apache.camel.Exchange; +import org.apache.camel.component.seda.BlockingQueueFactory; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * The vm component provides asynchronous call to another endpoint from the same + * CamelContext. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.vm") +public class VmComponentConfiguration { + + /** + * Sets the default maximum capacity of the SEDA queue (i.e. the number of + * messages it can hold). + */ + private int queueSize; + /** + * Sets the default number of concurrent threads processing exchanges. + */ + private int concurrentConsumers; + /** + * Sets the default queue factory. + */ + private BlockingQueueFactory<org.apache.camel.Exchange> defaultQueueFactory; + + public int getQueueSize() { + return queueSize; + } + + public void setQueueSize(int queueSize) { + this.queueSize = queueSize; + } + + public int getConcurrentConsumers() { + return concurrentConsumers; + } + + public void setConcurrentConsumers(int concurrentConsumers) { + this.concurrentConsumers = concurrentConsumers; + } + + public BlockingQueueFactory<Exchange> getDefaultQueueFactory() { + return defaultQueueFactory; + } + + public void setDefaultQueueFactory( + BlockingQueueFactory<Exchange> defaultQueueFactory) { + this.defaultQueueFactory = defaultQueueFactory; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java new file mode 100644 index 0000000..3d3fdf8 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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.xslt.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.xslt.XsltComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(XsltComponentConfiguration.class) +public class XsltComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(XsltComponent.class) + public XsltComponent configureComponent(CamelContext camelContext, + XsltComponentConfiguration configuration) throws Exception { + XsltComponent component = new XsltComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentConfiguration.java new file mode 100644 index 0000000..b4f3be8 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentConfiguration.java @@ -0,0 +1,104 @@ +/** + * 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.xslt.springboot; + +import javax.xml.transform.URIResolver; +import org.apache.camel.component.xslt.XsltUriResolverFactory; +import org.apache.camel.converter.jaxp.XmlConverter; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Transforms the message using a XSLT template. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.xslt") +public class XsltComponentConfiguration { + + /** + * To use a custom implementation of + * org.apache.camel.converter.jaxp.XmlConverter + */ + private XmlConverter xmlConverter; + /** + * To use a custom javax.xml.transform.URIResolver which depends on a + * dynamic endpoint resource URI or which is a subclass of XsltUriResolver. + * Do not use in combination with uriResolver. See also link + * setUriResolver(URIResolver). + */ + private XsltUriResolverFactory uriResolverFactory; + /** + * To use a custom javax.xml.transform.URIResolver. Do not use in + * combination with uriResolverFactory. See also link + * setUriResolverFactory(XsltUriResolverFactory). + */ + private URIResolver uriResolver; + /** + * Cache for the resource content (the stylesheet file) when it is loaded. + * If set to false Camel will reload the stylesheet file on each message + * processing. This is good for development. A cached stylesheet can be + * forced to reload at runtime via JMX using the clearCachedStylesheet + * operation. + */ + private boolean contentCache; + /** + * Whether to use Saxon as the transformerFactoryClass. If enabled then the + * class net.sf.saxon.TransformerFactoryImpl. You would need to add Saxon to + * the classpath. + */ + private boolean saxon; + + public XmlConverter getXmlConverter() { + return xmlConverter; + } + + public void setXmlConverter(XmlConverter xmlConverter) { + this.xmlConverter = xmlConverter; + } + + public XsltUriResolverFactory getUriResolverFactory() { + return uriResolverFactory; + } + + public void setUriResolverFactory(XsltUriResolverFactory uriResolverFactory) { + this.uriResolverFactory = uriResolverFactory; + } + + public URIResolver getUriResolver() { + return uriResolver; + } + + public void setUriResolver(URIResolver uriResolver) { + this.uriResolver = uriResolver; + } + + public boolean isContentCache() { + return contentCache; + } + + public void setContentCache(boolean contentCache) { + this.contentCache = contentCache; + } + + public boolean isSaxon() { + return saxon; + } + + public void setSaxon(boolean saxon) { + this.saxon = saxon; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/camel-core/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/camel-core/src/main/resources/META-INF/spring.factories b/camel-core/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..b96c2d2 --- /dev/null +++ b/camel-core/src/main/resources/META-INF/spring.factories @@ -0,0 +1,35 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.direct.springboot.DirectComponentAutoConfiguration,\ +org.apache.camel.component.directvm.springboot.DirectVmComponentAutoConfiguration,\ +org.apache.camel.component.log.springboot.LogComponentAutoConfiguration,\ +org.apache.camel.component.properties.springboot.PropertiesComponentAutoConfiguration,\ +org.apache.camel.component.scheduler.springboot.SchedulerComponentAutoConfiguration,\ +org.apache.camel.component.seda.springboot.SedaComponentAutoConfiguration,\ +org.apache.camel.component.stub.springboot.StubComponentAutoConfiguration,\ +org.apache.camel.component.validator.springboot.ValidatorComponentAutoConfiguration,\ +org.apache.camel.component.xslt.springboot.XsltComponentAutoConfiguration + + + + + + + + http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components-starter/pom.xml ---------------------------------------------------------------------- diff --git a/components-starter/pom.xml b/components-starter/pom.xml new file mode 100644 index 0000000..5164e77 --- /dev/null +++ b/components-starter/pom.xml @@ -0,0 +1,34 @@ +<?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> + <groupId>org.apache.camel</groupId> + <artifactId>camel-parent</artifactId> + <version>2.18-SNAPSHOT</version> + <relativePath>../parent</relativePath> + </parent> + + <artifactId>components-starter</artifactId> + <name>Camel :: Components Starter</name> + <description>Camel Components Spring Boot Starter</description> + <packaging>pom</packaging> + +</project>