org.opencms.i18n
Class A_CmsMessageBundle

java.lang.Object
  extended by org.opencms.i18n.A_CmsMessageBundle
All Implemented Interfaces:
I_CmsMessageBundle

public abstract class A_CmsMessageBundle
extends java.lang.Object
implements I_CmsMessageBundle

Convenience base class to access the localized messages of an OpenCms package.

Since:
6.0.0
Version:
$Revision: 1.60 $
Author:
Alexander Kandzior

Constructor Summary
A_CmsMessageBundle()
           
 
Method Summary
 CmsMessageContainer container(java.lang.String key)
          Creates a message container for this package with the given arguments.
 CmsMessageContainer container(java.lang.String key, java.lang.Object arg0)
          Creates a message container for this package with the given arguments.
 CmsMessageContainer container(java.lang.String message, java.lang.Object[] args)
          Creates a message container for this package with the given arguments.
 CmsMessageContainer container(java.lang.String key, java.lang.Object arg0, java.lang.Object arg1)
          Creates a message container for this package with the given arguments.
 CmsMessageContainer container(java.lang.String key, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
          Creates a message container for this package with the given arguments.
 CmsMessages getBundle()
          Returns the localized message bundle wrapped in this instance initialized with the OpenCms default locale.
 CmsMessages getBundle(java.util.Locale locale)
          Returns the localized message bundle wrapped in this instance initialized with the provided locale.
static I_CmsMessageBundle[] getOpenCmsMessageBundles()
          Returns an array of all messages bundles used by the OpenCms core.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opencms.i18n.I_CmsMessageBundle
getBundleName
 

Constructor Detail

A_CmsMessageBundle

public A_CmsMessageBundle()
Method Detail

getOpenCmsMessageBundles

public static I_CmsMessageBundle[] getOpenCmsMessageBundles()
Returns an array of all messages bundles used by the OpenCms core.

Returns:
an array of all messages bundles used by the OpenCms core

container

public CmsMessageContainer container(java.lang.String key)
Description copied from interface: I_CmsMessageBundle
Creates a message container for this package with the given arguments.

Convenience method for a message with no arguments.

Specified by:
container in interface I_CmsMessageBundle
Parameters:
key - the message key to use
Returns:
a message container for this package with the given arguments
See Also:
I_CmsMessageBundle.container(java.lang.String)

container

public CmsMessageContainer container(java.lang.String key,
                                     java.lang.Object arg0)
Description copied from interface: I_CmsMessageBundle
Creates a message container for this package with the given arguments.

Convenience method for a message with one argument.

Specified by:
container in interface I_CmsMessageBundle
Parameters:
key - the message key to use
arg0 - the message argument
Returns:
a message container for this package with the given arguments
See Also:
I_CmsMessageBundle.container(java.lang.String, java.lang.Object)

container

public CmsMessageContainer container(java.lang.String key,
                                     java.lang.Object arg0,
                                     java.lang.Object arg1)
Description copied from interface: I_CmsMessageBundle
Creates a message container for this package with the given arguments.

Convenience method for a message with two arguments.

Specified by:
container in interface I_CmsMessageBundle
Parameters:
key - the message key to use
arg0 - the first message argument
arg1 - the second message argument
Returns:
a message container for this package with the given arguments
See Also:
I_CmsMessageBundle.container(java.lang.String, java.lang.Object, java.lang.Object)

container

public CmsMessageContainer container(java.lang.String key,
                                     java.lang.Object arg0,
                                     java.lang.Object arg1,
                                     java.lang.Object arg2)
Description copied from interface: I_CmsMessageBundle
Creates a message container for this package with the given arguments.

Convenience method for a message with three arguments.

Specified by:
container in interface I_CmsMessageBundle
Parameters:
key - the message key to use
arg0 - the first message argument
arg1 - the second message argument
arg2 - the third message argument
Returns:
a message container for this package with the given arguments
See Also:
I_CmsMessageBundle.container(java.lang.String, java.lang.Object, java.lang.Object, java.lang.Object)

container

public CmsMessageContainer container(java.lang.String message,
                                     java.lang.Object[] args)
Description copied from interface: I_CmsMessageBundle
Creates a message container for this package with the given arguments.

Specified by:
container in interface I_CmsMessageBundle
Parameters:
message - the message key to use
args - the message arguments to use
Returns:
a message container for this package with the given arguments
See Also:
I_CmsMessageBundle.container(java.lang.String, java.lang.Object[])

getBundle

public CmsMessages getBundle()
Description copied from interface: I_CmsMessageBundle
Returns the localized message bundle wrapped in this instance initialized with the OpenCms default locale.

This should be used only for logging and system output, not for generating GUI messages that the user can see. In this case, use I_CmsMessageBundle.getBundle(Locale).

Specified by:
getBundle in interface I_CmsMessageBundle
Returns:
the localized message bundle wrapped in this instance initialized with the OpenCms default locale
See Also:
I_CmsMessageBundle.getBundle()

getBundle

public CmsMessages getBundle(java.util.Locale locale)
Description copied from interface: I_CmsMessageBundle
Returns the localized message bundle wrapped in this instance initialized with the provided locale.

Specified by:
getBundle in interface I_CmsMessageBundle
Parameters:
locale - the locale to use
Returns:
the localized message bundle wrapped in this instance initialized with the provided locale
See Also:
I_CmsMessageBundle.getBundle(java.util.Locale)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()