|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.mail.PersonalizedMailMessage
public abstract class PersonalizedMailMessage
This class is intended to send personal mail to member. Example of use:
PersonalizedMailMessage mail = new PersonalizedMailMessage() {
public String getOrigin() {
return "MyCustomNotification";
}
public String getSubject(Member mbr) {
return "A personal mail for " + mbr;
};
public String getContentText(Member mbr) {
return mbr.getFriendlyName() + ",\n\nThis is a personal mail for you...\n";
}
};
mail.sendInThread(myMemberSet);
| Constructor Summary | |
|---|---|
PersonalizedMailMessage()
|
|
| Method Summary | |
|---|---|
String |
getContentHtml(Member mbr)
Returns the HTML content of the mail. |
String |
getContentText(Member mbr)
Returns the text content of the mail. |
String |
getFrom(Member mbr)
Returns the "from" part of the mail. |
abstract String |
getOrigin()
Returns the origin used for the MailMessage. |
abstract String |
getSubject(Member mbr)
Returns the subject of the mail. |
String |
getThread()
Returns the thread name of the MailMessage. |
boolean |
isRecipient(Member mbr)
Checks if the mail must be sent to the given member. |
void |
send(Collection<Member> memberColl)
Sends this mail to a collection of member. |
void |
send(Member mbr)
Sends this mail to a member. |
void |
sendInThread(Collection<Member> memberColl)
Sends this mail to a collection of member in a new thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersonalizedMailMessage()
| Method Detail |
|---|
public abstract String getOrigin()
public abstract String getSubject(Member mbr)
mbr - the member
public String getContentText(Member mbr)
mbr - the member
public String getContentHtml(Member mbr)
mbr - the member
public String getFrom(Member mbr)
mbr - the member
public boolean isRecipient(Member mbr)
mbr - the member
public String getThread()
public void send(Collection<Member> memberColl)
memberColl - a collection of member.public void sendInThread(Collection<Member> memberColl)
memberColl - a collection of memberpublic void send(Member mbr)
mbr - the member
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||