com.atlassian.confluence.languages
Class DefaultLanguageManager

java.lang.Object
  extended by com.atlassian.confluence.languages.DefaultLanguageManager
All Implemented Interfaces:
LanguageManager

public class DefaultLanguageManager
extends Object
implements LanguageManager


Constructor Summary
DefaultLanguageManager()
           
 
Method Summary
 List<LanguageModuleDescriptor> getAvailableLanguageDescriptors()
          Retrieves a List of all enabled LanguageModuleDescriptors
static Language getDefaultEnglishLanguage()
          Returns a Language object with the Locale set to en_GB Also sets the location of the flag URL
 Language getLanguage(String languageKey)
          Retrieves the Language for the given key Null is returned when a plugin with languageKey could not be found, or it was not a Language
 Map<String,Language> getLanguageMap()
           
 List<Language> getLanguages()
          Returns a list of Language objects, representing the currently loaded languages The en_GB locale is also added to the list The sorting for this list is undefined.
 void handlePluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
           
 void handlePluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
           
 void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
           
 void setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLanguageManager

public DefaultLanguageManager()
Method Detail

getDefaultEnglishLanguage

public static Language getDefaultEnglishLanguage()
Returns a Language object with the Locale set to en_GB Also sets the location of the flag URL

Returns:
the english language default

getAvailableLanguageDescriptors

public List<LanguageModuleDescriptor> getAvailableLanguageDescriptors()
Retrieves a List of all enabled LanguageModuleDescriptors

Returns:
List containing the LanguageModuleDescriptor objects

getLanguage

public Language getLanguage(String languageKey)
Description copied from interface: LanguageManager
Retrieves the Language for the given key Null is returned when a plugin with languageKey could not be found, or it was not a Language

Specified by:
getLanguage in interface LanguageManager
Parameters:
languageKey - The key to retrieve the language for
Returns:
A Language object

getLanguageMap

public Map<String,Language> getLanguageMap()

getLanguages

public List<Language> getLanguages()
Description copied from interface: LanguageManager
Returns a list of Language objects, representing the currently loaded languages The en_GB locale is also added to the list The sorting for this list is undefined.

Specified by:
getLanguages in interface LanguageManager
Returns:
A list containing Language objects

setPluginAccessor

public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)

handlePluginModuleDisabled

public void handlePluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)

handlePluginModuleEnabled

public void handlePluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)

setPluginEventManager

public void setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)


Copyright © 2003-2012 Atlassian. All Rights Reserved.