Class DefaultTokenReplacer

  • All Implemented Interfaces:
    TokenReplacer
    Direct Known Subclasses:
    RoxyTokenReplacer

    public class DefaultTokenReplacer
    extends LoggingObject
    implements TokenReplacer
    Default implementation of TokenReplacer that relies on a list of PropertiesSource implementations for finding tokens to replace in text. The propertyPrefix property allows for adhering to the Roxy convention of referencing properties in module text with "@ml." as a prefix. This class does not look for that prefix; rather, the RoxyTokenReplacer subclass does. This class allows for that prefix to be set to anything.
    • Constructor Detail

      • DefaultTokenReplacer

        public DefaultTokenReplacer()
    • Method Detail

      • addPropertiesSource

        public void addPropertiesSource​(PropertiesSource source)
      • initializeHelper

        protected void initializeHelper()
      • initializeProperties

        protected void initializeProperties()
        Initialize the Properties instance based on all the PropertiesSources that have been registered.
      • replaceTokens

        public java.lang.String replaceTokens​(java.lang.String text)
        Specified by:
        replaceTokens in interface TokenReplacer
      • getPropertiesSources

        public java.util.List<PropertiesSource> getPropertiesSources()
      • setPropertiesSources

        public void setPropertiesSources​(java.util.List<PropertiesSource> propertiesSources)
      • setPropertyPlaceholderHelper

        public void setPropertyPlaceholderHelper​(org.springframework.util.PropertyPlaceholderHelper helper)
      • getProperties

        public java.util.Properties getProperties()
      • setProperties

        public void setProperties​(java.util.Properties properties)
      • setPropertyPrefix

        public void setPropertyPrefix​(java.lang.String propertyPrefix)