public class Composer extends Object
Modifier and Type | Method and Description |
---|---|
FreemarkerEngine |
getEngine() |
Mailer |
getMailer() |
Mailer.Message |
newHtmlMessage(String templateContent,
Object ctx) |
Mailer.Message |
newHtmlMessage(URL template,
Object ctx) |
Mailer.Message |
newMessage() |
Mailer.Message |
newMixedMessage(String templateContent,
Object ctx,
String textType,
List<Blob> attachments) |
Mailer.Message |
newTextMessage(String templateContent,
Object ctx) |
Mailer.Message |
newTextMessage(URL template,
Object ctx) |
void |
registerTemplate(URL url) |
String |
render(String templateContent,
Object ctx) |
void |
render(String template,
Object ctx,
Writer writer) |
String |
render(URL template,
Object ctx) |
void |
render(URL template,
Object ctx,
Writer writer) |
void |
unregisterAllTemplates() |
void |
unregisterTemplate(URL url) |
public Composer()
public Composer(Mailer mailer)
public void registerTemplate(URL url)
public void unregisterTemplate(URL url)
public void unregisterAllTemplates()
public Mailer getMailer()
public FreemarkerEngine getEngine()
public void render(String template, Object ctx, Writer writer) throws RenderingException
RenderingException
public void render(URL template, Object ctx, Writer writer) throws RenderingException
RenderingException
public String render(URL template, Object ctx) throws RenderingException
RenderingException
public String render(String templateContent, Object ctx) throws freemarker.template.TemplateException, IOException
freemarker.template.TemplateException
IOException
public Mailer.Message newMessage()
public Mailer.Message newTextMessage(URL template, Object ctx) throws RenderingException, javax.mail.MessagingException
RenderingException
javax.mail.MessagingException
public Mailer.Message newTextMessage(String templateContent, Object ctx) throws RenderingException, javax.mail.MessagingException, freemarker.template.TemplateException, IOException
RenderingException
javax.mail.MessagingException
freemarker.template.TemplateException
IOException
public Mailer.Message newHtmlMessage(URL template, Object ctx) throws RenderingException, javax.mail.MessagingException
RenderingException
javax.mail.MessagingException
public Mailer.Message newHtmlMessage(String templateContent, Object ctx) throws javax.mail.MessagingException, freemarker.template.TemplateException, IOException
javax.mail.MessagingException
freemarker.template.TemplateException
IOException
public Mailer.Message newMixedMessage(String templateContent, Object ctx, String textType, List<Blob> attachments) throws freemarker.template.TemplateException, IOException, javax.mail.MessagingException
freemarker.template.TemplateException
IOException
javax.mail.MessagingException
Copyright © 2015 Nuxeo SA. All rights reserved.