|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.mail.Email
org.apache.commons.mail.MultiPartEmail
org.apache.commons.mail.HtmlEmail
org.opencms.mail.CmsHtmlMail
org.opencms.notification.A_CmsNotification
Abstract class to create a notfication which will be send as a html mail to a user in OpenCms.
Field Summary |
Fields inherited from class org.apache.commons.mail.Email |
ATTACHMENTS, charset, CONTENT_TYPE, EMAIL_BODY, EMAIL_SUBJECT, FILE_SERVER, ISO_8859_1, KOI8_R, MAIL_DEBUG, MAIL_HOST, MAIL_SMTP_AUTH, MAIL_SMTP_FROM, MAIL_TRANSPORT_PROTOCOL, message, RECEIVER_EMAIL, RECEIVER_NAME, SENDER_EMAIL, SENDER_NAME, SMTP, TEXT_HTML, TEXT_PLAIN, US_ASCII |
Constructor Summary | |
A_CmsNotification(CmsObject cms,
CmsUser receiver)
Creates a new A_CmsNotification. |
Method Summary | |
void |
addMacro(java.lang.String key,
java.lang.String value)
Adds a new macro to the used macro resolver. |
protected void |
appendHtmlHeader(java.lang.StringBuffer buffer)
Append the html-code to start a html mail message to the given buffer. |
protected void |
appenHtmlFooter(java.lang.StringBuffer buffer)
Append the html-code to finish a html mail message to the given buffer. |
protected abstract java.lang.String |
generateHtmlMsg()
Overwrite the method to generate the message body of the notification. |
CmsObject |
getCmsObject()
Returns the CmsObject. |
java.util.Locale |
getLocale()
Returns the locale. |
protected abstract java.lang.String |
getNotificationContent()
Overwrite the method to return the path to the xmlcontent, where the subject, the header and the footer are defined. |
CmsUser |
getReceiver()
Returns the receiver. |
void |
send()
|
Methods inherited from class org.apache.commons.mail.HtmlEmail |
embed, isValid, setHtmlMsg, setMsg, setTextMsg |
Methods inherited from class org.apache.commons.mail.MultiPartEmail |
attach, attach, attach, attach, attach, getContainer, getPrimaryBodyPart |
Methods inherited from class org.apache.commons.mail.Email |
addBcc, addBcc, addCc, addCc, addHeader, addReplyTo, addReplyTo, addTo, addTo, getSentDate, setAuthentication, setAuthenticator, setBcc, setCc, setCharset, setContent, setContent, setDebug, setFrom, setFrom, setHeaders, setHostName, setSentDate, setSubject, setTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public A_CmsNotification(CmsObject cms, CmsUser receiver)
cms
- the cms object to usereceiver
- the cms user who should receive the messageMethod Detail |
public void addMacro(java.lang.String key, java.lang.String value)
key
- The key of the macro.value
- The value of the macro.public CmsObject getCmsObject()
public java.util.Locale getLocale()
public CmsUser getReceiver()
public void send() throws javax.mail.MessagingException
javax.mail.MessagingException
CmsSimpleMail.send()
protected void appendHtmlHeader(java.lang.StringBuffer buffer)
buffer
- The StringBuffer to add the html code to.protected void appenHtmlFooter(java.lang.StringBuffer buffer)
buffer
- The StringBuffer to add the html code to.protected abstract java.lang.String generateHtmlMsg()
protected abstract java.lang.String getNotificationContent()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |