public class NlsMessageImpl extends BasicNlsMessage
NlsMessage
.Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
LOCALE_ROOT
LOCALIZATION_FAILURE_PREFIX
KEY_ANNOTATION, KEY_ARGUMENT, KEY_CAPACITY, KEY_CONTAINER, KEY_DEFAULT, KEY_DIRECTORY, KEY_ERROR, KEY_EXISTING, KEY_EXPECTED, KEY_FILE, KEY_FUNCTION, KEY_ID, KEY_KEY, KEY_LOCATION, KEY_MAX, KEY_MIN, KEY_MODE, KEY_NAME, KEY_OBJECT, KEY_OPERAND, KEY_OPERATION, KEY_OPTION, KEY_PATH, KEY_PROPERTY, KEY_QUERY, KEY_RESOURCE, KEY_SIZE, KEY_SOURCE, KEY_TARGET_TYPE, KEY_TITLE, KEY_TYPE, KEY_URI, KEY_USER, KEY_VALUE
Modifier | Constructor and Description |
---|---|
protected |
NlsMessageImpl()
The constructor for de-serialization in GWT.
|
|
NlsMessageImpl(NlsTemplate template,
Map<String,Object> messageArguments)
The constructor.
|
|
NlsMessageImpl(String internationalizedMessage,
Map<String,Object> messageArguments)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
getLocalizedMessage(Locale locale,
NlsTemplateResolver resolver,
Appendable buffer)
This method writes the localized message to the given
buffer . |
NlsMessage |
toNlsMessage()
This method is the equivalent to
Object.toString() with native language support. |
String |
toString() |
getArgument, getArguments, getInternationalizedMessage, getTemplate, getTemplate
getArgument, getArgumentCount, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getMessage
private static final long serialVersionUID
protected NlsMessageImpl()
public NlsMessageImpl(NlsTemplate template, Map<String,Object> messageArguments)
template
- is the NlsTemplate
for the raw message
.messageArguments
- are the arguments
filled into the message after
nationalization.public void getLocalizedMessage(Locale locale, NlsTemplateResolver resolver, Appendable buffer)
NlsMessage
buffer
. template
that is provided via the given resolver
.
If this fails, the original message
will be used. After translation is done,
the language independent arguments will be filled in the translated message string according to the given
locale
.locale
- is the locale to translate to.resolver
- is used to resolve the template required to translate the internationalized message
.buffer
- is the buffer where to write the message to.public NlsMessage toNlsMessage()
NlsObject
Object.toString()
with native language support.toNlsMessage
in interface NlsObject
toNlsMessage
in class AbstractNlsMessage
public String toString()
toString
in class AbstractNlsMessage
Copyright © 2001–2016 mmm-Team. All rights reserved.