Class MapBackedConfig


  • public class MapBackedConfig
    extends Object
    Internal class, not to be used directly.
    • Field Detail

      • configSettings

        private Map<String,​String> configSettings
        This can be used to mock setting values in collection.cfg. Must not contain environment prefixed keys, no key should start with 'env.' Variable expansion will not be done e.g. $SEARCH_HOME will not be expanded. In test set the values to exactly what you expect them to be.
    • Constructor Detail

      • MapBackedConfig

        public MapBackedConfig()
      • MapBackedConfig

        public MapBackedConfig​(Map<String,​String> configSettings)
    • Method Detail

      • setConfigSetting

        public void setConfigSetting​(String key,
                                     String value)
        Set a config setting to a value.
        Parameters:
        key -
        value - The value to set the key to, when null the key will be removed from the config settings.
      • getConfigSetting

        public String getConfigSetting​(String key)
      • getConfigKeys

        public Set<String> getConfigKeys()
      • getConfigKeysWithPrefix

        public Set<String> getConfigKeysWithPrefix​(String prefix)
      • getAllKeysMatchingPattern

        private Map<String,​List<String>> getAllKeysMatchingPattern​(String pattern,
                                                                         Collection<String> hayStack)
        Copied and modified from WildCardKeyMatcher, this does not deal woth config envoronments.
        Parameters:
        pattern -
        hayStack -
        Returns: