public abstract class AbstractNlsTemplate extends AbstractLoggableObject implements NlsTemplate
NlsTemplate interface.| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
AbstractNlsTemplate()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected NlsMessageFormatter |
createFormatter(String messageTemplate,
Locale locale,
NlsDependencies nlsDependencies)
|
boolean |
translate(Locale locale,
Map<String,Object> arguments,
Appendable buffer,
NlsTemplateResolver resolver,
NlsDependencies nlsDependencies)
This method behaves like
NlsTemplate.translate(Locale) but additionally fills the given arguments into the
translated message writing into the given buffer. |
getLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittranslateprivate static final long serialVersionUID
protected NlsMessageFormatter createFormatter(String messageTemplate, Locale locale, NlsDependencies nlsDependencies)
messageTemplate - is the template of the message for the given locale.locale - is the locale to use. The implementation may ignore it here because it is also supplied to
format. Anyhow
it allows the implementation to do smart caching of the parsed formatter in association with the locale.nlsDependencies - are the NlsDependencies.public boolean translate(Locale locale, Map<String,Object> arguments, Appendable buffer, NlsTemplateResolver resolver, NlsDependencies nlsDependencies) throws IOException
NlsTemplateNlsTemplate.translate(Locale) but additionally fills the given arguments into the
translated message writing into the given buffer.translate in interface NlsTemplatelocale - is the locale to translate to.arguments - are the variable arguments to fill in the message.buffer - is the buffer where the translation will be appended to.resolver - is the NlsTemplateResolver.nlsDependencies - are the NlsDependencies.true if the (translated) message has been appended to the given messageBuffer or
false if the translation failed.IOException - if the given Appendable caused such exception.Copyright © 2001–2016 mmm-Team. All rights reserved.