Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F1C24200B27 for ; Tue, 7 Jun 2016 16:17:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F085A160A66; Tue, 7 Jun 2016 14:17:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 10A72160A36 for ; Tue, 7 Jun 2016 16:17:44 +0200 (CEST) Received: (qmail 35053 invoked by uid 500); 7 Jun 2016 14:17:44 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 34979 invoked by uid 99); 7 Jun 2016 14:17:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2016 14:17:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1D6CBE03A9; Tue, 7 Jun 2016 14:17:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Tue, 07 Jun 2016 14:17:45 -0000 Message-Id: In-Reply-To: <66ce4a57236d49c8937ecb44d04360d7@git.apache.org> References: <66ce4a57236d49c8937ecb44d04360d7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/17] camel git commit: Experiment with generating spring-boot auto configuration for the Camel components. archived-at: Tue, 07 Jun 2016 14:17:47 -0000 http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentConfiguration.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentConfiguration.java new file mode 100644 index 0000000..a9db8d3 --- /dev/null +++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentConfiguration.java @@ -0,0 +1,58 @@ +/** + * 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.undertow.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.undertow.UndertowHttpBinding; +import org.apache.camel.util.jsse.SSLContextParameters; + +/** + * The undertow component provides HTTP-based endpoints for consuming and + * producing HTTP requests. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.undertow") +public class UndertowComponentConfiguration { + + /** + * To use a custom HttpBinding to control the mapping between Camel message + * and HttpClient. + */ + private UndertowHttpBinding undertowHttpBinding; + /** + * To configure security using SSLContextParameters + */ + private SSLContextParameters sslContextParameters; + + public UndertowHttpBinding getUndertowHttpBinding() { + return undertowHttpBinding; + } + + public void setUndertowHttpBinding(UndertowHttpBinding undertowHttpBinding) { + this.undertowHttpBinding = undertowHttpBinding; + } + + public SSLContextParameters getSslContextParameters() { + return sslContextParameters; + } + + public void setSslContextParameters( + SSLContextParameters sslContextParameters) { + this.sslContextParameters = sslContextParameters; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-undertow/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-undertow/src/main/resources/META-INF/spring.factories b/components/camel-undertow/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..effa0bf --- /dev/null +++ b/components/camel-undertow/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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.undertow.springboot.UndertowComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java b/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java new file mode 100644 index 0000000..fd682f2 --- /dev/null +++ b/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.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.velocity.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.velocity.VelocityComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(VelocityComponentConfiguration.class) +public class VelocityComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(VelocityComponent.class) + public VelocityComponent configureComponent(CamelContext camelContext, + VelocityComponentConfiguration configuration) throws Exception { + VelocityComponent component = new VelocityComponent(); + component.setCamelContext(camelContext); + Map 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/75ca9d13/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentConfiguration.java b/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentConfiguration.java new file mode 100644 index 0000000..536296a --- /dev/null +++ b/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentConfiguration.java @@ -0,0 +1,42 @@ +/** + * 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.velocity.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.velocity.app.VelocityEngine; + +/** + * Transforms the message using a Velocity template. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.velocity") +public class VelocityComponentConfiguration { + + /** + * To use the VelocityEngine otherwise a new engine is created + */ + private VelocityEngine velocityEngine; + + public VelocityEngine getVelocityEngine() { + return velocityEngine; + } + + public void setVelocityEngine(VelocityEngine velocityEngine) { + this.velocityEngine = velocityEngine; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-velocity/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-velocity/src/main/resources/META-INF/spring.factories b/components/camel-velocity/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..aca4338 --- /dev/null +++ b/components/camel-velocity/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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.velocity.springboot.VelocityComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java b/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java new file mode 100644 index 0000000..4641fd3 --- /dev/null +++ b/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.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.vertx.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.vertx.VertxComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(VertxComponentConfiguration.class) +public class VertxComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(VertxComponent.class) + public VertxComponent configureComponent(CamelContext camelContext, + VertxComponentConfiguration configuration) throws Exception { + VertxComponent component = new VertxComponent(); + component.setCamelContext(camelContext); + Map 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/75ca9d13/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java b/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java new file mode 100644 index 0000000..16e3779 --- /dev/null +++ b/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java @@ -0,0 +1,107 @@ +/** + * 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.vertx.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import io.vertx.core.spi.VertxFactory; +import io.vertx.core.VertxOptions; +import io.vertx.core.Vertx; + +/** + * The vertx component is used for sending and receive messages from a vertx + * event bus. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.vertx") +public class VertxComponentConfiguration { + + /** + * To use a custom VertxFactory implementation + */ + private VertxFactory vertxFactory; + /** + * Hostname for creating an embedded clustered EventBus + */ + private String host; + /** + * Port for creating an embedded clustered EventBus + */ + private int port; + /** + * Options to use for creating vertx + */ + private VertxOptions vertxOptions; + /** + * To use the given vertx EventBus instead of creating a new embedded + * EventBus + */ + private Vertx vertx; + /** + * Timeout in seconds to wait for clustered Vertx EventBus to be ready. The + * default value is 60. + */ + private int timeout; + + public VertxFactory getVertxFactory() { + return vertxFactory; + } + + public void setVertxFactory(VertxFactory vertxFactory) { + this.vertxFactory = vertxFactory; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } + + public VertxOptions getVertxOptions() { + return vertxOptions; + } + + public void setVertxOptions(VertxOptions vertxOptions) { + this.vertxOptions = vertxOptions; + } + + public Vertx getVertx() { + return vertx; + } + + public void setVertx(Vertx vertx) { + this.vertx = vertx; + } + + public int getTimeout() { + return timeout; + } + + public void setTimeout(int timeout) { + this.timeout = timeout; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-vertx/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-vertx/src/main/resources/META-INF/spring.factories b/components/camel-vertx/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..2b84e83 --- /dev/null +++ b/components/camel-vertx/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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.vertx.springboot.VertxComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-weather/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentAutoConfiguration.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentAutoConfiguration.java new file mode 100644 index 0000000..ad400e8 --- /dev/null +++ b/components/camel-weather/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentAutoConfiguration.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.weather.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.weather.WeatherComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(WeatherComponentConfiguration.class) +public class WeatherComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(WeatherComponent.class) + public WeatherComponent configureComponent(CamelContext camelContext, + WeatherComponentConfiguration configuration) throws Exception { + WeatherComponent component = new WeatherComponent(); + component.setCamelContext(camelContext); + Map 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/75ca9d13/components/camel-weather/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentConfiguration.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentConfiguration.java new file mode 100644 index 0000000..0cabac9 --- /dev/null +++ b/components/camel-weather/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentConfiguration.java @@ -0,0 +1,28 @@ +/** + * 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.weather.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Polls the weather information from Open Weather Map. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.weather") +public class WeatherComponentConfiguration { +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-weather/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-weather/src/main/resources/META-INF/spring.factories b/components/camel-weather/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..123383c --- /dev/null +++ b/components/camel-weather/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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.weather.springboot.WeatherComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java b/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java new file mode 100644 index 0000000..e094710 --- /dev/null +++ b/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.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.websocket.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.websocket.WebsocketComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(WebsocketComponentConfiguration.class) +public class WebsocketComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(WebsocketComponent.class) + public WebsocketComponent configureComponent(CamelContext camelContext, + WebsocketComponentConfiguration configuration) throws Exception { + WebsocketComponent component = new WebsocketComponent(); + component.setCamelContext(camelContext); + Map 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/75ca9d13/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentConfiguration.java b/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentConfiguration.java new file mode 100644 index 0000000..18d111e --- /dev/null +++ b/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentConfiguration.java @@ -0,0 +1,192 @@ +/** + * 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.websocket.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.eclipse.jetty.util.thread.ThreadPool; +import org.apache.camel.util.jsse.SSLContextParameters; +import java.util.Map; +import org.apache.camel.component.websocket.WebSocketFactory; + +/** + * The websocket component provides websocket endpoints for communicating with + * clients using websocket. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.websocket") +public class WebsocketComponentConfiguration { + + /** + * Set a resource path for static resources (such as .html files etc). The + * resources can be loaded from classpath if you prefix with classpath: + * otherwise the resources is loaded from file system or from JAR files. For + * example to load from root classpath use classpath:. or + * classpath:WEB-INF/static If not configured (eg null) then no static + * resource is in use. + */ + private String staticResources; + /** + * The hostname. The default value is 0.0.0.0 + */ + private String host; + /** + * The port number. The default value is 9292 + */ + private Integer port; + /** + * The password for the keystore when using SSL. + */ + private String sslKeyPassword; + /** + * The password when using SSL. + */ + private String sslPassword; + /** + * The path to the keystore. + */ + private String sslKeystore; + /** + * If this option is true Jetty JMX support will be enabled for this + * endpoint. See Jetty JMX support for more details. + */ + private boolean enableJmx; + /** + * To set a value for minimum number of threads in server thread pool. + * MaxThreads/minThreads or threadPool fields are required due to switch to + * Jetty9. The default values for minThreads is 1. + */ + private Integer minThreads; + /** + * To set a value for maximum number of threads in server thread pool. + * MaxThreads/minThreads or threadPool fields are required due to switch to + * Jetty9. The default values for maxThreads is 1 2 noCores. + */ + private Integer maxThreads; + /** + * To use a custom thread pool for the server. MaxThreads/minThreads or + * threadPool fields are required due to switch to Jetty9. + */ + private ThreadPool threadPool; + /** + * To configure security using SSLContextParameters + */ + private SSLContextParameters sslContextParameters; + /** + * To configure a map which contains custom WebSocketFactory for sub + * protocols. The key in the map is the sub protocol. The default key is + * reserved for the default implementation. + */ + private Map socketFactory; + + public String getStaticResources() { + return staticResources; + } + + public void setStaticResources(String staticResources) { + this.staticResources = staticResources; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public Integer getPort() { + return port; + } + + public void setPort(Integer port) { + this.port = port; + } + + public String getSslKeyPassword() { + return sslKeyPassword; + } + + public void setSslKeyPassword(String sslKeyPassword) { + this.sslKeyPassword = sslKeyPassword; + } + + public String getSslPassword() { + return sslPassword; + } + + public void setSslPassword(String sslPassword) { + this.sslPassword = sslPassword; + } + + public String getSslKeystore() { + return sslKeystore; + } + + public void setSslKeystore(String sslKeystore) { + this.sslKeystore = sslKeystore; + } + + public boolean isEnableJmx() { + return enableJmx; + } + + public void setEnableJmx(boolean enableJmx) { + this.enableJmx = enableJmx; + } + + public Integer getMinThreads() { + return minThreads; + } + + public void setMinThreads(Integer minThreads) { + this.minThreads = minThreads; + } + + public Integer getMaxThreads() { + return maxThreads; + } + + public void setMaxThreads(Integer maxThreads) { + this.maxThreads = maxThreads; + } + + public ThreadPool getThreadPool() { + return threadPool; + } + + public void setThreadPool(ThreadPool threadPool) { + this.threadPool = threadPool; + } + + public SSLContextParameters getSslContextParameters() { + return sslContextParameters; + } + + public void setSslContextParameters( + SSLContextParameters sslContextParameters) { + this.sslContextParameters = sslContextParameters; + } + + public Map getSocketFactory() { + return socketFactory; + } + + public void setSocketFactory(Map socketFactory) { + this.socketFactory = socketFactory; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-websocket/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-websocket/src/main/resources/META-INF/spring.factories b/components/camel-websocket/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..f5a3522 --- /dev/null +++ b/components/camel-websocket/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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.websocket.springboot.WebsocketComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentAutoConfiguration.java b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentAutoConfiguration.java new file mode 100644 index 0000000..c2230b2 --- /dev/null +++ b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentAutoConfiguration.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.xmlrpc.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.xmlrpc.XmlRpcComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(XmlRpcComponentConfiguration.class) +public class XmlRpcComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(XmlRpcComponent.class) + public XmlRpcComponent configureComponent(CamelContext camelContext, + XmlRpcComponentConfiguration configuration) throws Exception { + XmlRpcComponent component = new XmlRpcComponent(); + component.setCamelContext(camelContext); + Map 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/75ca9d13/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentConfiguration.java b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentConfiguration.java new file mode 100644 index 0000000..31b5941 --- /dev/null +++ b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentConfiguration.java @@ -0,0 +1,28 @@ +/** + * 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.xmlrpc.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * The xmlrpc component is used for sending messages to a XML RPC service. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.xmlrpc") +public class XmlRpcComponentConfiguration { +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-xmlrpc/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-xmlrpc/src/main/resources/META-INF/spring.factories b/components/camel-xmlrpc/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..4ae096a --- /dev/null +++ b/components/camel-xmlrpc/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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.xmlrpc.springboot.XmlRpcComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java new file mode 100644 index 0000000..1973255 --- /dev/null +++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.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.xmlsecurity.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.xmlsecurity.XmlSignatureComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(XmlSignatureComponentConfiguration.class) +public class XmlSignatureComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(XmlSignatureComponent.class) + public XmlSignatureComponent configureComponent(CamelContext camelContext, + XmlSignatureComponentConfiguration configuration) throws Exception { + XmlSignatureComponent component = new XmlSignatureComponent(); + component.setCamelContext(camelContext); + Map 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/75ca9d13/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java new file mode 100644 index 0000000..c49951f --- /dev/null +++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java @@ -0,0 +1,59 @@ +/** + * 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.xmlsecurity.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration; +import org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration; + +/** + * Used to sign and verify exchanges using the XML signature specification. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.xmlsecurity") +public class XmlSignatureComponentConfiguration { + + /** + * To use a shared XmlSignerConfiguration configuration to use as base for + * configuring endpoints. + */ + private XmlSignerConfiguration signerConfiguration; + /** + * To use a shared XmlVerifierConfiguration configuration to use as base for + * configuring endpoints. + */ + private XmlVerifierConfiguration verifierConfiguration; + + public XmlSignerConfiguration getSignerConfiguration() { + return signerConfiguration; + } + + public void setSignerConfiguration( + XmlSignerConfiguration signerConfiguration) { + this.signerConfiguration = signerConfiguration; + } + + public XmlVerifierConfiguration getVerifierConfiguration() { + return verifierConfiguration; + } + + public void setVerifierConfiguration( + XmlVerifierConfiguration verifierConfiguration) { + this.verifierConfiguration = verifierConfiguration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-xmlsecurity/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-xmlsecurity/src/main/resources/META-INF/spring.factories b/components/camel-xmlsecurity/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..04f85dd --- /dev/null +++ b/components/camel-xmlsecurity/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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.xmlsecurity.springboot.XmlSignatureComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentAutoConfiguration.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentAutoConfiguration.java new file mode 100644 index 0000000..8ce56c8 --- /dev/null +++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentAutoConfiguration.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.xmpp.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.xmpp.XmppComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(XmppComponentConfiguration.class) +public class XmppComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(XmppComponent.class) + public XmppComponent configureComponent(CamelContext camelContext, + XmppComponentConfiguration configuration) throws Exception { + XmppComponent component = new XmppComponent(); + component.setCamelContext(camelContext); + Map 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/75ca9d13/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentConfiguration.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentConfiguration.java new file mode 100644 index 0000000..90447f8 --- /dev/null +++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentConfiguration.java @@ -0,0 +1,28 @@ +/** + * 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.xmpp.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * To send and receive messages from a XMPP (chat) server. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.xmpp") +public class XmppComponentConfiguration { +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-xmpp/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-xmpp/src/main/resources/META-INF/spring.factories b/components/camel-xmpp/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..e3b9af3 --- /dev/null +++ b/components/camel-xmpp/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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.xmpp.springboot.XmppComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java new file mode 100644 index 0000000..ebd104a --- /dev/null +++ b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.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.yammer.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.yammer.YammerComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(YammerComponentConfiguration.class) +public class YammerComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(YammerComponent.class) + public YammerComponent configureComponent(CamelContext camelContext, + YammerComponentConfiguration configuration) throws Exception { + YammerComponent component = new YammerComponent(); + component.setCamelContext(camelContext); + Map 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/75ca9d13/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentConfiguration.java b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentConfiguration.java new file mode 100644 index 0000000..26bfa25 --- /dev/null +++ b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentConfiguration.java @@ -0,0 +1,79 @@ +/** + * 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.yammer.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.yammer.YammerConfiguration; + +/** + * The yammer component allows you to interact with the Yammer enterprise social + * network. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.yammer") +public class YammerComponentConfiguration { + + /** + * The consumer key + */ + private String consumerKey; + /** + * The consumer secret + */ + private String consumerSecret; + /** + * The access token + */ + private String accessToken; + /** + * To use a shared yammer configuration + */ + private YammerConfiguration config; + + public String getConsumerKey() { + return consumerKey; + } + + public void setConsumerKey(String consumerKey) { + this.consumerKey = consumerKey; + } + + public String getConsumerSecret() { + return consumerSecret; + } + + public void setConsumerSecret(String consumerSecret) { + this.consumerSecret = consumerSecret; + } + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public YammerConfiguration getConfig() { + return config; + } + + public void setConfig(YammerConfiguration config) { + this.config = config; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-yammer/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-yammer/src/main/resources/META-INF/spring.factories b/components/camel-yammer/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..898e683 --- /dev/null +++ b/components/camel-yammer/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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.yammer.springboot.YammerComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java new file mode 100644 index 0000000..fded42d --- /dev/null +++ b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.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.zookeeper.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.zookeeper.ZooKeeperComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(ZooKeeperComponentConfiguration.class) +public class ZooKeeperComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(ZooKeeperComponent.class) + public ZooKeeperComponent configureComponent(CamelContext camelContext, + ZooKeeperComponentConfiguration configuration) throws Exception { + ZooKeeperComponent component = new ZooKeeperComponent(); + component.setCamelContext(camelContext); + Map 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/75ca9d13/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentConfiguration.java b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentConfiguration.java new file mode 100644 index 0000000..50e047d --- /dev/null +++ b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentConfiguration.java @@ -0,0 +1,42 @@ +/** + * 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.zookeeper.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.zookeeper.ZooKeeperConfiguration; + +/** + * The zookeeper component allows interaction with a ZooKeeper cluster. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.zookeeper") +public class ZooKeeperComponentConfiguration { + + /** + * To use a shared ZooKeeperConfiguration + */ + private ZooKeeperConfiguration configuration; + + public ZooKeeperConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(ZooKeeperConfiguration configuration) { + this.configuration = configuration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75ca9d13/components/camel-zookeeper/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-zookeeper/src/main/resources/META-INF/spring.factories b/components/camel-zookeeper/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..998f9e1 --- /dev/null +++ b/components/camel-zookeeper/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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.zookeeper.springboot.ZooKeeperComponentAutoConfiguration