public class MessageComposer extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOGGER
The Constant logger.
|
| Constructor and Description |
|---|
MessageComposer() |
| Modifier and Type | Method and Description |
|---|---|
static IMessageContentModel |
createMessageModel(Map<String,Object> contextModel,
String xmlMailTemplateName,
Locale locale)
Creates the message model.
|
static IMessageContentModel |
getEmailTemplate(String name)
Gets the email template as a Message Model that contains the velocity templates.
|
static String |
getXmlMailTemplateName(String xmlMailTemplateName,
Locale locale,
boolean withCountry)
Gets the xml mail template name from the given String and Locale.
|
public static IMessageContentModel createMessageModel(Map<String,Object> contextModel, String xmlMailTemplateName, Locale locale) throws IOException, org.apache.velocity.runtime.parser.ParseException, URISyntaxException
contextModel - the velocity context modelxmlMailTemplateName - the xml mail template namelocale - the localeIOException - Signals that an I/O exception has occurred.org.apache.velocity.runtime.parser.ParseException - the parse exceptionURISyntaxExceptionpublic static String getXmlMailTemplateName(String xmlMailTemplateName, Locale locale, boolean withCountry)
xmlMailTemplateName - the xml mail template namelocale - the localepublic static IMessageContentModel getEmailTemplate(String name) throws IOException, URISyntaxException
name - The resource name that represents an IMessageModel as an xml file.IOException - Signals that an I/O exception has occurred.URISyntaxExceptionCopyright © 2015. All rights reserved.