public interface NewsletterEmailService
Modifier and Type | Method and Description |
---|---|
NewsLetter |
buildNewsletter(Page page)
Builds a
Newsletter from the given Page .The Page is considered to represent the content of the Newsletter Its up to the implementation what are the preconditions on processing the Page. |
NewsLetter |
buildNewsletter(Resource resource,
java.net.URI contentUri)
Builds a Newsletter and take the URI to retrieve the content.
|
AuthorizableMailingList |
createMailingList(java.lang.String groupName,
Session session)
Build a MailingList for the given group-name
|
AuthorizableMailingList |
createTestMailingList(SlingHttpServletRequest request)
Create a MailingList for testing.
|
MailingStatus |
sendNewsletter(NewsLetter newsletter,
ResourceResolver resourceResolver)
Send the newsletter.
|
MailingStatus sendNewsletter(NewsLetter newsletter, ResourceResolver resourceResolver) throws RepositoryException
newsletter
- The newslettertrue
false
otherwise.java.security.AccessControlException
- if the Session lacks the privilege to sendRepositoryException
- in case of error accessing the RepositoryNewsLetter buildNewsletter(Page page) throws RepositoryException
Newsletter
from the given Page
.page
- containing the data of the Newsletternull
if the Resource is
not suited to build a NewsletterRepositoryException
- in case of Exception accessing the RepositoryNewsLetter buildNewsletter(Resource resource, java.net.URI contentUri) throws RepositoryException
resource
- to build Newsletter ofcontentUri
- to take as host information to be shown in sent NewsletterRepositoryException
- in case of error accessing the RepositorybuildNewsletter(Page)
AuthorizableMailingList createMailingList(java.lang.String groupName, Session session) throws RepositoryException
groupName
- to build a MailingList forsession
- to retrieve the ListRepositoryException
- in case of error accessing the RepositoryAuthorizableMailingList createTestMailingList(SlingHttpServletRequest request) throws RepositoryException
User
to an e-mail
address to send the mail to. The Address has to be given with the
RequestParameter com.day.cq.mcm.core.NewsletterHelper#PARAM_TEST_TO
or defaults to
the Request's User's primary Mail (e.g. ResourceResolver.adaptTo(User.class)). The Profile has to be
given by the RequestParameter named
com.day.cq.mcm.core.NewsletterHelper#PARAM_TEST_PROFILE
and the Id as value.request
- to read the input fromnull
if
parameters are not setRepositoryException
- in case of error accessing the RepositoryCopyright © 2010 - 2020 Adobe. All Rights Reserved