lumis.util
Class LocaleUtil

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

@StableMinor(version="6.1",
             sinceVersion="4.0")
public abstract class LocaleUtil
extends java.lang.Object

Utility class for Locale related operations

Since:
4.0.0

Field Summary
static java.lang.String LOCALE_ATTRIBUTE_NAME
           
 
Constructor Summary
LocaleUtil()
           
 
Method Summary
static java.util.Locale fromRequest(javax.servlet.http.HttpServletRequest request)
           
static java.util.Locale FromString(java.lang.String locale)
           
static java.util.Locale fromXMLLang(java.lang.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 java.lang.String LOCALE_ATTRIBUTE_NAME
See Also:
Constant Field Values
Constructor Detail

LocaleUtil

public LocaleUtil()
Method Detail

FromString

public static java.util.Locale FromString(java.lang.String locale)
                                   throws PortalException
Throws:
PortalException

fromXMLLang

public static java.util.Locale fromXMLLang(java.lang.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:
java.lang.IllegalArgumentException - if xmlLang is null or is an invalid locale identifier.
Since:
5.5.0

fromRequest

public static java.util.Locale fromRequest(javax.servlet.http.HttpServletRequest request)
                                    throws PortalException
Throws:
PortalException


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