Class InfoLetterSessionController

  • All Implemented Interfaces:
    Serializable, org.silverpeas.core.web.mvc.controller.ComponentSessionController, org.silverpeas.core.web.session.SessionCloseable

    public class InfoLetterSessionController
    extends org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
    See Also:
    Serialized Form
    • Constructor Detail

      • InfoLetterSessionController

        public InfoLetterSessionController​(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl,
                                           org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)
        Standard Session Controller Constructeur
        Parameters:
        mainSessionCtrl - The user's profile
        componentContext - The component's profile
    • Method Detail

      • retourUserPanel

        public void retourUserPanel()
      • updateInfoLetter

        public void updateInfoLetter​(InfoLetter ie)
      • getInfoLetter

        public InfoLetter getInfoLetter()
        Gets the newsletter template
      • getTemplateFileForEdition

        public org.silverpeas.core.contribution.content.ddwe.DragAndDropWbeFile getTemplateFileForEdition()
      • getFileForEditionOf

        public org.silverpeas.core.contribution.content.ddwe.DragAndDropWbeFile getFileForEditionOf​(InfoLetterPublication ilp)
      • resetWithTemplateFor

        public org.silverpeas.core.contribution.content.ddwe.DragAndDropWbeFile resetWithTemplateFor​(InfoLetterPublication ilp)
      • deleteInfoLetterPublication

        public void deleteInfoLetterPublication​(String id)
      • notifyInternalSubscribers

        public void notifyInternalSubscribers​(InfoLetterPublicationPdC ilp)
        Notify the newsletter to internal subscribers
        Parameters:
        ilp - the infoletter to send
      • sendByMailToExternalSubscribers

        public String[] sendByMailToExternalSubscribers​(InfoLetterPublicationPdC ilp)
        Send letter by mail to external subscribers
        Parameters:
        ilp - the classified InfoLetterPublication to send
        Returns:
        tab of emails in error
      • getEmailsExternalsSubscribers

        public Set<String> getEmailsExternalsSubscribers()
      • addExternalsSubscribers

        public void addExternalsSubscribers​(String newMails)
      • deleteExternalsSubscribers

        public void deleteExternalsSubscribers​(String[] mails)
      • deleteAllExternalsSubscribers

        public void deleteAllExternalsSubscribers()
        Remove all external emails
      • subscribeUser

        public void subscribeUser()
      • unsubscribeUser

        public void unsubscribeUser()
      • isSubscriber

        public boolean isSubscriber()
      • isPdcUsed

        public boolean isPdcUsed()
      • importCsvEmails

        public void importCsvEmails​(org.apache.commons.fileupload.FileItem filePart)
                             throws org.silverpeas.core.exception.UtilTrappedException,
                                    InfoLetterPeasTrappedException,
                                    InfoLetterException
        Import email addresses of external subscribers to newsletters.
        Parameters:
        filePart - the uploaded CSV file.
        Throws:
        org.silverpeas.core.exception.UtilTrappedException - if an error occurs
        InfoLetterPeasTrappedException - if an error occurs during the import.
        InfoLetterException - if an error occurs during the import
      • exportCsvEmails

        public boolean exportCsvEmails()
                                throws IOException,
                                       InfoLetterException
        Export emails of external subscribers into a CSV file.
        Returns:
        true if the export succeed.
        Throws:
        IOException - if an error occurs while recording the emails to the CSV file.
        InfoLetterException - if an error occurs during the export.
      • isNewsLetterSendByMail

        public boolean isNewsLetterSendByMail()
        return true if Newsletter is send by mail to internal users
        Returns:
        boolean