http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java new file mode 100644 index 0000000..c72cf63 --- /dev/null +++ b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.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.mybatis.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.mybatis.MyBatisComponent; +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(MyBatisComponentConfiguration.class) +public class MyBatisComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(MyBatisComponent.class) + public MyBatisComponent configureComponent(CamelContext camelContext, + MyBatisComponentConfiguration configuration) throws Exception { + MyBatisComponent component = new MyBatisComponent(); + 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/3ad3f004/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentConfiguration.java b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentConfiguration.java new file mode 100644 index 0000000..81e4f2f --- /dev/null +++ b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentConfiguration.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.mybatis.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.ibatis.session.SqlSessionFactory; + +/** + * Performs a query poll insert update or delete in a relational database using + * MyBatis. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.mybatis") +public class MyBatisComponentConfiguration { + + /** + * To use the SqlSessionFactory + */ + private SqlSessionFactory sqlSessionFactory; + /** + * Location of MyBatis xml configuration file. The default value is: + * SqlMapConfig.xml loaded from the classpath + */ + private String configurationUri; + + public SqlSessionFactory getSqlSessionFactory() { + return sqlSessionFactory; + } + + public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) { + this.sqlSessionFactory = sqlSessionFactory; + } + + public String getConfigurationUri() { + return configurationUri; + } + + public void setConfigurationUri(String configurationUri) { + this.configurationUri = configurationUri; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mybatis/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-mybatis/src/main/resources/META-INF/spring.factories b/components/camel-mybatis/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..6e83825 --- /dev/null +++ b/components/camel-mybatis/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.mybatis.springboot.MyBatisComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java b/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java new file mode 100644 index 0000000..9386855 --- /dev/null +++ b/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.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.nagios.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.nagios.NagiosComponent; +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(NagiosComponentConfiguration.class) +public class NagiosComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(NagiosComponent.class) + public NagiosComponent configureComponent(CamelContext camelContext, + NagiosComponentConfiguration configuration) throws Exception { + NagiosComponent component = new NagiosComponent(); + 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/3ad3f004/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentConfiguration.java b/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentConfiguration.java new file mode 100644 index 0000000..03a4e64 --- /dev/null +++ b/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentConfiguration.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.nagios.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.nagios.NagiosConfiguration; + +/** + * To send passive checks to Nagios using JSendNSCA. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.nagios") +public class NagiosComponentConfiguration { + + /** + * To use a shared NagiosConfiguration + */ + private NagiosConfiguration configuration; + + public NagiosConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(NagiosConfiguration configuration) { + this.configuration = configuration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-nagios/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-nagios/src/main/resources/META-INF/spring.factories b/components/camel-nagios/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..d336f1b --- /dev/null +++ b/components/camel-nagios/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.nagios.springboot.NagiosComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java new file mode 100644 index 0000000..ec5ef51 --- /dev/null +++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.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.netty.http.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.netty.http.NettyHttpComponent; +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(NettyHttpComponentConfiguration.class) +public class NettyHttpComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(NettyHttpComponent.class) + public NettyHttpComponent configureComponent(CamelContext camelContext, + NettyHttpComponentConfiguration configuration) throws Exception { + NettyHttpComponent component = new NettyHttpComponent(); + 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/3ad3f004/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java new file mode 100644 index 0000000..fcf0113 --- /dev/null +++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java @@ -0,0 +1,100 @@ +/** + * 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.netty.http.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.netty.http.NettyHttpBinding; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.component.netty.http.NettyHttpSecurityConfiguration; +import org.apache.camel.component.netty.NettyConfiguration; + +/** + * Netty HTTP server and client using the Netty 3.x library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.netty-http") +public class NettyHttpComponentConfiguration { + + /** + * To use a custom org.apache.camel.component.netty.http.NettyHttpBinding + * for binding to/from Netty and Camel Message API. + */ + private NettyHttpBinding nettyHttpBinding; + /** + * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter + * headers. + */ + private HeaderFilterStrategy headerFilterStrategy; + /** + * Refers to a + * org.apache.camel.component.netty.http.NettyHttpSecurityConfiguration for + * configuring secure web resources. + */ + private NettyHttpSecurityConfiguration securityConfiguration; + /** + * To use the NettyConfiguration as configuration when creating endpoints. + */ + private NettyConfiguration configuration; + /** + * The core pool size for the ordered thread pool if its in use. The default + * value is 16. + */ + private int maximumPoolSize; + + public NettyHttpBinding getNettyHttpBinding() { + return nettyHttpBinding; + } + + public void setNettyHttpBinding(NettyHttpBinding nettyHttpBinding) { + this.nettyHttpBinding = nettyHttpBinding; + } + + public HeaderFilterStrategy getHeaderFilterStrategy() { + return headerFilterStrategy; + } + + public void setHeaderFilterStrategy( + HeaderFilterStrategy headerFilterStrategy) { + this.headerFilterStrategy = headerFilterStrategy; + } + + public NettyHttpSecurityConfiguration getSecurityConfiguration() { + return securityConfiguration; + } + + public void setSecurityConfiguration( + NettyHttpSecurityConfiguration securityConfiguration) { + this.securityConfiguration = securityConfiguration; + } + + public NettyConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(NettyConfiguration configuration) { + this.configuration = configuration; + } + + public int getMaximumPoolSize() { + return maximumPoolSize; + } + + public void setMaximumPoolSize(int maximumPoolSize) { + this.maximumPoolSize = maximumPoolSize; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-netty-http/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-netty-http/src/main/resources/META-INF/spring.factories b/components/camel-netty-http/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..a2295b2 --- /dev/null +++ b/components/camel-netty-http/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.netty.http.springboot.NettyHttpComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java new file mode 100644 index 0000000..6c894d4 --- /dev/null +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.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.netty.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.netty.NettyComponent; +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(NettyComponentConfiguration.class) +public class NettyComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(NettyComponent.class) + public NettyComponent configureComponent(CamelContext camelContext, + NettyComponentConfiguration configuration) throws Exception { + NettyComponent component = new NettyComponent(); + 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/3ad3f004/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java new file mode 100644 index 0000000..b478eaa --- /dev/null +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java @@ -0,0 +1,55 @@ +/** + * 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.netty.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.netty.NettyConfiguration; + +/** + * Socket level networking using TCP or UDP with the Netty 3.x library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.netty") +public class NettyComponentConfiguration { + + /** + * To use the NettyConfiguration as configuration when creating endpoints. + */ + private NettyConfiguration configuration; + /** + * The core pool size for the ordered thread pool if its in use. The default + * value is 16. + */ + private int maximumPoolSize; + + public NettyConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(NettyConfiguration configuration) { + this.configuration = configuration; + } + + public int getMaximumPoolSize() { + return maximumPoolSize; + } + + public void setMaximumPoolSize(int maximumPoolSize) { + this.maximumPoolSize = maximumPoolSize; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-netty/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-netty/src/main/resources/META-INF/spring.factories b/components/camel-netty/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..7d37fe1 --- /dev/null +++ b/components/camel-netty/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.netty.springboot.NettyComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java new file mode 100644 index 0000000..259e8ae --- /dev/null +++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.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.netty4.http.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.netty4.http.NettyHttpComponent; +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(NettyHttpComponentConfiguration.class) +public class NettyHttpComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(NettyHttpComponent.class) + public NettyHttpComponent configureComponent(CamelContext camelContext, + NettyHttpComponentConfiguration configuration) throws Exception { + NettyHttpComponent component = new NettyHttpComponent(); + 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/3ad3f004/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java new file mode 100644 index 0000000..2236277 --- /dev/null +++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java @@ -0,0 +1,113 @@ +/** + * 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.netty4.http.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.netty4.http.NettyHttpBinding; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.component.netty4.http.NettyHttpSecurityConfiguration; +import org.apache.camel.component.netty4.NettyConfiguration; +import io.netty.util.concurrent.EventExecutorGroup; + +/** + * Netty HTTP server and client using the Netty 4.x library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.netty4-http") +public class NettyHttpComponentConfiguration { + + /** + * To use a custom org.apache.camel.component.netty4.http.NettyHttpBinding + * for binding to/from Netty and Camel Message API. + */ + private NettyHttpBinding nettyHttpBinding; + /** + * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter + * headers. + */ + private HeaderFilterStrategy headerFilterStrategy; + /** + * Refers to a + * org.apache.camel.component.netty4.http.NettyHttpSecurityConfiguration for + * configuring secure web resources. + */ + private NettyHttpSecurityConfiguration securityConfiguration; + /** + * The thread pool size for the EventExecutorGroup if its in use. The + * default value is 16. + */ + private int maximumPoolSize; + /** + * To use the NettyConfiguration as configuration when creating endpoints. + */ + private NettyConfiguration configuration; + /** + * To use the given EventExecutorGroup + */ + private EventExecutorGroup executorService; + + public NettyHttpBinding getNettyHttpBinding() { + return nettyHttpBinding; + } + + public void setNettyHttpBinding(NettyHttpBinding nettyHttpBinding) { + this.nettyHttpBinding = nettyHttpBinding; + } + + public HeaderFilterStrategy getHeaderFilterStrategy() { + return headerFilterStrategy; + } + + public void setHeaderFilterStrategy( + HeaderFilterStrategy headerFilterStrategy) { + this.headerFilterStrategy = headerFilterStrategy; + } + + public NettyHttpSecurityConfiguration getSecurityConfiguration() { + return securityConfiguration; + } + + public void setSecurityConfiguration( + NettyHttpSecurityConfiguration securityConfiguration) { + this.securityConfiguration = securityConfiguration; + } + + public int getMaximumPoolSize() { + return maximumPoolSize; + } + + public void setMaximumPoolSize(int maximumPoolSize) { + this.maximumPoolSize = maximumPoolSize; + } + + public NettyConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(NettyConfiguration configuration) { + this.configuration = configuration; + } + + public EventExecutorGroup getExecutorService() { + return executorService; + } + + public void setExecutorService(EventExecutorGroup executorService) { + this.executorService = executorService; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-netty4-http/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/resources/META-INF/spring.factories b/components/camel-netty4-http/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..912a3c3 --- /dev/null +++ b/components/camel-netty4-http/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.netty4.http.springboot.NettyHttpComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java new file mode 100644 index 0000000..a504a8d --- /dev/null +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.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.netty4.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.netty4.NettyComponent; +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(NettyComponentConfiguration.class) +public class NettyComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(NettyComponent.class) + public NettyComponent configureComponent(CamelContext camelContext, + NettyComponentConfiguration configuration) throws Exception { + NettyComponent component = new NettyComponent(); + 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/3ad3f004/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java new file mode 100644 index 0000000..bed39e9 --- /dev/null +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java @@ -0,0 +1,68 @@ +/** + * 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.netty4.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.netty4.NettyConfiguration; +import io.netty.util.concurrent.EventExecutorGroup; + +/** + * Socket level networking using TCP or UDP with the Netty 4.x library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.netty4") +public class NettyComponentConfiguration { + + /** + * The thread pool size for the EventExecutorGroup if its in use. The + * default value is 16. + */ + private int maximumPoolSize; + /** + * To use the NettyConfiguration as configuration when creating endpoints. + */ + private NettyConfiguration configuration; + /** + * To use the given EventExecutorGroup + */ + private EventExecutorGroup executorService; + + public int getMaximumPoolSize() { + return maximumPoolSize; + } + + public void setMaximumPoolSize(int maximumPoolSize) { + this.maximumPoolSize = maximumPoolSize; + } + + public NettyConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(NettyConfiguration configuration) { + this.configuration = configuration; + } + + public EventExecutorGroup getExecutorService() { + return executorService; + } + + public void setExecutorService(EventExecutorGroup executorService) { + this.executorService = executorService; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-netty4/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/main/resources/META-INF/spring.factories b/components/camel-netty4/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..25df3f1 --- /dev/null +++ b/components/camel-netty4/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.netty4.springboot.NettyComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java new file mode 100644 index 0000000..f889140 --- /dev/null +++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.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.olingo2.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.olingo2.Olingo2Component; +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(Olingo2ComponentConfiguration.class) +public class Olingo2ComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(Olingo2Component.class) + public Olingo2Component configureComponent(CamelContext camelContext, + Olingo2ComponentConfiguration configuration) throws Exception { + Olingo2Component component = new Olingo2Component(); + 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/3ad3f004/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentConfiguration.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentConfiguration.java new file mode 100644 index 0000000..f28b1f6 --- /dev/null +++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentConfiguration.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.olingo2.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.olingo2.Olingo2Configuration; + +/** + * Communicates with OData 2.0 and 3.0 services using Apache Olingo. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.olingo2") +public class Olingo2ComponentConfiguration { + + /** + * To use the shared configuration + */ + private Olingo2Configuration configuration; + + public Olingo2Configuration getConfiguration() { + return configuration; + } + + public void setConfiguration(Olingo2Configuration configuration) { + this.configuration = configuration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-olingo2/camel-olingo2-component/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/resources/META-INF/spring.factories b/components/camel-olingo2/camel-olingo2-component/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..9a1c863 --- /dev/null +++ b/components/camel-olingo2/camel-olingo2-component/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.olingo2.springboot.Olingo2ComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java new file mode 100644 index 0000000..10a56cf --- /dev/null +++ b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.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.openshift.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.openshift.OpenShiftComponent; +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(OpenShiftComponentConfiguration.class) +public class OpenShiftComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(OpenShiftComponent.class) + public OpenShiftComponent configureComponent(CamelContext camelContext, + OpenShiftComponentConfiguration configuration) throws Exception { + OpenShiftComponent component = new OpenShiftComponent(); + 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/3ad3f004/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentConfiguration.java b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentConfiguration.java new file mode 100644 index 0000000..e2dc6ed --- /dev/null +++ b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentConfiguration.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.openshift.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * To manage your Openshift 2.x applications. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.openshift") +public class OpenShiftComponentConfiguration { + + /** + * The username to login to openshift server. + */ + private String username; + /** + * The password for login to openshift server. + */ + private String password; + /** + * Domain name. If not specified then the default domain is used. + */ + private String domain; + /** + * Url to the openshift server. If not specified then the default value from + * the local openshift configuration file /.openshift/express.conf is used. + * And if that fails as well then openshift.redhat.com is used. + */ + private String server; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public String getServer() { + return server; + } + + public void setServer(String server) { + this.server = server; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-openshift/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-openshift/src/main/resources/META-INF/spring.factories b/components/camel-openshift/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..a555e2c --- /dev/null +++ b/components/camel-openshift/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.openshift.springboot.OpenShiftComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java b/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java new file mode 100644 index 0000000..4385917 --- /dev/null +++ b/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.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.paho.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.paho.PahoComponent; +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(PahoComponentConfiguration.class) +public class PahoComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(PahoComponent.class) + public PahoComponent configureComponent(CamelContext camelContext, + PahoComponentConfiguration configuration) throws Exception { + PahoComponent component = new PahoComponent(); + 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/3ad3f004/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentConfiguration.java b/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentConfiguration.java new file mode 100644 index 0000000..6a44d99 --- /dev/null +++ b/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentConfiguration.java @@ -0,0 +1,67 @@ +/** + * 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.paho.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.eclipse.paho.client.mqttv3.MqttConnectOptions; + +/** + * Component for communicating with MQTT M2M message brokers using Eclipse Paho + * MQTT Client. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.paho") +public class PahoComponentConfiguration { + + /** + * The URL of the MQTT broker. + */ + private String brokerUrl; + /** + * MQTT client identifier. + */ + private String clientId; + /** + * Client connection options + */ + private MqttConnectOptions connectOptions; + + public String getBrokerUrl() { + return brokerUrl; + } + + public void setBrokerUrl(String brokerUrl) { + this.brokerUrl = brokerUrl; + } + + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public MqttConnectOptions getConnectOptions() { + return connectOptions; + } + + public void setConnectOptions(MqttConnectOptions connectOptions) { + this.connectOptions = connectOptions; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-paho/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-paho/src/main/resources/META-INF/spring.factories b/components/camel-paho/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..5901896 --- /dev/null +++ b/components/camel-paho/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.paho.springboot.PahoComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentAutoConfiguration.java b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentAutoConfiguration.java new file mode 100644 index 0000000..95a0463 --- /dev/null +++ b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentAutoConfiguration.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.paxlogging.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.paxlogging.PaxLoggingComponent; +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(PaxLoggingComponentConfiguration.class) +public class PaxLoggingComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(PaxLoggingComponent.class) + public PaxLoggingComponent configureComponent(CamelContext camelContext, + PaxLoggingComponentConfiguration configuration) throws Exception { + PaxLoggingComponent component = new PaxLoggingComponent(); + 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/3ad3f004/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentConfiguration.java b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentConfiguration.java new file mode 100644 index 0000000..a614b0c --- /dev/null +++ b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentConfiguration.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.paxlogging.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.osgi.framework.BundleContext; + +/** + * The paxlogging component can be used in an OSGi environment to receive + * PaxLogging events and process them. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.paxlogging") +public class PaxLoggingComponentConfiguration { + + /** + * The OSGi BundleContext is automatic injected by Camel + */ + private BundleContext bundleContext; + + public BundleContext getBundleContext() { + return bundleContext; + } + + public void setBundleContext(BundleContext bundleContext) { + this.bundleContext = bundleContext; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-paxlogging/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-paxlogging/src/main/resources/META-INF/spring.factories b/components/camel-paxlogging/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..68a4e38 --- /dev/null +++ b/components/camel-paxlogging/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.paxlogging.springboot.PaxLoggingComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentAutoConfiguration.java b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentAutoConfiguration.java new file mode 100644 index 0000000..848e27f --- /dev/null +++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentAutoConfiguration.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.quartz.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.quartz.QuartzComponent; +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(QuartzComponentConfiguration.class) +public class QuartzComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(QuartzComponent.class) + public QuartzComponent configureComponent(CamelContext camelContext, + QuartzComponentConfiguration configuration) throws Exception { + QuartzComponent component = new QuartzComponent(); + 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/3ad3f004/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java new file mode 100644 index 0000000..fdc8694 --- /dev/null +++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java @@ -0,0 +1,119 @@ +/** + * 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.quartz.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.quartz.SchedulerFactory; +import org.quartz.Scheduler; +import java.util.Properties; + +/** + * Provides a scheduled delivery of messages using the Quartz 1.x scheduler. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.quartz") +public class QuartzComponentConfiguration { + + /** + * To use the custom SchedulerFactory which is used to create the Scheduler. + */ + private SchedulerFactory factory; + /** + * To use the custom configured Quartz scheduler instead of creating a new + * Scheduler. + */ + private Scheduler scheduler; + /** + * Properties to configure the Quartz scheduler. + */ + private Properties properties; + /** + * File name of the properties to load from the classpath + */ + private String propertiesFile; + /** + * Seconds to wait before starting the quartz scheduler. + */ + private int startDelayedSeconds; + /** + * Whether or not the scheduler should be auto started. This options is + * default true + */ + private boolean autoStartScheduler; + /** + * Whether to enable Quartz JMX which allows to manage the Quartz scheduler + * from JMX. This options is default true + */ + private boolean enableJmx; + + public SchedulerFactory getFactory() { + return factory; + } + + public void setFactory(SchedulerFactory factory) { + this.factory = factory; + } + + public Scheduler getScheduler() { + return scheduler; + } + + public void setScheduler(Scheduler scheduler) { + this.scheduler = scheduler; + } + + public Properties getProperties() { + return properties; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } + + public String getPropertiesFile() { + return propertiesFile; + } + + public void setPropertiesFile(String propertiesFile) { + this.propertiesFile = propertiesFile; + } + + public int getStartDelayedSeconds() { + return startDelayedSeconds; + } + + public void setStartDelayedSeconds(int startDelayedSeconds) { + this.startDelayedSeconds = startDelayedSeconds; + } + + public boolean isAutoStartScheduler() { + return autoStartScheduler; + } + + public void setAutoStartScheduler(boolean autoStartScheduler) { + this.autoStartScheduler = autoStartScheduler; + } + + public boolean isEnableJmx() { + return enableJmx; + } + + public void setEnableJmx(boolean enableJmx) { + this.enableJmx = enableJmx; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-quartz/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-quartz/src/main/resources/META-INF/spring.factories b/components/camel-quartz/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..d33d8b8 --- /dev/null +++ b/components/camel-quartz/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.quartz.springboot.QuartzComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java new file mode 100644 index 0000000..6b8d9be --- /dev/null +++ b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.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.quartz2.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.quartz2.QuartzComponent; +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(QuartzComponentConfiguration.class) +public class QuartzComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(QuartzComponent.class) + public QuartzComponent configureComponent(CamelContext camelContext, + QuartzComponentConfiguration configuration) throws Exception { + QuartzComponent component = new QuartzComponent(); + 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