Class ResourceBundlesCollector
- java.lang.Object
-
- com.atlassian.confluence.util.i18n.ResourceBundlesCollector
-
public class ResourceBundlesCollector extends Object
Class that:- takes a map of resource bundles (keyed by locale) or single resource bundles
- sorts them by locale
- combines all bundles keyed by the same locale into one CombinedResourceBundle
- and returns a list of CombinedResourceBundles in the correct locale order (most specific locales come first. e.g. fr_FR -> fr -> <NOLOCALE>)
-
-
Constructor Summary
Constructors Constructor Description ResourceBundlesCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBundle(ResourceBundle bundle)
Adds a resource bundle that is not tied to any particular localevoid
addBundles(Map<String,ResourceBundle> bundlesByLocale)
List<ResourceBundle>
getCombinedResourceBundles()
-
-
-
Method Detail
-
addBundle
public void addBundle(ResourceBundle bundle)
Adds a resource bundle that is not tied to any particular locale- Parameters:
bundle
- resource bundle to add
-
addBundles
public void addBundles(Map<String,ResourceBundle> bundlesByLocale)
-
getCombinedResourceBundles
public List<ResourceBundle> getCombinedResourceBundles()
-
-