|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.i18n.CmsMessageContainer
public class CmsMessageContainer
Contains a localized message key, it's arguments and a
.I_CmsMessageBundle
Used for delaying the actual message lookup from the bundle to the time the message is displayed, not generated. This is used for localizing internal OpenCms messages. If a message is generated internally by OpenCms, at the time no information about the context of the current user may be available. The message is therefore passed to the class generating the output, where a user context usually exists. Finally, the message is rendered with the locale of the available user, or the OpenCms default locale if no user is available.
I_CmsMessageBundle
,
Serialized FormField Summary | |
---|---|
protected java.lang.Object[] |
m_args
The message arguments to use. |
protected I_CmsMessageBundle |
m_bundle
The OpenCms message bundle to read the message from. |
protected java.lang.String |
m_key
The message key to use. |
Constructor Summary | |
---|---|
CmsMessageContainer(I_CmsMessageBundle bundle,
java.lang.String key)
Creates a new message container for a key without arguments. |
|
CmsMessageContainer(I_CmsMessageBundle bundle,
java.lang.String key,
java.lang.Object[] args)
Creates a new message container. |
Method Summary | |
---|---|
java.lang.Object[] |
getArgs()
Returns the message arguments to use. |
I_CmsMessageBundle |
getBundle()
Returns the message bundle used by this container. |
java.lang.String |
getKey()
Returns the message key to use. |
java.lang.String |
key()
Returns the localized message described by this container for the OpenCms default locale. |
java.lang.String |
key(java.util.Locale locale)
Returns the localized message described by this container for the given locale. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.Object[] m_args
protected I_CmsMessageBundle m_bundle
protected java.lang.String m_key
Constructor Detail |
---|
public CmsMessageContainer(I_CmsMessageBundle bundle, java.lang.String key)
bundle
- the OpenCms message bundle to read the message fromkey
- the message key to usepublic CmsMessageContainer(I_CmsMessageBundle bundle, java.lang.String key, java.lang.Object[] args)
bundle
- the OpenCms message bundle to read the message fromkey
- the message key to useargs
- the message arguments to useMethod Detail |
---|
public java.lang.Object[] getArgs()
public I_CmsMessageBundle getBundle()
public java.lang.String getKey()
public java.lang.String key()
public java.lang.String key(java.util.Locale locale)
locale
- the locale to use
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |