|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.web.bean.I18nBean
public class I18nBean
In an attempt to make use of our I18n-cache this was turned into a flyweight that delegates to the properly BackingI18n that lives in the caching factory.
Unit tests should never use this. Use the MockI18nHelper or BackingI18n (if you must). You should not be dealing with this Concrete Class - seeI18nHelper instead.
I18nHelper,
JiraAuthenticationContext.getI18nHelper(),
I18nHelper.BeanFactory| Nested Class Summary | |
|---|---|
static class |
I18nBean.AccessorFactory
Small delegate around the CachingI18nHelperFactory that is registered in pico as the actual I18nHelper.BeanFactory |
static class |
I18nBean.CachingFactory
As the name implies: a factory that caches I18nBeans. |
| Nested classes/interfaces inherited from interface com.atlassian.jira.util.I18nHelper |
|---|
I18nHelper.BeanFactory |
| Constructor Summary | |
|---|---|
I18nBean()
|
|
I18nBean(I18nHelper delegate)
|
|
I18nBean(Locale locale)
|
|
I18nBean(String localeString)
Deprecated. use I18nBean(java.util.Locale) instead |
|
I18nBean(com.atlassian.crowd.embedded.api.User user)
|
|
| Method Summary | |
|---|---|
ResourceBundle |
getDefaultResourceBundle()
|
protected I18nHelper.BeanFactory |
getFactory()
|
Set<String> |
getKeysForPrefix(String prefix)
Given a prefix for an i18n key, this method will return all keys that start with the prefix specified. |
Locale |
getLocale()
|
static Locale |
getLocaleFromUser(com.atlassian.crowd.embedded.api.User user)
|
String |
getText(String key)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
Object parameters)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found. |
String |
getText(String key,
Object value1,
Object value2,
Object value3)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
Object value1,
Object value2,
Object value3,
Object value4)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6,
Object value7)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6,
Object value7,
Object value8)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
String value1)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
String value1,
String value2)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
String value1,
String value2,
String value3)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
String value1,
String value2,
String value3,
String value4)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getText(String key,
String value1,
String value2,
String value3,
String value4,
String value5,
String value6,
String value7)
Called to return the formatted text of the specified i18n key |
String |
getText(String key,
String value1,
String value2,
String value3,
String value4,
String value5,
String value6,
String value7,
String value8,
String value9)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
String |
getUnescapedText(String key)
Called to return the un-formatted text of the specified i18n key or the key itself if no message can be found |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public I18nBean()
public I18nBean(Locale locale)
public I18nBean(com.atlassian.crowd.embedded.api.User user)
public I18nBean(I18nHelper delegate)
@Deprecated public I18nBean(String localeString)
I18nBean(java.util.Locale) instead
localeString - The locale String. eg "fr_CA"| Method Detail |
|---|
public static Locale getLocaleFromUser(com.atlassian.crowd.embedded.api.User user)
user - the user
Localeprotected I18nHelper.BeanFactory getFactory()
public Locale getLocale()
getLocale in interface I18nHelperLocale that is associated with this I18nHelperpublic ResourceBundle getDefaultResourceBundle()
getDefaultResourceBundle in interface I18nHelperResourceBundle within JIRApublic Set<String> getKeysForPrefix(String prefix)
I18nHelper
getKeysForPrefix in interface I18nHelperprefix - The prefix for i18n keys. May not be null
public String getUnescapedText(String key)
I18nHelper
getUnescapedText in interface I18nHelperkey - the key of the i18n message
public String getText(String key)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n message
public String getText(String key,
String value1)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the message
public String getText(String key,
Object parameters)
I18nHelperList} or a single parameter object. It will be then
used as substitution parameters within the message.
getText in interface I18nHelperkey - the key of the i18n messageparameters - This can be an Array, a List and Array or a single object parameter
public String getText(String key,
Object value1,
Object value2,
Object value3)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the messagevalue3 - a value to be substituted into the message
public String getText(String key,
String value1,
String value2)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the message
public String getText(String key,
String value1,
String value2,
String value3)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the messagevalue3 - a value to be substituted into the message
public String getText(String key,
Object value1,
Object value2,
Object value3,
Object value4)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the messagevalue3 - a value to be substituted into the messagevalue4 - a value to be substituted into the message
public String getText(String key,
String value1,
String value2,
String value3,
String value4)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the messagevalue3 - a value to be substituted into the messagevalue4 - a value to be substituted into the message
public String getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the messagevalue3 - a value to be substituted into the messagevalue4 - a value to be substituted into the messagevalue5 - a value to be substituted into the message
public String getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the messagevalue3 - a value to be substituted into the messagevalue4 - a value to be substituted into the messagevalue5 - a value to be substituted into the messagevalue6 - a value to be substituted into the message
public String getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6,
Object value7)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the messagevalue3 - a value to be substituted into the messagevalue4 - a value to be substituted into the messagevalue5 - a value to be substituted into the messagevalue6 - a value to be substituted into the messagevalue7 - a value to be substituted into the message
public String getText(String key,
String value1,
String value2,
String value3,
String value4,
String value5,
String value6,
String value7)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the messagevalue3 - a value to be substituted into the messagevalue4 - a value to be substituted into the messagevalue5 - a value to be substituted into the messagevalue6 - a value to be substituted into the messagevalue7 - a value to be substituted into the message
public String getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6,
Object value7,
Object value8)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the messagevalue3 - a value to be substituted into the messagevalue4 - a value to be substituted into the messagevalue5 - a value to be substituted into the messagevalue6 - a value to be substituted into the messagevalue7 - a value to be substituted into the messagevalue8 - a value to be substituted into the message
public String getText(String key,
String value1,
String value2,
String value3,
String value4,
String value5,
String value6,
String value7,
String value8,
String value9)
I18nHelper
getText in interface I18nHelperkey - the key of the i18n messagevalue1 - a value to be substituted into the messagevalue2 - a value to be substituted into the messagevalue3 - a value to be substituted into the messagevalue4 - a value to be substituted into the messagevalue5 - a value to be substituted into the messagevalue6 - a value to be substituted into the messagevalue7 - a value to be substituted into the messagevalue8 - a value to be substituted into the messagevalue9 - a value to be substituted into the message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||