Package org.opencms.newsletter
Class CmsNewsletter
java.lang.Object
org.opencms.newsletter.CmsNewsletter
- All Implemented Interfaces:
I_CmsNewsletter
Basic implementation of the interface
I_CmsNewsletter
.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
(String subject) Sets the subject.
-
Constructor Details
-
CmsNewsletter
public CmsNewsletter()Creates a new newsletter instance.
-
-
Method Details
-
addAttachment
Description copied from interface:I_CmsNewsletter
Adds a OpenCms resource as an attachment to the newsletter.- Specified by:
addAttachment
in interfaceI_CmsNewsletter
- Parameters:
cms
- the CmsObjectresource
- the resource to attach- See Also:
-
addContent
Description copied from interface:I_CmsNewsletter
Adds content to the newsletter.- Specified by:
addContent
in interfaceI_CmsNewsletter
- Parameters:
content
- the content to add- See Also:
-
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 interfaceI_CmsNewsletter
- Parameters:
recipient
- the recipient to whom the newsletter is sentcms
- the CmsObject- Returns:
- the e-mail for the newsletter
- Throws:
CmsException
- if something goes wrong
-
setSubject
Description copied from interface:I_CmsNewsletter
Sets the subject.- Specified by:
setSubject
in interfaceI_CmsNewsletter
- Parameters:
subject
- the subject to set- See Also:
-