Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tiles.locale.impl
Class DefaultLocaleResolver

    java.lang.Object
      org.apache.tiles.locale.impl.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: 637434 $ $Date: 2008-03-15 16:48:38 +0100 (sab, 15 mar 2008) $

Field Summary
`static java.lang.String` | `LOCALE_KEY` The attribute name that is used to store the current locale.

Constructor Summary
`DefaultLocaleResolver()`

Method Summary
`void` | `init(java.util.Map<java.lang.String,java.lang.String> params)` Initializes the `LocaleResolver` object.
`java.util.Locale` | `resolveLocale(TilesRequestContext 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

### init

    public void init(java.util.Map<java.lang.String,java.lang.String> params)

  Initializes the `LocaleResolver` object.

  This method must be called before the `LocaleResolver.resolveLocale(TilesRequestContext)` method is called.

  Specified by:
    `init` in interface `LocaleResolver`
  Parameters:
    `params` - A map of properties used to set up the resolver.

### resolveLocale

    public java.util.Locale resolveLocale(TilesRequestContext request)

  Resolves the locale.

  Specified by:
    `resolveLocale` in interface `LocaleResolver`
  Parameters:
    `request` - The Tiles request object.
  Returns:
    The current locale for the current request.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.