org.apache.camel.spring.spi
Class BridgePropertyPlaceholderConfigurer
java.lang.Object
org.springframework.core.io.support.PropertiesLoaderSupport
org.springframework.beans.factory.config.PropertyResourceConfigurer
org.springframework.beans.factory.config.PlaceholderConfigurerSupport
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer
- All Implemented Interfaces:
- org.apache.camel.component.properties.AugmentedPropertyNameAwarePropertiesParser, org.apache.camel.component.properties.PropertiesParser, org.apache.camel.component.properties.PropertiesResolver, Aware, BeanFactoryAware, BeanNameAware, BeanFactoryPostProcessor, Ordered, PriorityOrdered
public class BridgePropertyPlaceholderConfigurer
- extends PropertyPlaceholderConfigurer
- implements org.apache.camel.component.properties.PropertiesResolver, org.apache.camel.component.properties.AugmentedPropertyNameAwarePropertiesParser
A PropertyPlaceholderConfigurer
that bridges Camel's
property placeholder with the Spring property placeholder mechanism.
Method Summary |
String |
parseProperty(String key,
String value,
Properties properties)
|
String |
parseUri(String text,
Properties properties,
String prefixToken,
String suffixToken)
|
String |
parseUri(String text,
Properties properties,
String prefixToken,
String suffixToken,
String propertyPrefix,
String propertySuffix,
boolean fallbackToUnaugmentedProperty)
|
protected void |
processProperties(ConfigurableListableBeanFactory beanFactoryToProcess,
Properties props)
|
Properties |
resolveProperties(org.apache.camel.CamelContext context,
boolean ignoreMissingLocation,
String... uri)
|
void |
setBeanName(String beanName)
|
void |
setIgnoreUnresolvablePlaceholders(boolean ignoreUnresolvablePlaceholders)
|
void |
setParser(org.apache.camel.component.properties.PropertiesParser parser)
|
void |
setPlaceholderPrefix(String placeholderPrefix)
|
void |
setPlaceholderSuffix(String placeholderSuffix)
|
void |
setResolver(org.apache.camel.component.properties.PropertiesResolver resolver)
|
void |
setSystemPropertiesMode(int systemPropertiesMode)
|
void |
setSystemPropertiesModeName(String constantName)
|
void |
setValueSeparator(String valueSeparator)
|
protected String |
springResolvePlaceholders(String text,
Properties properties)
Resolves the placeholders using Spring's property placeholder functionality. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BridgePropertyPlaceholderConfigurer
public BridgePropertyPlaceholderConfigurer()
processProperties
protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess,
Properties props)
throws BeansException
- Overrides:
processProperties
in class PropertyPlaceholderConfigurer
- Throws:
BeansException
setBeanName
public void setBeanName(String beanName)
- Specified by:
setBeanName
in interface BeanNameAware
- Overrides:
setBeanName
in class PlaceholderConfigurerSupport
setSystemPropertiesModeName
public void setSystemPropertiesModeName(String constantName)
throws IllegalArgumentException
- Overrides:
setSystemPropertiesModeName
in class PropertyPlaceholderConfigurer
- Throws:
IllegalArgumentException
setSystemPropertiesMode
public void setSystemPropertiesMode(int systemPropertiesMode)
- Overrides:
setSystemPropertiesMode
in class PropertyPlaceholderConfigurer
setPlaceholderPrefix
public void setPlaceholderPrefix(String placeholderPrefix)
- Overrides:
setPlaceholderPrefix
in class PlaceholderConfigurerSupport
setPlaceholderSuffix
public void setPlaceholderSuffix(String placeholderSuffix)
- Overrides:
setPlaceholderSuffix
in class PlaceholderConfigurerSupport
setValueSeparator
public void setValueSeparator(String valueSeparator)
- Overrides:
setValueSeparator
in class PlaceholderConfigurerSupport
setIgnoreUnresolvablePlaceholders
public void setIgnoreUnresolvablePlaceholders(boolean ignoreUnresolvablePlaceholders)
- Overrides:
setIgnoreUnresolvablePlaceholders
in class PlaceholderConfigurerSupport
resolveProperties
public Properties resolveProperties(org.apache.camel.CamelContext context,
boolean ignoreMissingLocation,
String... uri)
throws Exception
- Specified by:
resolveProperties
in interface org.apache.camel.component.properties.PropertiesResolver
- Throws:
Exception
parseUri
public String parseUri(String text,
Properties properties,
String prefixToken,
String suffixToken,
String propertyPrefix,
String propertySuffix,
boolean fallbackToUnaugmentedProperty)
throws IllegalArgumentException
- Specified by:
parseUri
in interface org.apache.camel.component.properties.AugmentedPropertyNameAwarePropertiesParser
- Throws:
IllegalArgumentException
parseUri
public String parseUri(String text,
Properties properties,
String prefixToken,
String suffixToken)
throws IllegalArgumentException
- Specified by:
parseUri
in interface org.apache.camel.component.properties.PropertiesParser
- Throws:
IllegalArgumentException
parseProperty
public String parseProperty(String key,
String value,
Properties properties)
- Specified by:
parseProperty
in interface org.apache.camel.component.properties.PropertiesParser
springResolvePlaceholders
protected String springResolvePlaceholders(String text,
Properties properties)
- Resolves the placeholders using Spring's property placeholder functionality.
- Parameters:
text
- the text which may contain spring placeholdersproperties
- the properties
- Returns:
- the parsed text with replaced placeholders, or the original text as is
setResolver
public void setResolver(org.apache.camel.component.properties.PropertiesResolver resolver)
setParser
public void setParser(org.apache.camel.component.properties.PropertiesParser parser)
Apache Camel