public interface NewsletterEmailService
Modifier and Type | Method and Description |
---|---|
void |
bounced(Authorizable authorizable,
String bouncedMailPath,
Session session)
Marks a newsletter bounce.
|
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,
URI contentUri)
Builds a Newsletter and take the URI to retrieve the content.
|
AuthorizableMailingList |
createMailingList(String groupName,
Session session)
Build a MailingList for the given group-name
|
AuthorizableMailingList |
createTestMailingList(SlingHttpServletRequest request)
Create a MailingList for testing.
|
boolean |
hasNewsletterBounced(Authorizable authorizable,
Session session)
Tests if the authorizable's newsletter bounce counter exceeded.
|
void |
processBounceCounter(Authorizable authorizable,
boolean increase,
Session session)
Process the authorizable's bounce counter.
|
MailingStatus |
sendNewsletter(NewsLetter newsletter,
ResourceResolver resourceResolver)
Send the newsletter.
|
MailingStatus sendNewsletter(NewsLetter newsletter, ResourceResolver resourceResolver) throws RepositoryException
newsletter
- The newslettertrue
false
otherwise.AccessControlException
- if the Session lacks the privilege to sendjavax.jcr.RepositoryException
- in case of error accessing the RepositoryRepositoryException
NewsLetter 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, 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(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 NewsletterHelper.PARAM_TEST_TO
or defaults to
the Request's User's
Profile.getPrimaryMail()
primary
Mail} (e.g. ResourceResolver.adaptTo(User.class)). The Profile has to be
given by the RequestParameter named
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 Repositoryvoid bounced(Authorizable authorizable, String bouncedMailPath, Session session) throws RepositoryException
authorizable
- The authorizable to mark the newsletter bounce for.bouncedMailPath
- Path to the mail that bounced.session
- The JCR Session to use.RepositoryException
boolean hasNewsletterBounced(Authorizable authorizable, Session session) throws RepositoryException
authorizable
- The authorizable to test for.session
- The JCR session to use.RepositoryException
void processBounceCounter(Authorizable authorizable, boolean increase, Session session) throws RepositoryException
authorizable
- The authorizable to process the bounce counter of.increase
- If true
increase the bounce counter, decrease
otherwise.session
- The JCR Session to use.RepositoryException
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"