Class 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_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 Detail

      • BridgePropertyPlaceholderConfigurer

        public BridgePropertyPlaceholderConfigurer()
    • Method Detail

      • processProperties

        protected void processProperties​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
                                         Properties props)
                                  throws org.springframework.beans.BeansException
        Overrides:
        processProperties in class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
        Throws:
        org.springframework.beans.BeansException
      • getSystemPropertiesMode

        public int getSystemPropertiesMode()
      • setSystemPropertiesModeName

        public void setSystemPropertiesModeName​(String constantName)
                                         throws IllegalArgumentException
        Overrides:
        setSystemPropertiesModeName in class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
        Throws:
        IllegalArgumentException
      • setSystemPropertiesMode

        public void setSystemPropertiesMode​(int systemPropertiesMode)
        Overrides:
        setSystemPropertiesMode in class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
      • resolvePlaceholder

        protected String resolvePlaceholder​(String placeholder,
                                            Properties props)
        Overrides:
        resolvePlaceholder in class org.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:
        parseUri in interface org.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 interface org.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 placeholders
        properties - 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 interface org.apache.camel.spi.PropertiesSource
      • getProperty

        public String getProperty​(String name)
        Specified by:
        getProperty in interface org.apache.camel.spi.PropertiesSource
      • loadProperties

        public Properties loadProperties()
        Specified by:
        loadProperties in interface org.apache.camel.spi.LoadablePropertiesSource
      • loadProperties

        public Properties loadProperties​(Predicate<String> filter)
        Specified by:
        loadProperties in interface org.apache.camel.spi.LoadablePropertiesSource
      • reloadProperties

        public void reloadProperties​(String location)
        Specified by:
        reloadProperties in interface org.apache.camel.spi.LoadablePropertiesSource