public class CmsReplaceMessageKeyPrefix extends java.lang.Object implements CmsMultiMessages.I_KeyFallbackHandler
Constructor and Description |
---|
CmsReplaceMessageKeyPrefix(java.lang.String configuration)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<java.lang.String> |
getFallbackKey(java.lang.String key)
Gets the fallback key for the given key, or the absent value if there is no fallback key.
|
public CmsReplaceMessageKeyPrefix(java.lang.String configuration)
configuration
- a pipe-separated list of colon-separated key-value pairs, where the key is the prefix and the value is the replacementpublic com.google.common.base.Optional<java.lang.String> getFallbackKey(java.lang.String key)
CmsMultiMessages.I_KeyFallbackHandler
getFallbackKey
in interface CmsMultiMessages.I_KeyFallbackHandler
key
- the original keyCmsMultiMessages.I_KeyFallbackHandler.getFallbackKey(java.lang.String)