com.atlassian.jira.util.resourcebundle
Class DefaultResourceBundle
java.lang.Object
com.atlassian.jira.util.resourcebundle.DefaultResourceBundle
public class DefaultResourceBundle
- extends Object
Provides access to the default ResourceBundle. That is, the bundle for "JiraWebActionSupport.properties" for the
various languanges/locales.
This class caches the ResourceBundle per locale, because the lookup is expensive and causes thread contention.
Default ResourceBundles must live in the core ClassLoader and can be cached permanently as they cannot change. This
is not so simple for custom translations for plugins (other ResourceBundles), and so they are not included here.
- Since:
- v4.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_RESOURCE_BUNDLE_NAME
public static final String DEFAULT_RESOURCE_BUNDLE_NAME
DefaultResourceBundle
public DefaultResourceBundle()
getDefaultResourceBundle
public static ResourceBundle getDefaultResourceBundle(Locale locale)
- Returns the Default Resource Bundle (JiraWebActionSupport.properties) for the given locale.
- Parameters:
locale
- The locale.
- Returns:
- the Default Resource Bundle (JiraWebActionSupport.properties) for the given locale.
isDefaultResourceBundleStale
public static boolean isDefaultResourceBundleStale(Locale locale)
- Returns true if and only if the default resource bundle data is
stale for the given locale. This is used by I18nBean.CachingFactory
to flush the cache when the default resource bundle is modified. This
is only relevant in dev mode, as otherwise we will not have a
DebuggingResourceBundle and so can not reload it anyway.
- Parameters:
locale
- the locale within which to make the check
- Returns:
- true if the data has to be reloaded; false
otherwise.
Copyright © 2002-2014 Atlassian. All Rights Reserved.