|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.newsletter.service.NewsletterService
public class NewsletterService
The newsletter service
| Field Summary | |
|---|---|
static String |
BEAN_NAME
Name of the bean of this service |
| Constructor Summary | |
|---|---|
NewsletterService()
|
|
| Method Summary | |
|---|---|
String |
generateNewsletterHtmlCode(NewsLetter newsletter,
int nTemplateNewsLetterId,
String strBaseUrl,
fr.paris.lutece.portal.business.user.AdminUser user,
Locale locale)
Generate the html code of the newsletter according to the document and newsletter templates |
String |
getImageFolderPath(String strBaseUrl)
Get the url of the image folder used by templates |
static NewsletterService |
getService()
Returns the instance of the singleton |
byte[] |
getSubscribersCsvExport(int nNewsletterId)
Fetches the list of subscribers on a specific newsletter |
String |
getUnsecuredFolderPath()
Get the absolute path to the unsecured folder where files should be saved |
String |
getUnsecuredImagefolder()
Get the unsecured image folder inside the unsecured folder |
String |
getUnsecuredWebappUrl()
Get the absolute url to the unsecured webapp. |
String |
getUnsubscriptionKey(String strEmail)
Get the unsubscription key associated with the given email address. |
boolean |
isAbsoluteUrl()
Check the property in property file to know if url must be absolutes or relatives |
boolean |
isMhtmlActivated()
Determine if mails must be sent in MHTML |
void |
modifySectionNumber(int nOldSectionNumber,
int nNewSectionNumber,
int nTemplateId)
Modify the number of sections of a newsletter template |
void |
removeSubscriberFromNewsletter(Subscriber subscriber,
int nNewsletterId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a known suscriber from a newsletter |
void |
sendMail(NewsLetter newsletter,
String strObject,
String strBaseUrl,
fr.paris.lutece.util.html.HtmlTemplate templateNewsletter,
Collection<Subscriber> listSubscribers)
Send the newsletter to a list of subscribers |
boolean |
useUnsecuredImages()
Check if images of the newsletter should be transfered on an unsecured webapp or not |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BEAN_NAME
| Constructor Detail |
|---|
public NewsletterService()
| Method Detail |
|---|
public static NewsletterService getService()
public void sendMail(NewsLetter newsletter,
String strObject,
String strBaseUrl,
fr.paris.lutece.util.html.HtmlTemplate templateNewsletter,
Collection<Subscriber> listSubscribers)
newsletter - The newsletter to sendstrObject - The email objectstrBaseUrl - The baseUrl (can be prod url)templateNewsletter - The generated templatelistSubscribers - The list of subscribers (date and id can be null,
only email is used)public boolean isAbsoluteUrl()
public boolean isMhtmlActivated()
public byte[] getSubscribersCsvExport(int nNewsletterId)
nNewsletterId - The id of the newsletter
public void removeSubscriberFromNewsletter(Subscriber subscriber,
int nNewsletterId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
subscriber - the subscriber to removenNewsletterId - the newsletter id from which to remove the
subscriberplugin - The plugin object
public String generateNewsletterHtmlCode(NewsLetter newsletter,
int nTemplateNewsLetterId,
String strBaseUrl,
fr.paris.lutece.portal.business.user.AdminUser user,
Locale locale)
newsletter - the newsletter to generate the HTML ofnTemplateNewsLetterId - the newsletter template idstrBaseUrl - The base url of the portaluser - the current userlocale - The locale
public String getImageFolderPath(String strBaseUrl)
strBaseUrl - The base url
public boolean useUnsecuredImages()
public String getUnsecuredImagefolder()
public String getUnsecuredFolderPath()
public String getUnsecuredWebappUrl()
public String getUnsubscriptionKey(String strEmail)
strEmail - The email to get the unsubscription key of.
public void modifySectionNumber(int nOldSectionNumber,
int nNewSectionNumber,
int nTemplateId)
nOldSectionNumber - The old number of sectionsnNewSectionNumber - The new number of sectionsnTemplateId - The id of the template
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||