org.chwf.i18n
Class UserLocale

java.lang.Object
  |
  +--org.chwf.i18n.UserLocale

public abstract class UserLocale
extends java.lang.Object

A class for storing and retrieving the user's locale in the UserRegistry.

Author:
Paul Strack

Field Summary
static java.util.Locale DEFAULT_LOCALE
          The default locale (the system default).
 
Constructor Summary
UserLocale()
           
 
Method Summary
static java.util.Locale getLocale()
          Get locale.
static void setLocale(java.util.Locale locale)
          Set the user's locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LOCALE

public static final java.util.Locale DEFAULT_LOCALE
The default locale (the system default).
Constructor Detail

UserLocale

public UserLocale()
Method Detail

getLocale

public static java.util.Locale getLocale()
Get locale. If none is specified, use the DEFAULT_LOCALE.

Returns:
The locale.

setLocale

public static void setLocale(java.util.Locale locale)
                      throws RegistryException
Set the user's locale.

Parameters:
locale - The locale.
Throws:
RegistryException - If the user registry is not initialized.


Copyright © 2002-2004, Paul Strack. All Rights Reserved.