| java.lang.Object org.opencms.i18n.CmsMessages org.opencms.i18n.CmsMultiMessages
All known Subclasses: org.opencms.workplace.CmsWorkplaceMessages,
CmsMultiMessages | public class CmsMultiMessages extends CmsMessages (Code) | | Provides access to the localized messages for several resource bundles simultaneously.
Messages are cached for faster lookup. If a localized key is contained in more then one resource bundle,
it will be used only from the resource bundle where it was first found in. The resource bundle order is undefined. It is therefore
recommended to ensure the uniqueness of all module keys by placing a special prefix in front of all keys of a resource bundle.
author: Alexander Kandzior author: Michael Moossen version: $Revision: 1.18 $ since: 6.0.0 |
MULTI_BUNDLE_NAME | final public static String MULTI_BUNDLE_NAME(Code) | | Constant for the multi bundle name.
|
NULL_STRING | final public static String NULL_STRING(Code) | | Null String value for caching of null message results.
|
CmsMultiMessages | public CmsMultiMessages(Locale locale)(Code) | | Constructor for creating a new messages object initialized with the given locale.
Parameters: locale - the locale to use for localization of the messages |
addBundle | public void addBundle(I_CmsMessageBundle bundle)(Code) | | Adds a bundle instance to this multi message bundle.
The added bundle will be localized with the locale of this multi message bundle.
Parameters: bundle - the bundle instance to add |
addMessages | public void addMessages(CmsMessages messages) throws CmsIllegalArgumentException(Code) | | Adds a messages instance to this multi message bundle.
The messages instance should have been initialized with the same locale as this multi bundle,
if not, the locale of the messages instance is automatically replaced. However, this will not work
if the added messages instance is in face also of type
CmsMultiMessages .
Parameters: messages - the messages instance to add throws: CmsIllegalArgumentException - if the locale of the given CmsMultiMessages does not match the locale of this multi messages |
addMessages | public void addMessages(List messages)(Code) | | Adds a list a messages instances to this multi message bundle.
Parameters: messages - the messages instance to add |
getMessages | public List getMessages()(Code) | | Returns the list of all individual message objects in this multi message instance.
the list of all individual message objects in this multi message instance |
Methods inherited from org.opencms.i18n.CmsMessages | public boolean equals(Object obj)(Code)(Java Doc) public static String formatUnknownKey(String keyName)(Code)(Java Doc) protected String getBundleName()(Code)(Java Doc) public String getDate(Date date)(Code)(Java Doc) public String getDate(Date date, int format)(Code)(Java Doc) public String getDate(long time)(Code)(Java Doc) public String getDateTime(Date date)(Code)(Java Doc) public String getDateTime(Date date, int format)(Code)(Java Doc) public String getDateTime(long time)(Code)(Java Doc) public Locale getLocale()(Code)(Java Doc) public ResourceBundle getResourceBundle()(Code)(Java Doc) public String getString(String keyName) throws CmsMessageException(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public boolean isInitialized()(Code)(Java Doc) public static boolean isUnknownKey(String value)(Code)(Java Doc) public String key(String keyName)(Code)(Java Doc) public String key(String keyName, boolean allowNull)(Code)(Java Doc) public String key(String key, Object arg0)(Code)(Java Doc) public String key(String key, Object arg0, Object arg1)(Code)(Java Doc) public String key(String key, Object arg0, Object arg1, Object arg2)(Code)(Java Doc) public String key(String key, Object[] args)(Code)(Java Doc) public String keyDefault(String keyName, String defaultValue)(Code)(Java Doc) public String keyWithParams(String keyName)(Code)(Java Doc) protected void setBundleName(String bundleName)(Code)(Java Doc) protected void setLocale(Locale locale)(Code)(Java Doc) protected void setResourceBundle(ResourceBundle resourceBundle)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|