Interface IContextReplacerParams
-
- All Superinterfaces:
IReplacerParams,Serializable
- All Known Subinterfaces:
IPlaceholderValueParams
- All Known Implementing Classes:
DefaultReplacerParameters
public interface IContextReplacerParams extends IReplacerParams
- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIContextReplacerParams.IContextValueReplacerReplacer for context placeholders.static interfaceIContextReplacerParams.IValueReplacerReplacer for the placeholder of a specific context, used bygetReplacerMap().
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default IContextReplacerParams.IContextValueReplacergetContextReplacer()Gets the replacer for context placeholders such as[%params.user.name%].default Map<String,Map<String,String>>getPlaceholderMap()Gets the map of available contextual data for each context, used to replace context placeholders such as[%params.user.name%].default Map<String,IContextReplacerParams.IValueReplacer>getReplacerMap()Gets the map of replacers for specific context placeholders, used to replace context placeholders such as[%params.user.name%].default booleanisReplaceContextPlaceholders()-
Methods inherited from interface de.xima.fc.interfaces.placeholder.params.IReplacerParams
getEscaper, isEncodeFormValuesForPlaceholder
-
-
-
-
Method Detail
-
getPlaceholderMap
default Map<String,Map<String,String>> getPlaceholderMap()
Gets the map of available contextual data for each context, used to replace context placeholders such as[%params.user.name%]. The key out the outer map is the context name, e.g. "params". The key of the inner is the placeholder name, e.g. "user.name"; and its value is the replacement value.To replace context placeholders, you can set either this map of static data, a map of replacers via
In other words, the data fromgetReplacerMap(), or a custom replacer viagetContextReplacer(). If multiple are set, the order of precedence is:getPlaceholderMap()is preferred if it contains a value for the given context and placeholder. If it does not, then the data fromgetReplacerMap()is used, if any is available. If neither of those provide a value, thengetContextReplacer()is used.- Returns:
- The map of context placeholders, or an empty map if no context placeholders are available.
- See Also:
getReplacerMap(),getContextReplacer()
-
getReplacerMap
default Map<String,IContextReplacerParams.IValueReplacer> getReplacerMap()
Gets the map of replacers for specific context placeholders, used to replace context placeholders such as[%params.user.name%]. The key is the context name, e.g. "params".To replace context placeholders, you can set either use this replacer function, a static map with fixed data via
In other words, the data fromgetPlaceholderMap(), or a map of replacers viagetReplacerMap(). If multiple are set, the order of precedence is:getPlaceholderMap()is preferred if it contains a value for the given context and placeholder. If it does not, then the data fromgetReplacerMap()is used, if any is available. If neither of those provide a value, thengetContextReplacer()is used.- Returns:
- The map of replacers, or an empty map if no replacers are available.
- See Also:
getPlaceholderMap(),getContextReplacer()
-
getContextReplacer
default IContextReplacerParams.IContextValueReplacer getContextReplacer()
Gets the replacer for context placeholders such as[%params.user.name%].To replace context placeholders, you can set either this map of static data, a map of replacers via
In other words, the data fromgetReplacerMap(), or a custom replacer viagetContextReplacer(). If multiple are set, the order of precedence is:getPlaceholderMap()is preferred if it contains a value for the given context and placeholder. If it does not, then the data fromgetReplacerMap()is used, if any is available. If neither of those provide a value, thengetContextReplacer()is used.- Returns:
- The replacer, or
nullif no replacer is available. - See Also:
getPlaceholderMap(),getReplacerMap()
-
isReplaceContextPlaceholders
default boolean isReplaceContextPlaceholders()
- Returns:
- When
false, context placeholders are not replaced.
-
-