wt.util
Class LocalizableMessageCollection
java.lang.Object
wt.util.LocalizableMessageCollection
- All Implemented Interfaces:
- LocalizableMessage, Message, Serializable
- public class LocalizableMessageCollection
- extends Object
- implements LocalizableMessage, Serializable
LocalizableMessageCollection
is an implementation of the
LocalizableMessage
interface that represents a collection
of LocalizableMessage objects to be used as a text insert parameter in
a WTMessage
. The getLocalizedMessage(Locale)
method returns a string containing the localized messages for each object
in the collection (for example, a collection of EnumeratedType
objects).
Supported API: false
Extendable: false
- See Also:
EnumeratedType
,
LocalizableMessage
,
WTMessage
,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESOURCE
private static final String RESOURCE
- See Also:
- Constant Field Values
CLASSNAME
private static final String CLASSNAME
collection
private ArrayList collection
separatorResource
private String separatorResource
separatorKey
private String separatorKey
LocalizableMessageCollection
public LocalizableMessageCollection(Collection collection)
throws WTInvalidParameterException
- Constructs a message containing a collection of
LocalizableMessage
objects. The localized messages for each object in the collection
are combined into a string, with values separated by a default list
separator.
Supported API: false
- Parameters:
collection
- a collection of LocalizableMessage objects
- Throws:
WTInvalidParameterException
LocalizableMessageCollection
public LocalizableMessageCollection(Collection collection,
String rb,
String key)
throws WTInvalidParameterException
- Constructs a message containing a collection of
LocalizableMessage
objects. The localized messages for each object in the collection
are combined into a string, with values separated by the list separator
identified by the specified resource bundle name and key.
Supported API: false
- Parameters:
collection
- a collection of LocalizableMessage objectsrb
- the name of the resource bundle containing the localizable message for the list separatorkey
- the key associated with the localizable message for the list separator
- Throws:
WTInvalidParameterException
getLocalizedMessage
public String getLocalizedMessage(Locale locale)
- Obtain a message, localized to the specified locale.
Supported API: false
- Specified by:
getLocalizedMessage
in interface LocalizableMessage
- Parameters:
locale
-
- Returns:
- String
validateCollection
private void validateCollection(Collection collection)
throws WTInvalidParameterException
- Throws:
WTInvalidParameterException