|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LocalizedContextHome
A home interface for lookups to LocalizedContext
instances.
Nested Class Summary | |
---|---|
static class |
LocalizedContextHome.BASE_TEXT_DIRECTION
Enumerations of the base text direction for a given locale |
static interface |
LocalizedContextHome.ComparatorFactory
Factory to create a comparator per locale |
Method Summary | |
---|---|
java.util.Set<java.util.Locale> |
getAvailableLocales()
Returns the set of all available locales in the system |
LocalizedContextHome.BASE_TEXT_DIRECTION |
getBaseTextDirection(java.util.Locale locale)
Computes the base text direction for a given locale. |
LocalizedContextHome.ComparatorFactory |
getDefaultCollators()
Returns the default collator factory |
java.util.Locale |
getDefaultLocale()
Returns the default locale as defined by portal |
java.util.Set<java.util.Locale> |
getExpandedLocales(java.util.Locale locale)
Returns a set of locales that all fall back to the provided locale, including the locale itself. |
java.util.Set<java.util.Locale> |
getExpandedSupportedLocales()
Returns the set of expanded locales for the set of supported locales as returned by getSupportedLocales() . |
LocalizedContext |
getLocalizedContext(java.util.Enumeration<java.util.Locale> aLanguageRangeEnumeration)
Returns a context instance which uses the language ranges specified in the given locale enumeration. |
LocalizedContext |
getLocalizedContext(java.util.List<java.util.Locale> aLocales)
Returns a context instance which uses the language ranges specified in the given language string. |
LocalizedContext |
getLocalizedContext(java.lang.String anAcceptLanguageString)
Returns a context instance which uses the language ranges specified in the given language string. |
ResourceBundleProvider |
getResourceBundleProvider(java.lang.String baseName,
java.lang.ClassLoader loader)
Constructs a ResourceBundleProvider that can be used to load
resource bundles in particular locales without providing a locale based
fallback. |
IterableListModel<java.util.Locale> |
getSupportedLocales()
Provides easy access ot the list of supported locales in WebSphere Portal |
Method Detail |
---|
java.util.Set<java.util.Locale> getAvailableLocales()
null
LocalizedContextHome.BASE_TEXT_DIRECTION getBaseTextDirection(java.util.Locale locale)
Computes the base text direction for a given locale.
locale
- locale to get the direction for
null
LocalizedContextHome.ComparatorFactory getDefaultCollators()
java.util.Locale getDefaultLocale()
null
java.util.Set<java.util.Locale> getExpandedLocales(java.util.Locale locale)
Returns a set of locales that all fall back to the provided locale, including the locale itself.
Example: given the locale de
the method returns
[de_DE, de_AT, de, de_LU, de_CH, de_BE]
.
locale
- the locale
null
java.util.Set<java.util.Locale> getExpandedSupportedLocales()
getSupportedLocales()
. The resulting set will
therefore contain locales that contain one of the supported locales on
the fallback path.
LocalizedContext getLocalizedContext(java.util.Enumeration<java.util.Locale> aLanguageRangeEnumeration)
All desired fallback sequences must be explicitly provided in the given enumeration. E.g. the context returned for {de-DE} will not normally find resources for de; if this is desired, {de-DE,de} should be used as argument
aLanguageRangeEnumeration
- an enumeration providing locales which are interpreted as
language ranges, in descending priority order; must not be
null
.
LocalizedContext getLocalizedContext(java.util.List<java.util.Locale> aLocales)
aLocales
- the locales that this context is based on
LocalizedContext getLocalizedContext(java.lang.String anAcceptLanguageString)
anAcceptLanguageString
- a string defining accepted language ranges as documented in
RFC 2616; must not be null
. Note: Currently,
wildcards are ignored. This limitation may be removed in the
future.
ResourceBundleProvider getResourceBundleProvider(java.lang.String baseName, java.lang.ClassLoader loader)
Constructs a ResourceBundleProvider
that can be used to load
resource bundles in particular locales without providing a locale based
fallback. In addition the provider exposes the list of locales the
resource bundle is available in. The provider can be loaded once and
stored as long as the class loader is valid.
Constructing a provider is considered to be a potentially expensive operation, so a provider should be stored and cached for the lifetime of the client of the provider.
baseName
- basename of the bundleloader
- class loader for the bundle
null
IterableListModel<java.util.Locale> getSupportedLocales()
getSupportedLocales
in interface LocaleCapable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |