|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.webmacro.servlet.LocaleTool
Provide Template with access to Locales. Also gives access to the static fields e.g., Locale.US
Field Summary | |
static java.lang.String |
RCS
|
Constructor Summary | |
LocaleTool()
|
Method Summary | |
static java.util.Locale |
buildLocale(java.lang.String field)
access to the static members such as Locale.US, etc If that field doesn't exist try to construct a locale from a string so templates can have $Locale.en_GB. |
void |
destroy(java.lang.Object o)
At the end of processing this method will be called to return the object generated by init(), in case it needs to be recycled or otherwise cleaned up. |
java.lang.Object |
get(java.lang.String field)
access method used by $Locale.xxxxx => LocaleTool.get("xxxxx") |
java.util.Locale |
getDefault()
return the default locale for this JVM |
java.util.Locale |
getLocale(java.lang.String country)
wrappers around the 3 constructors for Locale |
java.util.Locale |
getLocale(java.lang.String country,
java.lang.String language)
|
java.util.Locale |
getLocale(java.lang.String country,
java.lang.String language,
java.lang.String variant)
|
java.lang.Object |
init(Context context)
A new tool object will be instantiated per-request by calling this method. |
void |
put(java.lang.String key,
java.lang.Object value)
Unsupported |
void |
remove(java.lang.String key)
Unsupported |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String RCS
Constructor Detail |
public LocaleTool()
Method Detail |
public java.lang.Object init(Context context) throws PropertyException
ContextTool
init
in interface ContextTool
PropertyException
public final java.util.Locale getDefault()
public final java.util.Locale getLocale(java.lang.String country)
public final java.util.Locale getLocale(java.lang.String country, java.lang.String language)
public final java.util.Locale getLocale(java.lang.String country, java.lang.String language, java.lang.String variant)
public final java.lang.Object get(java.lang.String field)
get
in interface Bag
public static final java.util.Locale buildLocale(java.lang.String field)
public final void put(java.lang.String key, java.lang.Object value) throws UnsettableException
put
in interface Bag
UnsettableException
public final void remove(java.lang.String key) throws UnsettableException
remove
in interface Bag
UnsettableException
public void destroy(java.lang.Object o)
ContextTool
destroy
in interface ContextTool
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |