Package org.opencms.newsletter
Class CmsNewsletter
- java.lang.Object
-
- org.opencms.newsletter.CmsNewsletter
-
- All Implemented Interfaces:
I_CmsNewsletter
public class CmsNewsletter extends java.lang.Object implements I_CmsNewsletter
Basic implementation of the interfaceI_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
Constructors Constructor Description CmsNewsletter()
Creates a new newsletter instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 interfaceI_CmsNewsletter
- Parameters:
cms
- the CmsObjectresource
- 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 interfaceI_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 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
public void setSubject(java.lang.String subject)
Description copied from interface:I_CmsNewsletter
Sets the subject.- Specified by:
setSubject
in interfaceI_CmsNewsletter
- Parameters:
subject
- the subject to set- See Also:
I_CmsNewsletter.setSubject(java.lang.String)
-
-