http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jsch/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-jsch/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentConfiguration.java b/components/camel-jsch/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentConfiguration.java new file mode 100644 index 0000000..4fa0f5f --- /dev/null +++ b/components/camel-jsch/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentConfiguration.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.scp.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * To copy files using the secure copy protocol (SCP). + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.scp") +public class ScpComponentConfiguration { + + /** + * JSCH is verbose logging out of the box. Therefore we turn the logging + * down to DEBUG logging by default. But setting this option to true turns + * on the verbose logging again. + */ + private boolean verboseLogging; + + public boolean isVerboseLogging() { + return verboseLogging; + } + + public void setVerboseLogging(boolean verboseLogging) { + this.verboseLogging = verboseLogging; + } +} \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jsch/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-jsch/src/main/resources/META-INF/spring.factories b/components/camel-jsch/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..0fefee7 --- /dev/null +++ b/components/camel-jsch/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.scp.springboot.ScpComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java new file mode 100644 index 0000000..27951b9 --- /dev/null +++ b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.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.jt400.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.jt400.Jt400Component; +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(Jt400ComponentConfiguration.class) +public class Jt400ComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(Jt400Component.class) + public Jt400Component configureComponent(CamelContext camelContext, + Jt400ComponentConfiguration configuration) throws Exception { + Jt400Component component = new Jt400Component(); + 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-jt400/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentConfiguration.java b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentConfiguration.java new file mode 100644 index 0000000..75f9f06 --- /dev/null +++ b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentConfiguration.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.jt400.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import com.ibm.as400.access.AS400ConnectionPool; + +/** + * The jt400 component allows you to exchanges messages with an AS/400 system + * using data queues or program call. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.jt400") +public class Jt400ComponentConfiguration { + + /** + * Returns the default connection pool used by this component. + */ + private AS400ConnectionPool connectionPool; + + public AS400ConnectionPool getConnectionPool() { + return connectionPool; + } + + public void setConnectionPool(AS400ConnectionPool connectionPool) { + this.connectionPool = connectionPool; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jt400/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-jt400/src/main/resources/META-INF/spring.factories b/components/camel-jt400/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..3d0f165 --- /dev/null +++ b/components/camel-jt400/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.jt400.springboot.Jt400ComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java new file mode 100644 index 0000000..4e7a62e --- /dev/null +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.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.kafka.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.kafka.KafkaComponent; +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(KafkaComponentConfiguration.class) +public class KafkaComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(KafkaComponent.class) + public KafkaComponent configureComponent(CamelContext camelContext, + KafkaComponentConfiguration configuration) throws Exception { + KafkaComponent component = new KafkaComponent(); + 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-kafka/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java new file mode 100644 index 0000000..d4923bd --- /dev/null +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java @@ -0,0 +1,47 @@ +/** + * 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.kafka.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import java.util.concurrent.ExecutorService; + +/** + * The kafka component allows messages to be sent to (or consumed from) Apache + * Kafka brokers. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.kafka") +public class KafkaComponentConfiguration { + + /** + * To use a shared custom worker pool for continue routing Exchange after + * kafka server has acknowledge the message that was sent to it from + * KafkaProducer using asynchronous non-blocking processing. If using this + * option then you must handle the lifecycle of the thread pool to shut the + * pool down when no longer needed. + */ + private ExecutorService workerPool; + + public ExecutorService getWorkerPool() { + return workerPool; + } + + public void setWorkerPool(ExecutorService workerPool) { + this.workerPool = workerPool; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-kafka/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-kafka/src/main/resources/META-INF/spring.factories b/components/camel-kafka/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..3bf44f6 --- /dev/null +++ b/components/camel-kafka/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.kafka.springboot.KafkaComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java new file mode 100644 index 0000000..ef7fce7 --- /dev/null +++ b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.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.kestrel.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.kestrel.KestrelComponent; +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(KestrelComponentConfiguration.class) +public class KestrelComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(KestrelComponent.class) + public KestrelComponent configureComponent(CamelContext camelContext, + KestrelComponentConfiguration configuration) throws Exception { + KestrelComponent component = new KestrelComponent(); + 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-kestrel/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentConfiguration.java b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentConfiguration.java new file mode 100644 index 0000000..d856674 --- /dev/null +++ b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentConfiguration.java @@ -0,0 +1,44 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.kestrel.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.kestrel.KestrelConfiguration; + +/** + * The kestrel component allows messages to be sent to (or consumed from) + * Kestrel brokers. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.kestrel") +public class KestrelComponentConfiguration { + + /** + * To use a shared configured configuration as base for creating new + * endpoints. + */ + private KestrelConfiguration configuration; + + public KestrelConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(KestrelConfiguration configuration) { + this.configuration = configuration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-kestrel/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-kestrel/src/main/resources/META-INF/spring.factories b/components/camel-kestrel/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..534bb4c --- /dev/null +++ b/components/camel-kestrel/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.kestrel.springboot.KestrelComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java new file mode 100644 index 0000000..f8962a5 --- /dev/null +++ b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.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.linkedin.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.linkedin.LinkedInComponent; +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(LinkedInComponentConfiguration.class) +public class LinkedInComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(LinkedInComponent.class) + public LinkedInComponent configureComponent(CamelContext camelContext, + LinkedInComponentConfiguration configuration) throws Exception { + LinkedInComponent component = new LinkedInComponent(); + 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-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentConfiguration.java b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentConfiguration.java new file mode 100644 index 0000000..aa75f41 --- /dev/null +++ b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentConfiguration.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.linkedin.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.linkedin.LinkedInConfiguration; + +/** + * The linkedin component is uses for retrieving LinkedIn user profiles + * connections companies groups posts etc. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.linkedin") +public class LinkedInComponentConfiguration { + + /** + * To use the shared configuration + */ + private LinkedInConfiguration configuration; + + public LinkedInConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(LinkedInConfiguration configuration) { + this.configuration = configuration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-linkedin/camel-linkedin-component/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-linkedin/camel-linkedin-component/src/main/resources/META-INF/spring.factories b/components/camel-linkedin/camel-linkedin-component/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..fde340f --- /dev/null +++ b/components/camel-linkedin/camel-linkedin-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.linkedin.springboot.LinkedInComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java new file mode 100644 index 0000000..23720bd --- /dev/null +++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.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.lucene.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.lucene.LuceneComponent; +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(LuceneComponentConfiguration.class) +public class LuceneComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(LuceneComponent.class) + public LuceneComponent configureComponent(CamelContext camelContext, + LuceneComponentConfiguration configuration) throws Exception { + LuceneComponent component = new LuceneComponent(); + 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-lucene/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentConfiguration.java b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentConfiguration.java new file mode 100644 index 0000000..4f639e9 --- /dev/null +++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentConfiguration.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.lucene.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.lucene.LuceneConfiguration; + +/** + * To insert or query from Apache Lucene databases. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.lucene") +public class LuceneComponentConfiguration { + + /** + * To use a shared lucene configuration + */ + private LuceneConfiguration config; + + public LuceneConfiguration getConfig() { + return config; + } + + public void setConfig(LuceneConfiguration config) { + this.config = config; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-lucene/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-lucene/src/main/resources/META-INF/spring.factories b/components/camel-lucene/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..bc2eef7 --- /dev/null +++ b/components/camel-lucene/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.lucene.springboot.LuceneComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mail/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java new file mode 100644 index 0000000..67022c2 --- /dev/null +++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.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.mail.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.mail.MailComponent; +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(MailComponentConfiguration.class) +public class MailComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(MailComponent.class) + public MailComponent configureComponent(CamelContext camelContext, + MailComponentConfiguration configuration) throws Exception { + MailComponent component = new MailComponent(); + 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-mail/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java new file mode 100644 index 0000000..49baa08 --- /dev/null +++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.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.mail.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.mail.MailConfiguration; +import org.apache.camel.component.mail.ContentTypeResolver; + +/** + * To send or receive emails using imap/pop3 or stmp protocols. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.smtps") +public class MailComponentConfiguration { + + /** + * Sets the Mail configuration + */ + private MailConfiguration configuration; + /** + * Resolver to determine Content-Type for file attachments. + */ + private ContentTypeResolver contentTypeResolver; + + public MailConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(MailConfiguration configuration) { + this.configuration = configuration; + } + + public ContentTypeResolver getContentTypeResolver() { + return contentTypeResolver; + } + + public void setContentTypeResolver(ContentTypeResolver contentTypeResolver) { + this.contentTypeResolver = contentTypeResolver; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mail/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-mail/src/main/resources/META-INF/spring.factories b/components/camel-mail/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..9791dc1 --- /dev/null +++ b/components/camel-mail/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.mail.springboot.MailComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java new file mode 100644 index 0000000..6224637 --- /dev/null +++ b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.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.metrics.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.metrics.MetricsComponent; +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(MetricsComponentConfiguration.class) +public class MetricsComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(MetricsComponent.class) + public MetricsComponent configureComponent(CamelContext camelContext, + MetricsComponentConfiguration configuration) throws Exception { + MetricsComponent component = new MetricsComponent(); + 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-metrics/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentConfiguration.java b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentConfiguration.java new file mode 100644 index 0000000..5fd61b0 --- /dev/null +++ b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentConfiguration.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.metrics.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import com.codahale.metrics.MetricRegistry; + +/** + * To collect various metrics directly from Camel routes using the DropWizard + * metrics library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.metrics") +public class MetricsComponentConfiguration { + + /** + * To use a custom configured MetricRegistry. + */ + private MetricRegistry metricRegistry; + + public MetricRegistry getMetricRegistry() { + return metricRegistry; + } + + public void setMetricRegistry(MetricRegistry metricRegistry) { + this.metricRegistry = metricRegistry; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-metrics/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-metrics/src/main/resources/META-INF/spring.factories b/components/camel-metrics/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..dd83a8b --- /dev/null +++ b/components/camel-metrics/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.metrics.springboot.MetricsComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mina/src/main/java/org/apache/camel/component/mina/springboot/MinaComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mina/src/main/java/org/apache/camel/component/mina/springboot/MinaComponentAutoConfiguration.java b/components/camel-mina/src/main/java/org/apache/camel/component/mina/springboot/MinaComponentAutoConfiguration.java new file mode 100644 index 0000000..c0f6981 --- /dev/null +++ b/components/camel-mina/src/main/java/org/apache/camel/component/mina/springboot/MinaComponentAutoConfiguration.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.mina.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.mina.MinaComponent; +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(MinaComponentConfiguration.class) +public class MinaComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(MinaComponent.class) + public MinaComponent configureComponent(CamelContext camelContext, + MinaComponentConfiguration configuration) throws Exception { + MinaComponent component = new MinaComponent(); + 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-mina/src/main/java/org/apache/camel/component/mina/springboot/MinaComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mina/src/main/java/org/apache/camel/component/mina/springboot/MinaComponentConfiguration.java b/components/camel-mina/src/main/java/org/apache/camel/component/mina/springboot/MinaComponentConfiguration.java new file mode 100644 index 0000000..86f2b16 --- /dev/null +++ b/components/camel-mina/src/main/java/org/apache/camel/component/mina/springboot/MinaComponentConfiguration.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.mina.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.mina.MinaConfiguration; + +/** + * Socket level networking using TCP or UDP with the Apache Mina 1.x library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.mina") +public class MinaComponentConfiguration { + + /** + * To use the shared mina configuration. + */ + private MinaConfiguration configuration; + + public MinaConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(MinaConfiguration configuration) { + this.configuration = configuration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mina/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-mina/src/main/resources/META-INF/spring.factories b/components/camel-mina/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..7d810bf --- /dev/null +++ b/components/camel-mina/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.mina.springboot.MinaComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java new file mode 100644 index 0000000..7a2f740 --- /dev/null +++ b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.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.mina2.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.mina2.Mina2Component; +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(Mina2ComponentConfiguration.class) +public class Mina2ComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(Mina2Component.class) + public Mina2Component configureComponent(CamelContext camelContext, + Mina2ComponentConfiguration configuration) throws Exception { + Mina2Component component = new Mina2Component(); + 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-mina2/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentConfiguration.java b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentConfiguration.java new file mode 100644 index 0000000..03f5663 --- /dev/null +++ b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentConfiguration.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.mina2.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.mina2.Mina2Configuration; + +/** + * Socket level networking using TCP or UDP with the Apache Mina 2.x library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.mina2") +public class Mina2ComponentConfiguration { + + /** + * To use the shared mina configuration. + */ + private Mina2Configuration configuration; + + public Mina2Configuration getConfiguration() { + return configuration; + } + + public void setConfiguration(Mina2Configuration configuration) { + this.configuration = configuration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mina2/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-mina2/src/main/resources/META-INF/spring.factories b/components/camel-mina2/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..b398489 --- /dev/null +++ b/components/camel-mina2/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.mina2.springboot.Mina2ComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java new file mode 100644 index 0000000..0e48350 --- /dev/null +++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.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.mqtt.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.mqtt.MQTTComponent; +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(MQTTComponentConfiguration.class) +public class MQTTComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(MQTTComponent.class) + public MQTTComponent configureComponent(CamelContext camelContext, + MQTTComponentConfiguration configuration) throws Exception { + MQTTComponent component = new MQTTComponent(); + 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-mqtt/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentConfiguration.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentConfiguration.java new file mode 100644 index 0000000..82e5504 --- /dev/null +++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentConfiguration.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.mqtt.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Component for communicating with MQTT M2M message brokers using FuseSource + * MQTT Client. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.mqtt") +public class MQTTComponentConfiguration { + + /** + * The URI of the MQTT broker to connect too - this component also supports + * SSL - e.g. ssl://127.0.0.1:8883 + */ + private String host; + /** + * Username to be used for authentication against the MQTT broker + */ + private String userName; + /** + * Password to be used for authentication against the MQTT broker + */ + private String password; + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + 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; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mqtt/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-mqtt/src/main/resources/META-INF/spring.factories b/components/camel-mqtt/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..6d3291e --- /dev/null +++ b/components/camel-mqtt/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.mqtt.springboot.MQTTComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java b/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java new file mode 100644 index 0000000..831df0c --- /dev/null +++ b/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.validator.msv.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.validator.msv.MsvComponent; +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(MsvComponentConfiguration.class) +public class MsvComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(MsvComponent.class) + public MsvComponent configureComponent(CamelContext camelContext, + MsvComponentConfiguration configuration) throws Exception { + MsvComponent component = new MsvComponent(); + 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-msv/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentConfiguration.java b/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentConfiguration.java new file mode 100644 index 0000000..5658429 --- /dev/null +++ b/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentConfiguration.java @@ -0,0 +1,57 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.validator.msv.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import javax.xml.validation.SchemaFactory; +import org.apache.camel.component.validator.ValidatorResourceResolverFactory; + +/** + * Validates the payload of a message using the MSV Library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.msv") +public class MsvComponentConfiguration { + + /** + * To use the javax.xml.validation.SchemaFactory. + */ + private SchemaFactory schemaFactory; + /** + * To use a custom LSResourceResolver which depends on a dynamic endpoint + * resource URI + */ + private ValidatorResourceResolverFactory resourceResolverFactory; + + public SchemaFactory getSchemaFactory() { + return schemaFactory; + } + + public void setSchemaFactory(SchemaFactory schemaFactory) { + this.schemaFactory = schemaFactory; + } + + public ValidatorResourceResolverFactory getResourceResolverFactory() { + return resourceResolverFactory; + } + + public void setResourceResolverFactory( + ValidatorResourceResolverFactory resourceResolverFactory) { + this.resourceResolverFactory = resourceResolverFactory; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-msv/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-msv/src/main/resources/META-INF/spring.factories b/components/camel-msv/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..67c3681 --- /dev/null +++ b/components/camel-msv/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.validator.msv.springboot.MsvComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java b/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java new file mode 100644 index 0000000..b4ff89e --- /dev/null +++ b/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.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.mustache.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.mustache.MustacheComponent; +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(MustacheComponentConfiguration.class) +public class MustacheComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(MustacheComponent.class) + public MustacheComponent configureComponent(CamelContext camelContext, + MustacheComponentConfiguration configuration) throws Exception { + MustacheComponent component = new MustacheComponent(); + 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-mustache/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentConfiguration.java b/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentConfiguration.java new file mode 100644 index 0000000..3b6b02a --- /dev/null +++ b/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentConfiguration.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.mustache.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import com.github.mustachejava.MustacheFactory; + +/** + * Transforms the message using a Mustache template. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.mustache") +public class MustacheComponentConfiguration { + + /** + * To use a custom MustacheFactory + */ + private MustacheFactory mustacheFactory; + + public MustacheFactory getMustacheFactory() { + return mustacheFactory; + } + + public void setMustacheFactory(MustacheFactory mustacheFactory) { + this.mustacheFactory = mustacheFactory; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-mustache/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-mustache/src/main/resources/META-INF/spring.factories b/components/camel-mustache/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..0a3fb76 --- /dev/null +++ b/components/camel-mustache/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.mustache.springboot.MustacheComponentAutoConfiguration