org.opencms.notification
Class CmsPublishNotification

java.lang.Object
  extended byorg.apache.commons.mail.Email
      extended byorg.apache.commons.mail.MultiPartEmail
          extended byorg.apache.commons.mail.HtmlEmail
              extended byorg.opencms.mail.CmsHtmlMail
                  extended byorg.opencms.notification.A_CmsNotification
                      extended byorg.opencms.notification.CmsPublishNotification

public class CmsPublishNotification
extends A_CmsNotification

Class to send a notification to an OpenCms user with a summary of warnings and errors occured while publishing the project.

Since:
6.5.3
Version:
$Revision: 1.3 $
Author:
Peter Bonrad

Field Summary
static java.lang.String NOTIFICATION_CONTENT
          The path to the xml content with the subject, header and footer of the notification e-mail.
 
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
CmsPublishNotification(CmsObject cms, CmsUser receiver, I_CmsReport report)
          Creates a new CmsPublishNotification.
 
Method Summary
protected  java.lang.String generateHtmlMsg()
          Overwrite the method to generate the message body of the notification.
protected  java.lang.String getNotificationContent()
          Overwrite the method to return the path to the xmlcontent, where the subject, the header and the footer are defined.
 
Methods inherited from class org.opencms.notification.A_CmsNotification
addMacro, appendHtmlHeader, appenHtmlFooter, getCmsObject, getLocale, getReceiver, 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
 

Field Detail

NOTIFICATION_CONTENT

public static final java.lang.String NOTIFICATION_CONTENT
The path to the xml content with the subject, header and footer of the notification e-mail.

See Also:
Constant Field Values
Constructor Detail

CmsPublishNotification

public CmsPublishNotification(CmsObject cms,
                              CmsUser receiver,
                              I_CmsReport report)
Creates a new CmsPublishNotification.

Parameters:
cms - the cms object to use
receiver - the cms user who should receive the message
report - the report of the publishing which should be included in the message
Method Detail

generateHtmlMsg

protected java.lang.String generateHtmlMsg()
Description copied from class: A_CmsNotification
Overwrite the method to generate the message body of the notification. This text is placed between the header and the footer of the defined xmlcontent and the required html code is added.

Specified by:
generateHtmlMsg in class A_CmsNotification
Returns:
The text to be inserted in the notification.
See Also:
A_CmsNotification.generateHtmlMsg()

getNotificationContent

protected java.lang.String getNotificationContent()
Description copied from class: A_CmsNotification
Overwrite the method to return the path to the xmlcontent, where the subject, the header and the footer are defined.

Specified by:
getNotificationContent in class A_CmsNotification
Returns:
The path to the xmlcontent file.
See Also:
A_CmsNotification.getNotificationContent()