lumis.util
Class LocaleUtil

Package class diagram package LocaleUtil
java.lang.Object
  extended by lumis.util.LocaleUtil

@StableMinor(version="5.5",
             sinceVersion="4.0")
public abstract class LocaleUtil
extends Object

Utility class for Locale related operations

Since:
4.0.0

Field Summary
static String LOCALE_ATTRIBUTE_NAME
           
 
Constructor Summary
LocaleUtil()
           
 
Method Summary
static Locale fromRequest(HttpServletRequest request)
           
static Locale FromString(String locale)
           
static Locale fromXMLLang(String xmlLang)
          Returns the locale corresponding to a String following XML lang syntax (e.g.: en-US).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALE_ATTRIBUTE_NAME

public static final String LOCALE_ATTRIBUTE_NAME
See Also:
Constant Field Values
Constructor Detail

LocaleUtil

public LocaleUtil()
Method Detail

FromString

public static Locale FromString(String locale)
                         throws PortalException
Throws:
PortalException

fromXMLLang

public static Locale fromXMLLang(String xmlLang)
Returns the locale corresponding to a String following XML lang syntax (e.g.: en-US).

Parameters:
xmlLang - the XML lang value, according to the RFC3066.
Returns:
the locale.
Throws:
IllegalArgumentException - if xmlLang is null or is an invalid locale identifier.
Since:
5.5.0

fromRequest

public static Locale fromRequest(HttpServletRequest request)
                          throws PortalException
Throws:
PortalException


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.