Version 4.10.0

hirondelle.web4j.request
Class LocaleSourceImpl

Object
  extended by hirondelle.web4j.request.LocaleSourceImpl
All Implemented Interfaces:
LocaleSource

public class LocaleSourceImpl
extends Object
implements LocaleSource

Retrieve the Locale stored in any scope under the key Controller.LOCALE.

Upon startup, the Controller will read in the DefaultLocale configured in web.xml, and place it in application scope under the key Controller.LOCALE, as a Locale object (not a String).

If desired, the application programmer can also store a user-specific Locale in session scope, under the same key. Thus, this class will first find the user-specific Locale, overriding the default Locale stored in application scope.

If any other behavior is desired, then simply provide an alternate implementation of LocaleSource.


Constructor Summary
LocaleSourceImpl()
           
 
Method Summary
 Locale get(HttpServletRequest aRequest)
          See class comment.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleSourceImpl

public LocaleSourceImpl()
Method Detail

get

public Locale get(HttpServletRequest aRequest)
See class comment.

Specified by:
get in interface LocaleSource

Version 4.10.0

Copyright Hirondelle Systems. Published October 19, 2013 - User Guide - All Docs.