Package com.funnelback.filter.api
Interface FilterContext
-
- All Known Implementing Classes:
MockFilterContext
public interface FilterContext
An immutable context supplied to the filters.The context can be used to get values from the collection configuration the filter is running under.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getCollectionName()
Gets the name of the collection under which the filter is run.java.util.Set<java.lang.String>
getConfigKeys()
Gets the set of all configuration keys for collection the filter is running under.java.util.Optional<java.lang.String>
getConfigValue(java.lang.String key)
Gets the value of the configuration setting for the collection the filter is running under.
-
-
-
Method Detail
-
getCollectionName
java.lang.String getCollectionName()
Gets the name of the collection under which the filter is run.- Returns:
- the collection name the filter is running under.
-
getConfigKeys
java.util.Set<java.lang.String> getConfigKeys()
Gets the set of all configuration keys for collection the filter is running under.- Returns:
- all configurations keys.
-
getConfigValue
java.util.Optional<java.lang.String> getConfigValue(java.lang.String key)
Gets the value of the configuration setting for the collection the filter is running under.- Parameters:
key
- used to lookup the configuration value.- Returns:
- the value for the key from the configuration if the key exists in the configuration otherwise returns empty.
-
-