Package 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.PropertiesParser
,org.apache.camel.spi.PropertiesSource
,Aware
,BeanFactoryAware
,BeanNameAware
,BeanFactoryPostProcessor
,Ordered
,PriorityOrdered
public class BridgePropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer implements org.apache.camel.component.properties.PropertiesParser, org.apache.camel.spi.PropertiesSource
APropertyPlaceholderConfigurer
that bridges Camel's property placeholder with the Spring property placeholder mechanism.
-
-
Field Summary
-
Fields inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE
-
Fields inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, trimValues, valueSeparator
-
Fields inherited from class org.springframework.core.io.support.PropertiesLoaderSupport
localOverride, localProperties, logger
-
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
-
Constructor Summary
Constructors Constructor Description BridgePropertyPlaceholderConfigurer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
String
getProperty(String name)
int
getSystemPropertiesMode()
String
parseProperty(String key, String value, org.apache.camel.component.properties.PropertiesLookup properties)
String
parseUri(String text, org.apache.camel.component.properties.PropertiesLookup properties, boolean fallback)
protected void
processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props)
protected String
resolvePlaceholder(String placeholder, Properties props)
void
setParser(org.apache.camel.component.properties.PropertiesParser parser)
void
setSystemPropertiesMode(int systemPropertiesMode)
void
setSystemPropertiesModeName(String constantName)
protected String
springResolvePlaceholders(String text, org.apache.camel.component.properties.PropertiesLookup properties)
Resolves the placeholders using Spring's property placeholder functionality.-
Methods inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
resolvePlaceholder, resolveSystemProperty, setSearchSystemEnvironment
-
Methods inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport
doProcessProperties, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setTrimValues, setValueSeparator
-
Methods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurer
convertProperties, convertProperty, convertPropertyValue, getOrder, postProcessBeanFactory, setOrder
-
Methods inherited from class org.springframework.core.io.support.PropertiesLoaderSupport
loadProperties, mergeProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocation, setLocations, setProperties, setPropertiesArray, setPropertiesPersister
-
-
-
-
Constructor Detail
-
BridgePropertyPlaceholderConfigurer
public BridgePropertyPlaceholderConfigurer()
-
-
Method Detail
-
processProperties
protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws BeansException
- Overrides:
processProperties
in classPropertyPlaceholderConfigurer
- Throws:
BeansException
-
getSystemPropertiesMode
public int getSystemPropertiesMode()
-
setSystemPropertiesModeName
public void setSystemPropertiesModeName(String constantName) throws IllegalArgumentException
- Overrides:
setSystemPropertiesModeName
in classPropertyPlaceholderConfigurer
- Throws:
IllegalArgumentException
-
setSystemPropertiesMode
public void setSystemPropertiesMode(int systemPropertiesMode)
- Overrides:
setSystemPropertiesMode
in classPropertyPlaceholderConfigurer
-
resolvePlaceholder
protected String resolvePlaceholder(String placeholder, Properties props)
- Overrides:
resolvePlaceholder
in classPropertyPlaceholderConfigurer
-
parseUri
public String parseUri(String text, org.apache.camel.component.properties.PropertiesLookup properties, boolean fallback) throws IllegalArgumentException
- Specified by:
parseUri
in interfaceorg.apache.camel.component.properties.PropertiesParser
- Throws:
IllegalArgumentException
-
parseProperty
public String parseProperty(String key, String value, org.apache.camel.component.properties.PropertiesLookup properties)
- Specified by:
parseProperty
in interfaceorg.apache.camel.component.properties.PropertiesParser
-
springResolvePlaceholders
protected String springResolvePlaceholders(String text, org.apache.camel.component.properties.PropertiesLookup 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
-
setParser
public void setParser(org.apache.camel.component.properties.PropertiesParser parser)
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.apache.camel.spi.PropertiesSource
-
getProperty
public String getProperty(String name)
- Specified by:
getProperty
in interfaceorg.apache.camel.spi.PropertiesSource
-
-