org.ow2.chameleon.i18n
Interface I18nServiceSelector


public interface I18nServiceSelector

Internationalization service selector. This service allows to simplify the selection of the correct I18nService, when several are exposed. It can also select the I18nService by using a regression algorithm on the locale.

Version:
1.0.0

Method Summary
 I18nService getI18nService(java.lang.String resourceName, java.util.Locale locale)
          Gets a i18n service localizing the given resource for the given locale.
 I18nService getI18nService(java.lang.String resourceName, java.util.Locale locale, boolean includeParents)
          Gets a i18n service localizing the given resource for the given locale.
 I18nService getI18nServiceForCurrentLocale(java.lang.String resourceName)
          Gets a i18n service localizing the given resource for the current locale.
 I18nService getI18nServiceForCurrentLocale(java.lang.String resourceName, boolean includeParents)
          Gets a i18n service localizing the given resource for the current locale.
 I18nService[] getI18nServices(java.util.Locale locale)
          Gets all I18nService providers supporting the given locale.
 I18nService[] getI18nServices(java.util.Locale locale, boolean includeParents)
          Gets all I18nService providers supporting the given locale.
 I18nService[] getI18nServices(java.lang.String resourceName)
          Gets all I18nService providers localizing the given resource name.
 I18nService[] getI18nServices(java.lang.String resourceName, java.util.Locale locale)
          Gets all I18nService providers localizing the given resource name and supporting the given locale.
 I18nService[] getI18nServices(java.lang.String resourceName, java.util.Locale locale, boolean includeParents)
          Gets all I18nService providers localizing the given resource name and supporting the given locale.
 I18nService[] getI18nServicesForCurrentLocale(java.lang.String resourceName)
          Gets all I18nService providers localizing the given resource name and supporting the current locale.
 I18nService[] getI18nServicesForCurrentLocale(java.lang.String resourceName, boolean includeParents)
          Gets all I18nService providers localizing the given resource name and supporting the current locale.
 

Method Detail

getI18nServices

I18nService[] getI18nServices(java.lang.String resourceName)
Gets all I18nService providers localizing the given resource name.

Parameters:
resourceName - the resource name
Returns:
the array of I18nService

getI18nServicesForCurrentLocale

I18nService[] getI18nServicesForCurrentLocale(java.lang.String resourceName)
Gets all I18nService providers localizing the given resource name and supporting the current locale. This methods applies a strict locale matching.

Parameters:
resourceName - the resource name
Returns:
the array of I18nService

getI18nServicesForCurrentLocale

I18nService[] getI18nServicesForCurrentLocale(java.lang.String resourceName,
                                              boolean includeParents)
Gets all I18nService providers localizing the given resource name and supporting the current locale. According to includeParents, the result will contain also service supporting parent locales.

Parameters:
resourceName - the resource name
includeParents - does the result set of services must include parent locale or not.
Returns:
the array of I18nService

getI18nServices

I18nService[] getI18nServices(java.lang.String resourceName,
                              java.util.Locale locale)
Gets all I18nService providers localizing the given resource name and supporting the given locale. This methods applies a strict locale matching.

Parameters:
resourceName - the resource name
locale - the locale
Returns:
the array of I18nService

getI18nServices

I18nService[] getI18nServices(java.lang.String resourceName,
                              java.util.Locale locale,
                              boolean includeParents)
Gets all I18nService providers localizing the given resource name and supporting the given locale. According to includeParents, the result will contain also service supporting parent locales.

Parameters:
resourceName - the resource name
locale - the locale
includeParents - does the result set of services must include parent locale or not
Returns:
the array of I18nService

getI18nServices

I18nService[] getI18nServices(java.util.Locale locale)
Gets all I18nService providers supporting the given locale. This methods applies a strict locale matching.

Parameters:
locale - the locale
Returns:
the array of I18nService

getI18nServices

I18nService[] getI18nServices(java.util.Locale locale,
                              boolean includeParents)
Gets all I18nService providers supporting the given locale. According to includeParents, the result will contain also service supporting parent locales.

Parameters:
locale - the locale
includeParents - does the result set of services must include parent locale or not
Returns:
the array of I18nService

getI18nServiceForCurrentLocale

I18nService getI18nServiceForCurrentLocale(java.lang.String resourceName)
Gets a i18n service localizing the given resource for the current locale. This methods applies a strict locale matching.

Parameters:
resourceName - the resource name
Returns:
a matching I18nService or null if not matching service found.

getI18nService

I18nService getI18nService(java.lang.String resourceName,
                           java.util.Locale locale)
Gets a i18n service localizing the given resource for the given locale. This methods applies a strict locale matching.

Parameters:
resourceName - the resource name
locale - the locale
Returns:
a matching I18nService or null if not matching service found.

getI18nServiceForCurrentLocale

I18nService getI18nServiceForCurrentLocale(java.lang.String resourceName,
                                           boolean includeParents)
Gets a i18n service localizing the given resource for the current locale. According to includeParents, if no matching service found, this methods must also looks for parent locales.

Parameters:
resourceName - the resource name
includeParents - does the returned service can be a parent locale.
Returns:
a matching I18nService or null if not matching service found.

getI18nService

I18nService getI18nService(java.lang.String resourceName,
                           java.util.Locale locale,
                           boolean includeParents)
Gets a i18n service localizing the given resource for the given locale. According to includeParents, if no matching service found, this methods must also looks for parent locales.

Parameters:
resourceName - the resource name
locale - the locale
includeParents - does the returned service can be a parent locale.
Returns:
a matching I18nService or null if not matching service found.


Copyright © 2009-2010 OW2 Chameleon. All Rights Reserved.