|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.util.mail.MailTemplate
public abstract class MailTemplate
Description:
The MailTemplate holds a mail subject/body template and the according methods
to populate the velocity contexts with the user values
Usage:
See MailTest.testMailTemplate() to learn how you can use this abstract class
and how you have to implement the putVariablesInMailContext() method.
Initial Date: 21.11.2006
| Constructor Summary | |
|---|---|
MailTemplate(java.lang.String subjectTemplate,
java.lang.String bodyTemplate,
java.io.File[] attachments)
Constructor for a mail using a template |
|
| Method Summary | |
|---|---|
void |
addToContext(java.lang.String name,
java.lang.String value)
|
java.io.File[] |
getAttachments()
|
java.lang.String |
getBodyTemplate()
|
org.apache.velocity.VelocityContext |
getContext()
|
java.lang.Boolean |
getCpfrom()
|
java.lang.String |
getSubjectTemplate()
|
abstract void |
putVariablesInMailContext(org.apache.velocity.VelocityContext context,
Identity recipient)
Method that puts all necessary variables for those templates into the give velocity context. |
void |
setAttachments(java.io.File[] attachments)
|
void |
setBodyTemplate(java.lang.String bodyTemplate)
|
void |
setCpfrom(java.lang.Boolean cpfrom)
|
void |
setSubjectTemplate(java.lang.String subjectTemplate)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MailTemplate(java.lang.String subjectTemplate,
java.lang.String bodyTemplate,
java.io.File[] attachments)
subjectTemplate - Template for mail subject. Must not be NULLbodyTemplate - Template for mail body. Must not be NULLattachments - File array for mail attachments. Can be NULL| Method Detail |
|---|
public java.lang.Boolean getCpfrom()
public void setCpfrom(java.lang.Boolean cpfrom)
cpfrom - public java.lang.String getSubjectTemplate()
public java.lang.String getBodyTemplate()
public java.io.File[] getAttachments()
public void setAttachments(java.io.File[] attachments)
attachments - set file attachmentspublic void setBodyTemplate(java.lang.String bodyTemplate)
bodyTemplate - Set body templatepublic void setSubjectTemplate(java.lang.String subjectTemplate)
subjectTemplate - Set subject template
public abstract void putVariablesInMailContext(org.apache.velocity.VelocityContext context,
Identity recipient)
context - The context where to put the variablesrecipient - The current identity which will get the email
public void addToContext(java.lang.String name,
java.lang.String value)
public org.apache.velocity.VelocityContext getContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||