Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ public ComponentCustomizer configureActiveMQComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(camelContext, configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
return HierarchicalPropertiesEvaluator.evaluate(
applicationContext,
"camel.component.customizer",
"camel.component.activemq.customizer")
&& target instanceof ActiveMQComponent;
}
};
}
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.activemq", configuration, target);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -59,29 +60,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "jakarta.jms.ConnectionFactory": return applicationContext.getBean(ref, jakarta.jms.ConnectionFactory.class);
case "org.springframework.core.task.TaskExecutor": return applicationContext.getBean(ref, org.springframework.core.task.TaskExecutor.class);
case "org.apache.camel.component.jms.JmsConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.jms.JmsConfiguration.class);
case "org.springframework.jms.support.destination.DestinationResolver": return applicationContext.getBean(ref, org.springframework.jms.support.destination.DestinationResolver.class);
case "org.springframework.util.ErrorHandler": return applicationContext.getBean(ref, org.springframework.util.ErrorHandler.class);
case "jakarta.jms.ExceptionListener": return applicationContext.getBean(ref, jakarta.jms.ExceptionListener.class);
case "org.springframework.jms.support.converter.MessageConverter": return applicationContext.getBean(ref, org.springframework.jms.support.converter.MessageConverter.class);
case "org.apache.camel.component.jms.MessageCreatedStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageCreatedStrategy.class);
case "org.apache.camel.component.jms.MessageListenerContainerFactory": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageListenerContainerFactory.class);
case "org.apache.camel.component.jms.QueueBrowseStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.QueueBrowseStrategy.class);
case "org.apache.camel.component.jms.TemporaryQueueResolver": return applicationContext.getBean(ref, org.apache.camel.component.jms.TemporaryQueueResolver.class);
case "org.apache.camel.spi.HeaderFilterStrategy": return applicationContext.getBean(ref, org.apache.camel.spi.HeaderFilterStrategy.class);
case "org.springframework.transaction.PlatformTransactionManager": return applicationContext.getBean(ref, org.springframework.transaction.PlatformTransactionManager.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.activemq");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ public ComponentCustomizer configureActiveMQComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(camelContext, configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
return HierarchicalPropertiesEvaluator.evaluate(
applicationContext,
"camel.component.customizer",
"camel.component.activemq6.customizer")
&& target instanceof ActiveMQComponent;
}
};
}
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.activemq6", configuration, target);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -59,29 +60,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "jakarta.jms.ConnectionFactory": return applicationContext.getBean(ref, jakarta.jms.ConnectionFactory.class);
case "org.springframework.core.task.TaskExecutor": return applicationContext.getBean(ref, org.springframework.core.task.TaskExecutor.class);
case "org.apache.camel.component.jms.JmsConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.jms.JmsConfiguration.class);
case "org.springframework.jms.support.destination.DestinationResolver": return applicationContext.getBean(ref, org.springframework.jms.support.destination.DestinationResolver.class);
case "org.springframework.util.ErrorHandler": return applicationContext.getBean(ref, org.springframework.util.ErrorHandler.class);
case "jakarta.jms.ExceptionListener": return applicationContext.getBean(ref, jakarta.jms.ExceptionListener.class);
case "org.springframework.jms.support.converter.MessageConverter": return applicationContext.getBean(ref, org.springframework.jms.support.converter.MessageConverter.class);
case "org.apache.camel.component.jms.MessageCreatedStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageCreatedStrategy.class);
case "org.apache.camel.component.jms.MessageListenerContainerFactory": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageListenerContainerFactory.class);
case "org.apache.camel.component.jms.QueueBrowseStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.QueueBrowseStrategy.class);
case "org.apache.camel.component.jms.TemporaryQueueResolver": return applicationContext.getBean(ref, org.apache.camel.component.jms.TemporaryQueueResolver.class);
case "org.apache.camel.spi.HeaderFilterStrategy": return applicationContext.getBean(ref, org.apache.camel.spi.HeaderFilterStrategy.class);
case "org.springframework.transaction.PlatformTransactionManager": return applicationContext.getBean(ref, org.springframework.transaction.PlatformTransactionManager.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.activemq6");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ public ComponentCustomizer configureAMQPComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(camelContext, configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
return HierarchicalPropertiesEvaluator.evaluate(
applicationContext,
"camel.component.customizer",
"camel.component.amqp.customizer")
&& target instanceof AMQPComponent;
}
};
}
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.amqp", configuration, target);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -59,29 +60,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "jakarta.jms.ConnectionFactory": return applicationContext.getBean(ref, jakarta.jms.ConnectionFactory.class);
case "org.springframework.core.task.TaskExecutor": return applicationContext.getBean(ref, org.springframework.core.task.TaskExecutor.class);
case "org.apache.camel.component.jms.JmsConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.jms.JmsConfiguration.class);
case "org.springframework.jms.support.destination.DestinationResolver": return applicationContext.getBean(ref, org.springframework.jms.support.destination.DestinationResolver.class);
case "org.springframework.util.ErrorHandler": return applicationContext.getBean(ref, org.springframework.util.ErrorHandler.class);
case "jakarta.jms.ExceptionListener": return applicationContext.getBean(ref, jakarta.jms.ExceptionListener.class);
case "org.springframework.jms.support.converter.MessageConverter": return applicationContext.getBean(ref, org.springframework.jms.support.converter.MessageConverter.class);
case "org.apache.camel.component.jms.MessageCreatedStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageCreatedStrategy.class);
case "org.apache.camel.component.jms.MessageListenerContainerFactory": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageListenerContainerFactory.class);
case "org.apache.camel.component.jms.QueueBrowseStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.QueueBrowseStrategy.class);
case "org.apache.camel.component.jms.TemporaryQueueResolver": return applicationContext.getBean(ref, org.apache.camel.component.jms.TemporaryQueueResolver.class);
case "org.apache.camel.spi.HeaderFilterStrategy": return applicationContext.getBean(ref, org.apache.camel.spi.HeaderFilterStrategy.class);
case "org.springframework.transaction.PlatformTransactionManager": return applicationContext.getBean(ref, org.springframework.transaction.PlatformTransactionManager.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.amqp");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ public ComponentCustomizer configureArangoDbComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(camelContext, configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
return HierarchicalPropertiesEvaluator.evaluate(
applicationContext,
"camel.component.customizer",
"camel.component.arangodb.customizer")
&& target instanceof ArangoDbComponent;
}
};
}
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.arangodb", configuration, target);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -49,19 +50,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "org.apache.camel.component.arangodb.ArangoDbConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.arangodb.ArangoDbConfiguration.class);
case "com.arangodb.ArangoDB": return applicationContext.getBean(ref, com.arangodb.ArangoDB.class);
case "io.vertx.core.Vertx": return applicationContext.getBean(ref, io.vertx.core.Vertx.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.arangodb");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ public ComponentCustomizer configureAS2Component() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(camelContext, configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
return HierarchicalPropertiesEvaluator.evaluate(
applicationContext,
"camel.component.customizer",
"camel.component.as2.customizer")
&& target instanceof AS2Component;
}
};
}
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.as2", configuration, target);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -48,18 +49,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "org.apache.camel.component.as2.AS2Configuration": return applicationContext.getBean(ref, org.apache.camel.component.as2.AS2Configuration.class);
case "org.apache.camel.support.jsse.SSLContextParameters": return applicationContext.getBean(ref, org.apache.camel.support.jsse.SSLContextParameters.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.as2");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@ public DataFormatCustomizer configureASN1DataFormatFactory() {
return new DataFormatCustomizer() {
@Override
public void configure(String name, DataFormat target) {
CamelPropertiesHelper.copyProperties(camelContext, configuration, target);
}
@Override
public boolean isEnabled(String name, DataFormat target) {
return HierarchicalPropertiesEvaluator.evaluate(
applicationContext,
"camel.dataformat.customizer",
"camel.dataformat.asn1.customizer")
&& target instanceof ASN1DataFormat;
}
};
}
CamelPropertiesHelper.copyConfigurationProperties(camelContext, applicationContext,
"camel.dataformat.asn1", configuration, target);
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ public ComponentCustomizer configureAsteriskComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(camelContext, configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
return HierarchicalPropertiesEvaluator.evaluate(
applicationContext,
"camel.component.customizer",
"camel.component.asterisk.customizer")
&& target instanceof AsteriskComponent;
}
};
}
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.asterisk", configuration, target);
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ public ComponentCustomizer configureWebsocketComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(camelContext, configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
return HierarchicalPropertiesEvaluator.evaluate(
applicationContext,
"camel.component.customizer",
"camel.component.atmosphere-websocket.customizer")
&& target instanceof WebsocketComponent;
}
};
}
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.atmosphere-websocket", configuration, target);
}
Loading
Loading