public class

DefaultResourceBundle

extends Object
java.lang.Object
   ↳ com.atlassian.jira.util.resourcebundle.DefaultResourceBundle

Class Overview

Provides access to the default ResourceBundle. That is, the bundle for "JiraWebActionSupport.properties" for the various languages/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.

Summary

Fields
public static final String DEFAULT_RESOURCE_BUNDLE_NAME
Public Constructors
DefaultResourceBundle()
Public Methods
static ResourceBundle getDefaultResourceBundle(Locale locale)
Returns the Default Resource Bundle (JiraWebActionSupport.properties) for the given locale.
static boolean isDefaultResourceBundleStale(Locale locale)
Returns true if and only if the default resource bundle data is stale for the given locale.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final String DEFAULT_RESOURCE_BUNDLE_NAME

Public Constructors

public DefaultResourceBundle ()

Public Methods

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.

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.