public interface NewsletterManager
isNewsletter(com.day.cq.wcm.api.Page)
must be
called with a newsletter page, or else they will throw a NewsletterException
.Modifier and Type | Method and Description |
---|---|
void |
approve(Page newsletter)
Marks a newsletter as approved.
|
void |
disapprove(Page newsletter)
Revokes the approval of a newsletter.
|
long |
getLastModified(Page newsletter)
Returns the date of the last modification of a newsletter.
|
java.lang.String[] |
getLinkedDeliveries(Page newsletter)
Returns an array with currently linked deliveries.
|
java.lang.String |
getPlainText(Page newsletter)
Gets the plain text variant of the specified newsletter (if available).
|
java.lang.String |
getSubject(Page newsletter)
Gets a suitable subject for the specified newsletter.
|
boolean |
isApproved(Page newsletter)
Checks if a newsletter is approved.
|
boolean |
isLinked(Page newsletter,
java.lang.String deliveryId)
Returns true if the newsletter is linked to the specified delivery.
|
boolean |
isModifiedSince(Page newsletter,
long timestamp)
Checks if a newsletter has been modified after a specified date.
|
boolean |
isNewsletter(Page page)
Checks if the specified page is a newsletter, i.e.
|
java.lang.String |
link(Page newsletter,
java.lang.String deliveryId)
Links a newsletter with an Adobe Campaign delivery.
|
void |
lock(Page newsletter,
java.lang.String deliveryId)
Locks a newsletter to the currently active session.
|
void |
markAsSent(Page newsletter,
java.lang.String deliveryId)
Marks a newsletter as sent by a delivery.
|
void |
publish(Page newsletter)
Replicates a newsletter and all its referenced resources to the publish instance(s).
|
void |
unlink(Page newsletter,
java.lang.String deliveryId)
Unlinks a newsletter from an Adobe Campaign delivery.
|
void |
unlock(Page newsletter,
java.lang.String deliveryId)
Unlocks a newsletter.
|
boolean isNewsletter(Page page)
page
- A pageboolean isLinked(Page newsletter, java.lang.String deliveryId) throws NewsletterException
newsletter
- A newsletterdeliveryId
- A delivery idNewsletterException
- if the specified page is not a newsletterjava.lang.String[] getLinkedDeliveries(Page newsletter) throws NewsletterException
newsletter
- The newsletter page to checkNewsletterException
- If the specified page is not a newsletterjava.lang.String link(Page newsletter, java.lang.String deliveryId) throws NewsletterException, PersistenceException
newsletter
- The newsletter page to linkdeliveryId
- The id of the delivery to link with the newsletterNewsletterException
- if the delivery is already linked with the newsletterPersistenceException
void unlink(Page newsletter, java.lang.String deliveryId) throws NewsletterException, PersistenceException
newsletter
- The newsletter page to unlinkdeliveryId
- The id of the delivery to unlink the newsletter fromNewsletterException
- if the newsletter is not linked to the delivery or
if the delivery has been used to lock the newsletterPersistenceException
boolean isModifiedSince(Page newsletter, long timestamp) throws NewsletterException
newsletter
- A newsletter pagetimestamp
- The date to check againstNewsletterException
long getLastModified(Page newsletter) throws NewsletterException
newsletter
- A newsletter pageNewsletterException
java.lang.String getSubject(Page newsletter) throws NewsletterException
newsletter
- A newsletter pageNewsletterException
- if the subject could not be determinedjava.lang.String getPlainText(Page newsletter) throws NewsletterException
newsletter
- A newsletter pagenull
if no
text variant is availableNewsletterException
boolean isApproved(Page newsletter) throws NewsletterException
newsletter
- A newsletter pageNewsletterException
void approve(Page newsletter) throws NewsletterException, PersistenceException
newsletter
- A newsletter page to approveNewsletterException
- if the newsletter has already been approvedPersistenceException
void disapprove(Page newsletter) throws NewsletterException, PersistenceException
newsletter
- A newsletter page to disapproveNewsletterException
- if the newsletter is not currently approvedPersistenceException
void markAsSent(Page newsletter, java.lang.String deliveryId) throws NewsletterException, PersistenceException
newsletter
- A newsletter pagedeliveryId
- The delivery used to send the newsletterNewsletterException
- if the newsletter is not linked to the delivery
or has already been marked as sentPersistenceException
void lock(Page newsletter, java.lang.String deliveryId) throws NewsletterException
newsletter
- A newsletter page to lockdeliveryId
- The delivery requesting to lock the newsletterNewsletterException
- if the newsletter is already locked, not linked
to the delivery or if an error occurredvoid unlock(Page newsletter, java.lang.String deliveryId) throws NewsletterException
newsletter
- A newsletter page to unlockdeliveryId
- The delivery requesting to unlock the newsletterNewsletterException
- if the newsletter is not currently locked, was
locked by another delivery or an error occurredvoid publish(Page newsletter) throws NewsletterException
newsletter
- A newsletter page to publishNewsletterException
- if session is not authorized to replicate the
newsletter or if the replication did not succeedCopyright © 2010 - 2020 Adobe. All Rights Reserved