com.atlassian.sal.bamboo.message
Class BambooI18nResolver

java.lang.Object
  extended by com.atlassian.sal.core.message.AbstractI18nResolver
      extended by com.atlassian.sal.bamboo.message.BambooI18nResolver
All Implemented Interfaces:
I18nResolver

public class BambooI18nResolver
extends AbstractI18nResolver


Constructor Summary
BambooI18nResolver(com.atlassian.bamboo.utils.i18n.I18nBeanFactory i18nBeanFactory)
           
 
Method Summary
 Map<String,String> getAllTranslationsForPrefix(String prefix)
          Given a prefix, this method will return all translations where the key starts with the given prefix as key -> value mappings, using the default locale.
 Map<String,String> getAllTranslationsForPrefix(String prefix, Locale locale)
          Given a prefix, this method will return all translations where the key starts with the given prefix as key -> value mappings.
 String resolveText(String key, Serializable[] arguments)
           
 
Methods inherited from class com.atlassian.sal.core.message.AbstractI18nResolver
createMessage, createMessageCollection, getText, getText, getText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BambooI18nResolver

public BambooI18nResolver(com.atlassian.bamboo.utils.i18n.I18nBeanFactory i18nBeanFactory)
Method Detail

resolveText

public String resolveText(String key,
                          Serializable[] arguments)
Specified by:
resolveText in class AbstractI18nResolver

getAllTranslationsForPrefix

public Map<String,String> getAllTranslationsForPrefix(String prefix)
Description copied from interface: I18nResolver
Given a prefix, this method will return all translations where the key starts with the given prefix as key -> value mappings, using the default locale.

Parameters:
prefix - The prefix for a particular key to start with. Empty string will match everything, which may be slow. Throws NullPointerException if null.
Returns:
A Map of i18nKey -> translation mappings where i18nKey starts with the prefix. Empty map if no matches.

getAllTranslationsForPrefix

public Map<String,String> getAllTranslationsForPrefix(String prefix,
                                                      Locale locale)
Description copied from interface: I18nResolver
Given a prefix, this method will return all translations where the key starts with the given prefix as key -> value mappings.

Parameters:
prefix - The prefix for a particular key to start with. Empty string will match everything, which may be slow. Throws NullPointerException if null.
locale - The locale for which to lookup translations. Throws NullPointerException if null.
Returns:
A Map of i18nKey -> translation mappings where i18nKey starts with the prefix. Empty map if no matches.


Copyright © 2010 Atlassian. All Rights Reserved.