org.opencms.newsletter
Class CmsNewsletter

java.lang.Object
  extended by org.opencms.newsletter.CmsNewsletter
All Implemented Interfaces:
I_CmsNewsletter

public class CmsNewsletter
extends java.lang.Object
implements I_CmsNewsletter

Basic implementation of the interface I_CmsNewsletter.

Author:
Jan Baudisch

Field Summary
 
Fields inherited from interface org.opencms.newsletter.I_CmsNewsletter
MACRO_SEND_DATE, MACRO_USER_EMAIL, MACRO_USER_FIRSTNAME, MACRO_USER_FULLNAME, MACRO_USER_LASTNAME
 
Constructor Summary
CmsNewsletter()
          Creates a new newsletter instance.
 
Method Summary
 void addAttachment(CmsObject cms, CmsResource resource)
          Adds a OpenCms resource as an attachment to the newsletter.
 void addContent(I_CmsNewsletterContent content)
          Adds content to the newsletter.
 org.apache.commons.mail.Email getEmail(CmsObject cms, I_CmsNewsletterRecipient recipient)
          Returns the e-mail for the newsletter.
 void setSubject(java.lang.String subject)
          Sets the subject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsNewsletter

public CmsNewsletter()
Creates a new newsletter instance.

Method Detail

addAttachment

public void addAttachment(CmsObject cms,
                          CmsResource resource)
Description copied from interface: I_CmsNewsletter
Adds a OpenCms resource as an attachment to the newsletter.

Specified by:
addAttachment in interface I_CmsNewsletter
Parameters:
cms - the CmsObject
resource - the resource to attach
See Also:
I_CmsNewsletter.addAttachment(org.opencms.file.CmsObject, org.opencms.file.CmsResource)

addContent

public void addContent(I_CmsNewsletterContent content)
Description copied from interface: I_CmsNewsletter
Adds content to the newsletter.

Specified by:
addContent in interface I_CmsNewsletter
Parameters:
content - the content to add
See Also:
I_CmsNewsletter.addContent(org.opencms.newsletter.I_CmsNewsletterContent)

getEmail

public org.apache.commons.mail.Email getEmail(CmsObject cms,
                                              I_CmsNewsletterRecipient recipient)
                                       throws CmsException
Returns the e-mail for the newsletter.

Specified by:
getEmail in interface I_CmsNewsletter
Parameters:
recipient - the recipient to whom the newsletter is sent
cms - the CmsObject
Returns:
the e-mail for the newsletter
Throws:
CmsException - if something goes wrong

setSubject

public void setSubject(java.lang.String subject)
Description copied from interface: I_CmsNewsletter
Sets the subject.

Specified by:
setSubject in interface I_CmsNewsletter
Parameters:
subject - the subject to set
See Also:
I_CmsNewsletter.setSubject(java.lang.String)