Class UserPortalLocaleManager
java.lang.Object
de.xima.fc.user_portal.session.UserPortalLocaleManager
- All Implemented Interfaces:
Serializable
Session-scoped manager for the current locale of the user portal.
- Since:
- 8.2.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the current locale for the user portal frontend.Gets a set of the supported locales for the user portal frontend, i.e. the locales from which the user can select one.Gets a sorted list with the supported locales for the user portal frontend, i.e. the locales from which the user can select one.booleanisLocaleSelected(Locale locale) Checks whether the given locale is selected.voidAlias for #setRequestedLocale(Locale), intended to be used in facelet pages as an EL value binding.voidsetRequestedLocale(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.voidsetSupportedLocalesForPortal(String portalAlias, Collection<Locale> supportedLocales) Set the supported locales for a given user portal.
-
Constructor Details
-
UserPortalLocaleManager
public UserPortalLocaleManager()
-
-
Method Details
-
getLocale
Gets the current locale for the user portal frontend.- Returns:
- The current locale.
-
setLocale
Alias for #setRequestedLocale(Locale), intended to be used in facelet pages as an EL value binding.- Parameters:
locale- The locale to set.
-
getSupportedLocales
-
getSupportedLocalesSorted
-
setRequestedLocale
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
Set the supported locales for a given user portal.- Parameters:
portalAlias- The portal alias.supportedLocales- The supported locales.
-
isLocaleSelected
Checks whether the given locale is selected.- Parameters:
locale- The locale to check.- Returns:
trueif the given locale is selected,falseotherwise.
-