Class InfoLetterSessionController

java.lang.Object
org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
org.silverpeas.components.infoletter.control.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:
  • Field Details

  • Constructor Details

    • 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 Details

    • initUserPanel

      public String initUserPanel() throws InfoLetterException
      Throws:
      InfoLetterException
    • retourUserPanel

      public void retourUserPanel()
    • updateInfoLetter

      public void updateInfoLetter(InfoLetter ie)
    • getInfoLetters

      public List<InfoLetter> getInfoLetters()
    • getInfoLetter

      public InfoLetter getInfoLetter()
      Gets the newsletter template
    • getTemplateFileForEdition

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

      public List<InfoLetterPublication> getInfoLetterPublications()
    • getFileForEditionOf

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

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

      public void createInfoLetterPublication(InfoLetterPublicationPdC ilp)
    • deleteInfoLetterPublication

      public void deleteInfoLetterPublication(String id)
    • updateInfoLetterPublication

      public void updateInfoLetterPublication(InfoLetterPublicationPdC ilp)
    • getInfoLetterPublication

      public InfoLetterPublicationPdC getInfoLetterPublication(String id)
    • notifyInternalSubscribers

      public void notifyInternalSubscribers(InfoLetterPublicationPdC ilp)
      Notify the newsletter to internal subscribers
      Parameters:
      ilp - the info letter 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
    • notifyMe

      public String[] notifyMe(InfoLetterPublicationPdC ilp)
      Send letter to itself.
    • notifyManagers

      public String[] notifyManagers(InfoLetterPublicationPdC ilp)
      Send letter to managers
    • 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.silverpeas.core.util.file.FileItem filePart) throws InfoLetterException, org.silverpeas.core.exception.UtilTrappedException
      Import email addresses of external subscribers to newsletters.
      Parameters:
      filePart - the uploaded CSV file.
      Throws:
      org.silverpeas.core.exception.UtilTrappedException - if an error occurs
      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 sent by mail to internal users
      Returns:
      boolean