org.opencms.i18n
Class CmsMultiMessageBundle

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

public class CmsMultiMessageBundle
extends A_CmsMessageBundle

Provides access to the localized messages for several message bundles simultaneously.

Since:
6.0.0
Version:
$Revision: 1.5 $
Author:
Michael Moossen

Constructor Summary
CmsMultiMessageBundle(I_CmsMessageBundle[] messages)
          Constructor for creating a new message bundle object initialized with the provided array of message bundles.
CmsMultiMessageBundle(I_CmsMessageBundle message1, I_CmsMessageBundle message2)
          Constructor for creating a new message bundle object initialized with the provided message bundles.
CmsMultiMessageBundle(List messages)
          Constructor for creating a new message bundle object initialized with the provided list of message bundles.
 
Method Summary
 CmsMessages getBundle(Locale locale)
          Returns the localized message bundle wrapped in this instance initialized with the provided locale.
 String getBundleName()
          Returns the bundle name for this OpenCms package.
 
Methods inherited from class org.opencms.i18n.A_CmsMessageBundle
container, container, container, container, container, getBundle, getOpenCmsMessageBundles, key, key, key, key, key, key, key, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsMultiMessageBundle

public CmsMultiMessageBundle(I_CmsMessageBundle message1,
                             I_CmsMessageBundle message2)
Constructor for creating a new message bundle object initialized with the provided message bundles.

Parameters:
message1 - a message bundle
message2 - another message bundle

CmsMultiMessageBundle

public CmsMultiMessageBundle(I_CmsMessageBundle[] messages)
Constructor for creating a new message bundle object initialized with the provided array of message bundles.

Parameters:
messages - array of I_CmsMessageBundles, should not be null or empty

CmsMultiMessageBundle

public CmsMultiMessageBundle(List messages)
Constructor for creating a new message bundle object initialized with the provided list of message bundles.

Parameters:
messages - list of I_CmsMessageBundles, should not be null or empty
Method Detail

getBundle

public CmsMessages getBundle(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
Overrides:
getBundle in class A_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)

getBundleName

public String getBundleName()
Description copied from interface: I_CmsMessageBundle
Returns the bundle name for this OpenCms package.

Returns:
the bundle name for this OpenCms package
See Also:
I_CmsMessageBundle.getBundleName()