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.LoadablePropertiesSource,org.apache.camel.spi.PropertiesSource,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.config.BeanFactoryPostProcessor,org.springframework.core.Ordered,org.springframework.core.PriorityOrdered
public class BridgePropertyPlaceholderConfigurer
extends org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
implements org.apache.camel.component.properties.PropertiesParser, org.apache.camel.spi.PropertiesSource, org.apache.camel.spi.LoadablePropertiesSource
A
PropertyPlaceholderConfigurer 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_OVERRIDEFields inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, trimValues, valueSeparatorFields inherited from class org.springframework.core.io.support.PropertiesLoaderSupport
localOverride, localProperties, loggerFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()getProperty(String name) intloadProperties(Predicate<String> filter) parseProperty(String key, String value, org.apache.camel.component.properties.PropertiesLookup properties) parseUri(String text, org.apache.camel.component.properties.PropertiesLookup properties, boolean fallback, boolean keepUnresolvedOptional, boolean nestedPlaceholder) protected voidprocessProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) voidreloadProperties(String location) protected StringresolvePlaceholder(String placeholder, Properties props) voidsetParser(org.apache.camel.component.properties.PropertiesParser parser) voidsetSystemPropertiesMode(int systemPropertiesMode) voidsetSystemPropertiesModeName(String constantName) protected StringspringResolvePlaceholders(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, setSearchSystemEnvironmentMethods inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport
doProcessProperties, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setTrimValues, setValueSeparatorMethods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurer
convertProperties, convertProperty, convertPropertyValue, getOrder, postProcessBeanFactory, setOrderMethods inherited from class org.springframework.core.io.support.PropertiesLoaderSupport
loadProperties, mergeProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocation, setLocations, setProperties, setPropertiesArray, setPropertiesPersister
-
Constructor Details
-
BridgePropertyPlaceholderConfigurer
public BridgePropertyPlaceholderConfigurer()
-
-
Method Details
-
processProperties
protected void processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws org.springframework.beans.BeansException - Overrides:
processPropertiesin classorg.springframework.beans.factory.config.PropertyPlaceholderConfigurer- Throws:
org.springframework.beans.BeansException
-
getSystemPropertiesMode
public int getSystemPropertiesMode() -
setSystemPropertiesModeName
- Overrides:
setSystemPropertiesModeNamein classorg.springframework.beans.factory.config.PropertyPlaceholderConfigurer- Throws:
IllegalArgumentException
-
setSystemPropertiesMode
public void setSystemPropertiesMode(int systemPropertiesMode) - Overrides:
setSystemPropertiesModein classorg.springframework.beans.factory.config.PropertyPlaceholderConfigurer
-
resolvePlaceholder
- Overrides:
resolvePlaceholderin classorg.springframework.beans.factory.config.PropertyPlaceholderConfigurer
-
parseUri
public String parseUri(String text, org.apache.camel.component.properties.PropertiesLookup properties, boolean fallback, boolean keepUnresolvedOptional, boolean nestedPlaceholder) throws IllegalArgumentException - Specified by:
parseUriin 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:
parsePropertyin 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
- Specified by:
getNamein interfaceorg.apache.camel.spi.PropertiesSource
-
getProperty
- Specified by:
getPropertyin interfaceorg.apache.camel.spi.PropertiesSource
-
loadProperties
- Specified by:
loadPropertiesin interfaceorg.apache.camel.spi.LoadablePropertiesSource
-
loadProperties
- Specified by:
loadPropertiesin interfaceorg.apache.camel.spi.LoadablePropertiesSource
-
reloadProperties
- Specified by:
reloadPropertiesin interfaceorg.apache.camel.spi.LoadablePropertiesSource
-