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 |
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 value for the given
key . |
protected Map<String,Object> |
getArguments()
This method gets the message
arguments . |
String |
getInternationalizedMessage()
This method gets the internationalized message what is the actual message template for the
root
locale without resolving its NlsArgument s. |
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
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)
NlsMessage
key
.key
- is the name of the requested argument.null
if NOT defined.NlsArgument
public String getInternationalizedMessage()
NlsMessage
root
locale
without resolving its NlsArgument
s."Welcome {name}!"
).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–2016 mmm-Team. All rights reserved.