org.opencms.notification
Class CmsContentNotification

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.CmsContentNotification

public class CmsContentNotification
extends CmsHtmlMail

The E-Mail to be written to responsibles of resources.

Author:
Jan Baudisch

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
 
Method Summary
static boolean existsEditor(CmsResource resource)
          Returns true, if there exists an editor for a specific resource.
protected  java.lang.String generateHtmlMsg()
          Creates the mail to be sent to the responsible user.
protected  java.util.List getNotificationCauses()
          Returns a list of CmsNotificationResourceInfos of the resources that will occur in the notification.
 CmsUser getResponsible()
          Returns the responsible.
 void send()
           
protected  void setNotificationCauses(java.util.List resources)
          Sets the resources.
 
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
Method Detail

existsEditor

public static boolean existsEditor(CmsResource resource)
Returns true, if there exists an editor for a specific resource.

Parameters:
resource - the resource to check if there exists an editor
Returns:
true if there exists an editor for the resource

getResponsible

public CmsUser getResponsible()
Returns the responsible.

Returns:
the responsible

send

public void send()
          throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException
See Also:
Email.send()

generateHtmlMsg

protected java.lang.String generateHtmlMsg()
                                    throws CmsException
Creates the mail to be sent to the responsible user.

Returns:
the mail to be sent to the responsible user
Throws:
CmsException - if something goes wrong

getNotificationCauses

protected java.util.List getNotificationCauses()
Returns a list of CmsNotificationResourceInfos of the resources that will occur in the notification.

Returns:
a list of CmsNotificationResourceInfos of the resources that will occur in the notification

setNotificationCauses

protected void setNotificationCauses(java.util.List resources)
Sets the resources.

Parameters:
resources - a list of CmsNotificationResourceInfo's