com.atlassian.sal.core.message
Class AbstractI18nResolver
java.lang.Object
com.atlassian.sal.core.message.AbstractI18nResolver
- All Implemented Interfaces:
- I18nResolver
public abstract class AbstractI18nResolver
- extends Object
- implements I18nResolver
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractI18nResolver
public AbstractI18nResolver()
getText
public String getText(String key,
Serializable... arguments)
- Description copied from interface:
I18nResolver
- Given a key and a list of arguments:-
1) this method returns the i18ned text formatted with the arguments if the key can be resolved.
2) otherwise, the key itself will be returned (after formatting).
Arguments may also be of the form
Message which means they will be resolved as well before
being included as an argument.
- Specified by:
getText in interface I18nResolver
- Parameters:
key - key for the i18ned messagearguments - Optional list of arguments for the message.
- Returns:
- I18ned string
getText
public String getText(String key)
- Description copied from interface:
I18nResolver
- Does the same as
I18nResolver.getText(String, java.io.Serializable...) however it is needed for velocity.
- Specified by:
getText in interface I18nResolver
- Parameters:
key - key for the i18ned message
- Returns:
- I18ned string
getText
public String getText(Message message)
- Description copied from interface:
I18nResolver
- Given a
Message this method:-
1) returns the i18ned text formatted with the message arguments if the message key can be resolved.
2) Otherwise, returns the message key (formatted with the message arguments).
- Specified by:
getText in interface I18nResolver
- Parameters:
message - The message to i18n
- Returns:
- I18ned string
resolveText
public abstract String resolveText(String key,
Serializable[] arguments)
createMessage
public Message createMessage(String key,
Serializable... arguments)
- Description copied from interface:
I18nResolver
- Creates an instance of Message.
- Specified by:
createMessage in interface I18nResolver
- Parameters:
key - The message keyarguments - The arguments to interpolate
- Returns:
- The message
createMessageCollection
public MessageCollection createMessageCollection()
- Specified by:
createMessageCollection in interface I18nResolver
- Returns:
- an instance of MessageCollection.
Copyright © 2011 Atlassian. All Rights Reserved.