org.apache.myfaces.trinidad.context
Class LocaleContext

java.lang.Object
  extended by org.apache.myfaces.trinidad.context.LocaleContext

public abstract class LocaleContext
extends Object

Context for locale-specific operations and properties available during rendering.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/share/nls/LocaleContext.java#0 $) $Date: 10-nov-2005.19:00:03 $

Constructor Summary
protected LocaleContext()
           
 
Method Summary
abstract  ResourceBundle getBundle(String baseBundleName)
          Returns the resource bundle with the specified name, for this translation locale.
abstract  char getDecimalSeparator()
          Returns the character used as a decimal separator.
abstract  String getFormattingIANALocaleString()
          Returns the formatting Locale in IANA String format.
abstract  Locale getFormattingLocale()
          Returns the locale that should be used for formatting.
abstract  char getGroupingSeparator()
          Returns the character used to separate number groups.
 String getIANALocaleString()
          Deprecated. use getFormattingIANALocaleString()
 Locale getLocale()
          Deprecated. use getFormattingLocale()
abstract  TimeZone getTimeZone()
          Returns the TimeZone of the application, as specified in trinidad-config.xml.
abstract  String getTranslationIANALocaleString()
          Returns the translation Locale in IANA String format.
abstract  Locale getTranslationLocale()
          Returns the locale that should be used for translations..
abstract  int getTwoDigitYearStart()
          Returns the year offset for parsing years with only two digits.
abstract  boolean isRightToLeft()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleContext

protected LocaleContext()
Method Detail

getFormattingLocale

public abstract Locale getFormattingLocale()
Returns the locale that should be used for formatting.


getFormattingIANALocaleString

public abstract String getFormattingIANALocaleString()
Returns the formatting Locale in IANA String format.


getLocale

@Deprecated
public Locale getLocale()
Deprecated. use getFormattingLocale()

Returns the locale that should be used for formatting.


getIANALocaleString

@Deprecated
public String getIANALocaleString()
Deprecated. use getFormattingIANALocaleString()

Returns the Locale in IANA String format.


getTranslationLocale

public abstract Locale getTranslationLocale()
Returns the locale that should be used for translations..


getTranslationIANALocaleString

public abstract String getTranslationIANALocaleString()
Returns the translation Locale in IANA String format.


isRightToLeft

public abstract boolean isRightToLeft()

getTimeZone

public abstract TimeZone getTimeZone()
Returns the TimeZone of the application, as specified in trinidad-config.xml. If unspecified, defaults to the server timezone.


getBundle

public abstract ResourceBundle getBundle(String baseBundleName)
                                  throws MissingResourceException
Returns the resource bundle with the specified name, for this translation locale.

As the LocaleContext maintains a cache of found ResourceBundles, this is much faster than using ResourceBundle.getBundle

Throws:
MissingResourceException
See Also:
ResourceBundle.getBundle(java.lang.String)

getTwoDigitYearStart

public abstract int getTwoDigitYearStart()
Returns the year offset for parsing years with only two digits.


getGroupingSeparator

public abstract char getGroupingSeparator()
Returns the character used to separate number groups. If zero (NUL), the default separator for the Locale will be used.


getDecimalSeparator

public abstract char getDecimalSeparator()
Returns the character used as a decimal separator. If zero (NUL), the default separator for the Locale will be used.



Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.