Package org.opencms.i18n
Class CmsReplaceMessageKeyPrefix
java.lang.Object
org.opencms.i18n.CmsReplaceMessageKeyPrefix
- All Implemented Interfaces:
CmsMultiMessages.I_KeyFallbackHandler
public class CmsReplaceMessageKeyPrefix
extends Object
implements CmsMultiMessages.I_KeyFallbackHandler
Message key fallback handler which replaces a given set of prefixes with alternative prefixes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.base.Optional<String>
getFallbackKey
(String key) Gets the fallback key for the given key, or the absent value if there is no fallback key.
-
Constructor Details
-
CmsReplaceMessageKeyPrefix
Creates a new instance.- Parameters:
configuration
- a pipe-separated list of colon-separated key-value pairs, where the key is the prefix and the value is the replacement
-
-
Method Details
-
getFallbackKey
Description copied from interface:CmsMultiMessages.I_KeyFallbackHandler
Gets the fallback key for the given key, or the absent value if there is no fallback key.- Specified by:
getFallbackKey
in interfaceCmsMultiMessages.I_KeyFallbackHandler
- Parameters:
key
- the original key- Returns:
- the fallback key
- See Also:
-