com.atlassian.jira.config
Class DefaultLocaleManager

java.lang.Object
  extended by com.atlassian.jira.config.DefaultLocaleManager
All Implemented Interfaces:
LocaleManager

public class DefaultLocaleManager
extends java.lang.Object
implements LocaleManager


Constructor Summary
DefaultLocaleManager(JiraLocaleUtils jiraLocaleUtils)
           
 
Method Summary
 java.util.Set<java.util.Locale> getInstalledLocales()
          Returns a set of locales supported by this JIRA instance.
 java.util.Map<java.lang.String,java.lang.String> getInstalledLocalesWithDefault(java.util.Locale defaultLocale, I18nHelper i18nHelper)
          Returns a mapping of localeString to its displayname.
 java.util.Locale getLocale(java.lang.String locale)
          Given a string, return the corresponding Locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLocaleManager

public DefaultLocaleManager(JiraLocaleUtils jiraLocaleUtils)
Method Detail

getInstalledLocales

public java.util.Set<java.util.Locale> getInstalledLocales()
Description copied from interface: LocaleManager
Returns a set of locales supported by this JIRA instance. This is typically the language packs installed.

Specified by:
getInstalledLocales in interface LocaleManager
Returns:
a set of locales supported

getInstalledLocalesWithDefault

public java.util.Map<java.lang.String,java.lang.String> getInstalledLocalesWithDefault(java.util.Locale defaultLocale,
                                                                                       I18nHelper i18nHelper)
Description copied from interface: LocaleManager
Returns a mapping of localeString to its displayname. Also includes a 'Default' locale.

Specified by:
getInstalledLocalesWithDefault in interface LocaleManager
Parameters:
defaultLocale - The locale to use as the default
i18nHelper - Required to internationalize the 'Default'
Returns:
A mapping from localeString to its displayname.

getLocale

public java.util.Locale getLocale(java.lang.String locale)
Description copied from interface: LocaleManager
Given a string, return the corresponding Locale.

Specified by:
getLocale in interface LocaleManager
Parameters:
locale - Locale in string form
Returns:
The Locale object


Copyright © 2002-2010 Atlassian. All Rights Reserved.