Class UserPortalLocaleManager

java.lang.Object
de.xima.fc.user_portal.session.UserPortalLocaleManager
All Implemented Interfaces:
Serializable

@Named @SessionScoped public class UserPortalLocaleManager extends Object implements Serializable
Session-scoped manager for the current locale of the user portal.
Since:
8.2.0
See Also:
  • Constructor Details

    • UserPortalLocaleManager

      public UserPortalLocaleManager()
  • Method Details

    • getLocale

      public Locale getLocale()
      Gets the current locale for the user portal frontend.
      Returns:
      The current locale.
    • setLocale

      public void setLocale(Locale locale)
      Alias for #setRequestedLocale(Locale), intended to be used in facelet pages as an EL value binding.
      Parameters:
      locale - The locale to set.
    • getSupportedLocales

      public Set<Locale> getSupportedLocales()
      Gets a set of the supported locales for the user portal frontend, i.e. the locales from which the user can select one.
      Returns:
      The supported locales.
    • getSupportedLocalesSorted

      public List<Locale> getSupportedLocalesSorted()
      Gets a sorted list with the supported locales for the user portal frontend, i.e. the locales from which the user can select one.
      Returns:
      The supported locales.
    • setRequestedLocale

      public void setRequestedLocale(Locale requestedLocale)
      Sets the locale that was requested, which may not be the current locale and may not be part of the currently supported locales.
      Parameters:
      requestedLocale - The requested locale.
    • setSupportedLocalesForPortal

      public void setSupportedLocalesForPortal(String portalAlias, Collection<Locale> supportedLocales)
      Set the supported locales for a given user portal.
      Parameters:
      portalAlias - The portal alias.
      supportedLocales - The supported locales.
    • isLocaleSelected

      public boolean isLocaleSelected(Locale locale)
      Checks whether the given locale is selected.
      Parameters:
      locale - The locale to check.
      Returns:
      true if the given locale is selected, false otherwise.