- java.lang.Object
-
- io.helidon.config.OverrideConfigFilter
-
- All Implemented Interfaces:
ConfigFilter
public class OverrideConfigFilter extends Object implements ConfigFilter
A config filter that replaces values with a new ones of keys that matching withPattern
.
-
-
Field Summary
-
Fields inherited from interface io.helidon.config.spi.ConfigFilter
PRIORITY
-
-
Constructor Summary
Constructors Constructor Description OverrideConfigFilter(Supplier<List<Map.Entry<Predicate<Config.Key>,String>>> overrideValuesSupplier)
Creates a filter with a given supplier of a map of key patterns to a override values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
apply(Config.Key key, String stringValue)
Filters an elementary config value before it is made available to the application via theConfig
API.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.config.spi.ConfigFilter
init
-
-
-
-
Constructor Detail
-
OverrideConfigFilter
public OverrideConfigFilter(Supplier<List<Map.Entry<Predicate<Config.Key>,String>>> overrideValuesSupplier)
Creates a filter with a given supplier of a map of key patterns to a override values.- Parameters:
overrideValuesSupplier
- a supplier of a map of key patterns to a override values
-
-
Method Detail
-
apply
public String apply(Config.Key key, String stringValue)
Description copied from interface:ConfigFilter
Filters an elementary config value before it is made available to the application via theConfig
API.- Specified by:
apply
in interfaceConfigFilter
- Parameters:
key
- configurationkey
associated with theConfig
nodestringValue
- original value to be filtered, nevernull
- Returns:
- original value or filtered (changed) value, never
null
-
-