Interface IContextReplacerParams
- All Superinterfaces:
IReplacerParams, Serializable
- All Known Subinterfaces:
IPlaceholderValueParams
- All Known Implementing Classes:
DefaultReplacerParameters
- Author:
- XIMA MEDIA GmbH
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceReplacer for context placeholders.static interfaceReplacer for the placeholder of a specific context, used bygetReplacerMap(). -
Method Summary
Modifier and TypeMethodDescriptionGets the replacer for context placeholders such as[%params.user.name%].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> Gets the map of replacers for specific context placeholders, used to replace context placeholders such as[%params.user.name%].default booleanMethods inherited from interface IReplacerParams
getEscaper, isEncodeFormValuesForPlaceholder
-
Method Details
-
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
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:
-
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:
-
isReplaceContextPlaceholders
default boolean isReplaceContextPlaceholders()- Returns:
- When
false, context placeholders are not replaced.
-