info.magnolia.cms.i18n
Class MessagesUtil
java.lang.Object
info.magnolia.cms.i18n.MessagesUtil
public class MessagesUtil
- extends java.lang.Object
Util for handle messages. Allows easy use of chains and provides methods for rendering the javascript messages.
- Version:
- $Revision: 41137 $ ($Author: gjoseph $)
- Author:
- Philipp Bracher
Method Summary |
static Messages |
chain(Messages msgs1,
Messages msgs2)
|
static Messages |
chain(Messages msgs1,
java.lang.String basename)
|
static Messages |
chain(java.lang.String[] basenames)
|
static Messages |
chain(java.lang.String basename,
Messages msgs2)
|
static Messages |
chainWithDefault(java.lang.String basename)
|
static java.lang.String |
generateJavaScript(Messages messages)
Deprecated. since 4.0, use generateJavaScript(Writer out, Messages messages) instead. |
static void |
generateJavaScript(java.io.Writer out,
Messages messages)
Adds Variables to a JS which can be used with the getMessage(key) method. |
static java.lang.String |
get(java.lang.String key)
|
static java.lang.String |
get(java.lang.String key,
java.lang.String basename)
|
static java.lang.String |
get(java.lang.String key,
java.lang.String[] args)
|
static java.lang.String |
get(java.lang.String key,
java.lang.String basename,
java.lang.String[] args)
|
static java.lang.String |
getChained(java.lang.String key,
java.lang.String[] basenames)
|
static java.lang.String |
getChained(java.lang.String key,
java.lang.String[] basenames,
java.lang.String[] args)
|
static java.lang.String |
getChainedWithDefault(java.lang.String key,
java.lang.String dflt,
java.lang.String[] basenames)
|
static java.lang.String |
getChainedWithDefault(java.lang.String key,
java.lang.String dflt,
java.lang.String[] basenames,
java.lang.String[] args)
|
static java.lang.String |
getWithDefault(java.lang.String key,
java.lang.String dflt)
|
static java.lang.String |
getWithDefault(java.lang.String key,
java.lang.String dflt,
java.lang.String basename)
|
static java.lang.String |
getWithDefault(java.lang.String key,
java.lang.String dflt,
java.lang.String[] args)
|
static java.lang.String |
getWithDefault(java.lang.String key,
java.lang.String dflt,
java.lang.String basename,
java.lang.String[] args)
|
static java.lang.String |
javaScriptString(java.lang.String msg)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessagesUtil
public MessagesUtil()
generateJavaScript
public static java.lang.String generateJavaScript(Messages messages)
- Deprecated. since 4.0, use generateJavaScript(Writer out, Messages messages) instead.
generateJavaScript
public static void generateJavaScript(java.io.Writer out,
Messages messages)
throws java.io.IOException
- Adds Variables to a JS which can be used with the getMessage(key) method.
- Throws:
java.io.IOException
chain
public static Messages chain(Messages msgs1,
Messages msgs2)
chain
public static Messages chain(java.lang.String[] basenames)
chain
public static Messages chain(Messages msgs1,
java.lang.String basename)
chain
public static Messages chain(java.lang.String basename,
Messages msgs2)
chainWithDefault
public static Messages chainWithDefault(java.lang.String basename)
javaScriptString
public static java.lang.String javaScriptString(java.lang.String msg)
get
public static java.lang.String get(java.lang.String key)
get
public static java.lang.String get(java.lang.String key,
java.lang.String[] args)
getWithDefault
public static java.lang.String getWithDefault(java.lang.String key,
java.lang.String dflt)
getWithDefault
public static java.lang.String getWithDefault(java.lang.String key,
java.lang.String dflt,
java.lang.String[] args)
get
public static java.lang.String get(java.lang.String key,
java.lang.String basename)
get
public static java.lang.String get(java.lang.String key,
java.lang.String basename,
java.lang.String[] args)
getWithDefault
public static java.lang.String getWithDefault(java.lang.String key,
java.lang.String dflt,
java.lang.String basename)
getWithDefault
public static java.lang.String getWithDefault(java.lang.String key,
java.lang.String dflt,
java.lang.String basename,
java.lang.String[] args)
getChained
public static java.lang.String getChained(java.lang.String key,
java.lang.String[] basenames)
getChained
public static java.lang.String getChained(java.lang.String key,
java.lang.String[] basenames,
java.lang.String[] args)
getChainedWithDefault
public static java.lang.String getChainedWithDefault(java.lang.String key,
java.lang.String dflt,
java.lang.String[] basenames)
getChainedWithDefault
public static java.lang.String getChainedWithDefault(java.lang.String key,
java.lang.String dflt,
java.lang.String[] basenames,
java.lang.String[] args)
Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.