Package com.funnelback.filter.api.mock
Class MockFilterContext
- java.lang.Object
-
- com.funnelback.filter.api.mock.MockFilterContext
-
- All Implemented Interfaces:
FilterContext
public class MockFilterContext extends java.lang.Object implements FilterContext
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.static MockFilterContextgetEmptyContext()voidsetConfigValue(java.lang.String key, java.lang.String value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.funnelback.filter.api.FilterContext
getCollectionName
-
-
-
-
Method Detail
-
getConfigKeys
public java.util.Set<java.lang.String> getConfigKeys()
Description copied from interface:FilterContextGets the set of all configuration keys for collection the filter is running under.- Specified by:
getConfigKeysin interfaceFilterContext- Returns:
- all configurations keys.
-
getConfigValue
public java.util.Optional<java.lang.String> getConfigValue(java.lang.String key)
Description copied from interface:FilterContextGets the value of the configuration setting for the collection the filter is running under.- Specified by:
getConfigValuein interfaceFilterContext- 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.
-
setConfigValue
public void setConfigValue(java.lang.String key, java.lang.String value)
-
getEmptyContext
public static MockFilterContext getEmptyContext()
-
-