public abstract class BasicNlsMessage extends AbstractNlsMessage
NlsMessage
with the basic features. NlsMessage
.Modifier and Type | Field and Description |
---|---|
private Map<String,Object> |
arguments |
private String |
message |
private static long |
serialVersionUID
UID for serialization.
|
private NlsTemplate |
template
The
message as NlsTemplate . |
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 |
BasicNlsMessage()
The constructor for de-serialization in GWT.
|
|
BasicNlsMessage(NlsTemplate template,
Map<String,Object> messageArguments)
The constructor.
|
private |
BasicNlsMessage(NlsTemplate template,
String internationalizedMessage,
Map<String,Object> messageArguments)
The constructor.
|
|
BasicNlsMessage(String internationalizedMessage,
Map<String,Object> messageArguments)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
getArgument(String key)
This method gets the language independent argument for the given
key . |
protected Map<String,Object> |
getArguments()
This method gets the message
arguments . |
String |
getInternationalizedMessage()
This method gets the internationalized message that can be
translated to a native language. |
NlsTemplate |
getTemplate()
This method gets the
NlsTemplate of this message. |
NlsTemplate |
getTemplate(NlsTemplateResolver resolver)
This method gets the
NlsTemplate of this message. |
getArgument, getArgumentCount, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getMessage, toNlsMessage, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLocalizedMessage
private static final long serialVersionUID
private NlsTemplate template
message
as NlsTemplate
.private String message
getInternationalizedMessage()
private Map<String,Object> arguments
getArgument(String)
protected BasicNlsMessage()
public BasicNlsMessage(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 BasicNlsMessage(String internationalizedMessage, Map<String,Object> messageArguments)
internationalizedMessage
- is the internationalized message
.messageArguments
- are the arguments
filled into the message after
nationalization.private BasicNlsMessage(NlsTemplate template, String internationalizedMessage, Map<String,Object> messageArguments)
template
- is the NlsTemplate
for the raw message
.internationalizedMessage
- is the internationalized message
.messageArguments
- are the arguments
filled into the message after
nationalization.public Object getArgument(String key)
key
.key
- is the name of the requested argument.null
if NOT defined.public String getInternationalizedMessage()
translated
to a native language. The language
independent arguments are filled into the message after the translation process. "Welcome {name}!"
and there is one argument that is the string
"Joelle"
. The final result will then be "Welcome Joelle!"
. If the message is
translated to German as "Willkommen {name}!"
the final result will be
"Willkommen Joelle!"
.NlsMessage
,
NlsMessage.getArgument(String)
,
MessageFormat
protected final Map<String,Object> getArguments()
arguments
.Map
with the arguments.public NlsTemplate getTemplate()
NlsTemplate
of this message.NlsTemplate
or null
if NOT yet
resolved
.public NlsTemplate getTemplate(NlsTemplateResolver resolver)
NlsTemplate
of this message.resolver
- is the NlsTemplateResolver
used to
resolve
the NlsTemplate
if NOT yet
available.NlsTemplate
.Copyright © 2001–2014 mmm-Team. All rights reserved.