Class DefaultLocaleResolver

  • All Implemented Interfaces:
    LocaleResolver

    public class DefaultLocaleResolver
    extends java.lang.Object
    implements LocaleResolver
    Default implementation of LocaleResolver
    It tries to take the locale from the session-scoped attribute LOCALE_KEY. If it is not found, it returns the locale included in the request.
    Version:
    $Rev: 887725 $ $Date: 2009-12-07 05:02:10 +1100 (Mon, 07 Dec 2009) $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String LOCALE_KEY
      The attribute name that is used to store the current locale.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Locale resolveLocale​(org.apache.tiles.request.Request request)
      Resolves the locale.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOCALE_KEY

        public static final java.lang.String LOCALE_KEY
        The attribute name that is used to store the current locale.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultLocaleResolver

        public DefaultLocaleResolver()
    • Method Detail

      • resolveLocale

        public java.util.Locale resolveLocale​(org.apache.tiles.request.Request request)
        Resolves the locale.
        Specified by:
        resolveLocale in interface LocaleResolver
        Parameters:
        request - The Tiles request object.
        Returns:
        The current locale for the current request.