Class LocaleBean

java.lang.Object
de.xima.fc.gui.common.bean.LocaleBean
All Implemented Interfaces:
Serializable

@Named @SessionScoped public class LocaleBean extends Object implements Serializable
Bean des aktuellen Locales
Author:
XIMA MEDIA GmbH
See Also:
  • Field Details

    • LOCALE_ATTR

      public static String LOCALE_ATTR
  • Constructor Details

    • LocaleBean

      public LocaleBean()
  • Method Details

    • getLocale

      public Locale getLocale()
      Methode zum Ermitteln des aktuellen Locale
      Returns:
      Locale welches aktuell konfiguriert ist
    • getSelectedLocale

      public Locale getSelectedLocale()
    • getLanguage

      public ELanguage getLanguage()
    • getZoneIds

      public Map<String,ZoneId> getZoneIds()
    • getServerZoneId

      public String getServerZoneId()
    • getCountriesInMap

      public Map<String,String> getCountriesInMap()
      Retrieves a map with all supported languages. The key is the display name of the language in the current getLocale(), the value is the language code.
      Returns:
      A map with all supported languages.
    • getLocaleOptionsMenu

      public org.primefaces.model.menu.MenuModel getLocaleOptionsMenu()
    • getLocaleCode

      public String getLocaleCode()
      Methode zum Ermitteln der Sprache der aktuellen Locale
      Returns:
      String der Sprachkey der aktuellen Locale
    • setLocaleCode

      public void setLocaleCode(String localeCode)
      Methode zum Setzen der Locale anhand des Sprachkey
      Parameters:
      localeCode - String der Sprachkey
    • countryLocaleCodeChanged

      public void countryLocaleCodeChanged(javax.faces.event.ValueChangeEvent e)
    • changeCountryLocaleCode

      public void changeCountryLocaleCode()
    • getZoneIdDisplayName

      public String getZoneIdDisplayName(String zoneId)
    • getZoneIdDisplayName

      public String getZoneIdDisplayName(ZoneId zoneId)
    • isZoneIdValid

      public boolean isZoneIdValid(String zoneId)
    • getDatePattern

      public String getDatePattern()
    • getTimePattern

      public String getTimePattern()
    • getDateTimePattern

      public String getDateTimePattern()
    • getMediumDateTimePattern

      public String getMediumDateTimePattern()
    • getMediumTimePattern

      public String getMediumTimePattern()
    • getLongDateTimePattern

      public String getLongDateTimePattern()
    • getLongDatePattern

      public String getLongDatePattern()
    • getLongTimePattern

      public String getLongTimePattern()
    • getCurrentDate

      public Date getCurrentDate()
    • getCurrentLocalDate

      public LocalDate getCurrentLocalDate()
    • getCurrentZoneId

      public ZoneId getCurrentZoneId()
    • getCurrentTimeZone

      public TimeZone getCurrentTimeZone()
    • getUtcZoneId

      public ZoneId getUtcZoneId()
    • getUtcTimeZone

      public TimeZone getUtcTimeZone()
    • getDateTimeSecondsPattern

      public String getDateTimeSecondsPattern()
    • getDateFormat

      public DateFormat getDateFormat()
    • getTimeFormat

      public DateFormat getTimeFormat()
    • getDateFormat

      public DateFormat getDateFormat(Locale locale)
    • getTimeFormat

      public DateFormat getTimeFormat(Locale locale)
    • getDateTimeFormat

      public DateFormat getDateTimeFormat()
    • getDateTimeFormat

      public DateFormat getDateTimeFormat(Locale locale)
    • getMediumDateTimeFormat

      public DateFormat getMediumDateTimeFormat()
    • getMediumTimeFormat

      public DateFormat getMediumTimeFormat()
    • getMediumDateTimeFormat

      public DateFormat getMediumDateTimeFormat(Locale locale)
    • getMediumTimeFormat

      public DateFormat getMediumTimeFormat(Locale locale)
    • getLongDateTimeFormat

      public DateFormat getLongDateTimeFormat()
    • getLongDateFormat

      public DateFormat getLongDateFormat()
    • getLongTimeFormat

      public DateFormat getLongTimeFormat()
    • getLongDateTimeFormat

      public DateFormat getLongDateTimeFormat(Locale locale)
    • getLongDateFormat

      public DateFormat getLongDateFormat(Locale locale)
    • getLongTimeFormat

      public DateFormat getLongTimeFormat(Locale locale)
    • getDateTimeSecondsFormat

      public DateFormat getDateTimeSecondsFormat()
    • getDateTimeSecondsFormat

      public DateFormat getDateTimeSecondsFormat(Locale locale)
    • getMediumDateTimeSecondsFormat

      public DateFormat getMediumDateTimeSecondsFormat()
    • getMediumDateTimeSecondsFormat

      public DateFormat getMediumDateTimeSecondsFormat(Locale locale)
    • getLongDateTimeSecondsFormat

      public DateFormat getLongDateTimeSecondsFormat()
    • getLongDateTimeSecondsFormat

      public DateFormat getLongDateTimeSecondsFormat(Locale locale)
    • formatMessage

      public String formatMessage(String i18nKey, Object... params)
      Retrieves the localized message for the given key, and formats that message with the given parameters. The placeholders of the form {0}, {1} etc. in the message are replaced with the first, seconds etc. given parameter.
      Parameters:
      i18nKey - Key for the localized message.
      params - Optional parameters. Placeholders are replaced with these parameters.
      Returns:
      The message for the given key, formatted with the given parameters.
    • formatText

      public String formatText(String text, Object... params)
    • formatMessage

      public String formatMessage(Locale locale, String i18nKey, Object... params)
    • formatDate

      public String formatDate(Date date)
    • formatDate

      public String formatDate(Date date, int dateStyle)
    • formatDateTime

      public String formatDateTime(Date date, int dateStyle, int timeStyle)
    • formatDate

      public String formatDate(LocalDate date, FormatStyle dateStyle)
    • formatUtcDateTime

      public String formatUtcDateTime(LocalDateTime date, FormatStyle dateStyle, FormatStyle timeStyle)
    • formatDate

      public String formatDate(Locale locale, Date date)
    • formatDateTime

      public String formatDateTime(Date date)
    • formatDateTime

      public String formatDateTime(Locale locale, Date date)
    • formatMediumDateTime

      public String formatMediumDateTime(Date date)
    • formatMediumDateTime

      public String formatMediumDateTime(Locale locale, Date date)
    • formatLongDateTime

      public String formatLongDateTime(Date date)
    • formatLongDateTime

      public String formatLongDateTime(Locale locale, Date date)
    • formatDateTimeSeconds

      public String formatDateTimeSeconds(Date date)
    • formatDateTimeSeconds

      public String formatDateTimeSeconds(Locale locale, Date date)
    • formatMediumDateTimeSeconds

      public String formatMediumDateTimeSeconds(Date date)
    • formatMediumDateTimeSeconds

      public String formatMediumDateTimeSeconds(Locale locale, Date date)
    • formatLongDateTimeSeconds

      public String formatLongDateTimeSeconds(Date date)
    • formatLongDateTimeSeconds

      public String formatLongDateTimeSeconds(Locale locale, Date date)
    • getINamedUiElementDisplayName

      public String getINamedUiElementDisplayName(Class<? extends INamedUiElement> clazz)
    • getINamedUiElementDisplayName

      public String getINamedUiElementDisplayName(Locale locale, Class<? extends INamedUiElement> clazz)
    • getINamedUiElementDisplayName

      public String getINamedUiElementDisplayName(INamedUiElement element)
    • getINamedUiElementDisplayName

      public String getINamedUiElementDisplayName(Locale locale, INamedUiElement element)