org.opencms.newsletter
Interface I_CmsNewsletter

All Known Implementing Classes:
CmsNewsletter

public interface I_CmsNewsletter

Interface for the newsletter.


Field Summary
static java.lang.String MACRO_SEND_DATE
          Macro for the date.
static java.lang.String MACRO_USER_EMAIL
          Macro for the email address.
static java.lang.String MACRO_USER_FIRSTNAME
          Macro for the firstname.
static java.lang.String MACRO_USER_FULLNAME
          Macro for the full name.
static java.lang.String MACRO_USER_LASTNAME
          Macro for the lastname.
 
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 newsletter as an e-mail to be sent.
 void setSubject(java.lang.String subject)
          Sets the subject.
 

Field Detail

MACRO_SEND_DATE

static final java.lang.String MACRO_SEND_DATE
Macro for the date.

See Also:
Constant Field Values

MACRO_USER_EMAIL

static final java.lang.String MACRO_USER_EMAIL
Macro for the email address.

See Also:
Constant Field Values

MACRO_USER_FIRSTNAME

static final java.lang.String MACRO_USER_FIRSTNAME
Macro for the firstname.

See Also:
Constant Field Values

MACRO_USER_FULLNAME

static final java.lang.String MACRO_USER_FULLNAME
Macro for the full name.

See Also:
Constant Field Values

MACRO_USER_LASTNAME

static final java.lang.String MACRO_USER_LASTNAME
Macro for the lastname.

See Also:
Constant Field Values
Method Detail

addAttachment

void addAttachment(CmsObject cms,
                   CmsResource resource)
                   throws CmsException
Adds a OpenCms resource as an attachment to the newsletter.

Parameters:
cms - the CmsObject
resource - the resource to attach
Throws:
CmsException - if something goes wrong

addContent

void addContent(I_CmsNewsletterContent content)
Adds content to the newsletter.

Parameters:
content - the content to add

getEmail

org.apache.commons.mail.Email getEmail(CmsObject cms,
                                       I_CmsNewsletterRecipient recipient)
                                       throws javax.mail.MessagingException,
                                              CmsException
Returns the newsletter as an e-mail to be sent.

Parameters:
cms - the CmsObject
recipient - the recipient to which the newsletter will be sent
Returns:
the newsletter as an e-mail
Throws:
javax.mail.MessagingException - if something goes wrong
CmsException - if something goes wrong

setSubject

void setSubject(java.lang.String subject)
Sets the subject.

Parameters:
subject - the subject to set