org.loom.config
Interface LocaleResolver

All Known Implementing Classes:
CookieLocaleResolver, PrefixLocaleResolver

public interface LocaleResolver

Return the locale to use while handling a request object.


Method Summary
 java.util.Locale getLocale(javax.servlet.http.HttpServletRequest request)
          Extract the locale from the user request, null if it no serialized locale could be found.
 void setLocale(javax.servlet.http.HttpServletResponse response, java.util.Locale locale)
          Change the locale on the user request
 

Method Detail

getLocale

java.util.Locale getLocale(javax.servlet.http.HttpServletRequest request)
Extract the locale from the user request, null if it no serialized locale could be found. If null, the locale from the request instance will be used.

Parameters:
request - the current user request
Returns:
the locale to apply for this request

setLocale

void setLocale(javax.servlet.http.HttpServletResponse response,
               java.util.Locale locale)
Change the locale on the user request

Parameters:
response - the response to set the locale into
locale - the new Locale to apply
Throws:
java.lang.UnsupportedOperationException - if this LocaleResolver cannot set a new Locale value