com.stratelia.silverpeas.infoLetter.control
Class InfoLetterSessionController

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
      extended by com.stratelia.silverpeas.infoLetter.control.InfoLetterSessionController
All Implemented Interfaces:
com.stratelia.silverpeas.peasCore.ComponentSessionController

public class InfoLetterSessionController
extends com.stratelia.silverpeas.peasCore.AbstractComponentSessionController

Class declaration

Author:

Field Summary
static String EXPORT_CSV_NAME
           
 
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
CHARACTER_ENCODING, context
 
Constructor Summary
InfoLetterSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl, com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
          Standard Session Controller Constructeur
 
Method Summary
 void addExternalsSuscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK, String newmails)
           
 void copyWYSIWYG(String publicationSource, String target)
           
 void createIndex(InfoLetter il)
           
 void createIndex(InfoLetterPublicationPdC ilp)
           
 void createInfoLetterPublication(InfoLetterPublicationPdC ilp)
           
 void deleteAllExternalsSuscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
          Remove all external emails
 void deleteExternalsSuscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK, String[] mails)
           
 void deleteInfoLetterPublication(com.stratelia.webactiv.util.WAPrimaryKey pk)
           
 boolean exportCsvEmails()
          Export Csv emails
 Set<String> getEmailsExternalsSuscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
           
 InfoLetterPublicationPdC getInfoLetterPublication(com.stratelia.webactiv.util.WAPrimaryKey publiPK)
           
 List<InfoLetterPublication> getInfoLetterPublications(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
           
 List<InfoLetter> getInfoLetters()
           
protected  com.silverpeas.util.template.SilverpeasTemplate getNotificationMessageTemplate()
           
 String getTemplate(InfoLetterPublicationPdC ilp)
           
 void importCsvEmails(org.apache.commons.fileupload.FileItem filePart)
          Import Csv emails
 String initUserPanel()
           
 boolean isNewsLetterSendByMail()
          return true if Newsletter is send by mail to internal users
 boolean isPdcUsed()
           
 boolean isSuscriber()
           
 boolean isTemplateExist(InfoLetterPublicationPdC ilp)
           
 void notifyInternalSuscribers(InfoLetterPublicationPdC ilp, String server)
          Notify the newsletter to internal subscribers
 String[] notifyManagers(InfoLetterPublicationPdC ilp, String server)
          Send letter to managers
 void retourUserPanel()
           
 String[] sendByMailToExternalSubscribers(InfoLetterPublicationPdC ilp, String server)
          Send letter by mail to external subscribers
 String[] sendLetterByMail(InfoLetterPublicationPdC ilp, String server, Set<String> emails)
          Send letter by mail
 void suscribeUser()
           
 void unsuscribeUser()
           
 void updateContentInfoLetterPublication(String content, InfoLetterPublicationPdC ilp)
          save wysiwyg content of the newsletter
 void updateInfoLetter(InfoLetter ie)
           
 void updateInfoLetterPublication(InfoLetterPublicationPdC ilp)
           
 void updateTemplate(InfoLetterPublicationPdC ilp)
           
 
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getAlertUser, getClipboardCount, getClipboardErrorMessage, getClipboardExceptionError, getClipboardName, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameters, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getFavoriteSpace, getGenericPanel, getHighestSilverpeasUserRole, getIcon, getLanguage, getLastResults, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getServerNameAndPort, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserAvailSpaceIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoleLevel, getUserRoles, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardError, setClipboardSelectedElement, setComponentRootName, setFavoriteSpaceToMainSessionController, setGenericPanel, setIconFileName, setLastResults, setMultilangFileName, setResourceFileName, setSpaceModeMaintenance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPORT_CSV_NAME

public static final String EXPORT_CSV_NAME
See Also:
Constant Field Values
Constructor Detail

InfoLetterSessionController

public InfoLetterSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
                                   com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
Standard Session Controller Constructeur

Parameters:
mainSessionCtrl - The user's profile
componentContext - The component's profile
See Also:
Method Detail

initUserPanel

public String initUserPanel()
                     throws InfoLetterException
Throws:
InfoLetterException

retourUserPanel

public void retourUserPanel()

updateInfoLetter

public void updateInfoLetter(InfoLetter ie)

getInfoLetters

public List<InfoLetter> getInfoLetters()

getInfoLetterPublications

public List<InfoLetterPublication> getInfoLetterPublications(com.stratelia.webactiv.util.WAPrimaryKey letterPK)

createInfoLetterPublication

public void createInfoLetterPublication(InfoLetterPublicationPdC ilp)
                                 throws IOException
Throws:
IOException

deleteInfoLetterPublication

public void deleteInfoLetterPublication(com.stratelia.webactiv.util.WAPrimaryKey pk)

updateInfoLetterPublication

public void updateInfoLetterPublication(InfoLetterPublicationPdC ilp)

getInfoLetterPublication

public InfoLetterPublicationPdC getInfoLetterPublication(com.stratelia.webactiv.util.WAPrimaryKey publiPK)

getNotificationMessageTemplate

protected com.silverpeas.util.template.SilverpeasTemplate getNotificationMessageTemplate()

notifyInternalSuscribers

public void notifyInternalSuscribers(InfoLetterPublicationPdC ilp,
                                     String server)
Notify the newsletter to internal subscribers

Parameters:
ilp - the infoletter to send
server -

sendLetterByMail

public String[] sendLetterByMail(InfoLetterPublicationPdC ilp,
                                 String server,
                                 Set<String> emails)
Send letter by mail

Parameters:
ilp -
server -
emails -
Returns:
tab of dest emails in error

sendByMailToExternalSubscribers

public String[] sendByMailToExternalSubscribers(InfoLetterPublicationPdC ilp,
                                                String server)
Send letter by mail to external subscribers

Parameters:
ilp -
server -
Returns:
tab of emails in error

notifyManagers

public String[] notifyManagers(InfoLetterPublicationPdC ilp,
                               String server)
Send letter to managers

Parameters:
ilp -
server -
Returns:

getEmailsExternalsSuscribers

public Set<String> getEmailsExternalsSuscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK)

addExternalsSuscribers

public void addExternalsSuscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK,
                                   String newmails)

deleteExternalsSuscribers

public void deleteExternalsSuscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK,
                                      String[] mails)

deleteAllExternalsSuscribers

public void deleteAllExternalsSuscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
Remove all external emails

Parameters:
letterPK -

suscribeUser

public void suscribeUser()

unsuscribeUser

public void unsuscribeUser()

isSuscriber

public boolean isSuscriber()

updateTemplate

public void updateTemplate(InfoLetterPublicationPdC ilp)

copyWYSIWYG

public void copyWYSIWYG(String publicationSource,
                        String target)

isTemplateExist

public boolean isTemplateExist(InfoLetterPublicationPdC ilp)

getTemplate

public String getTemplate(InfoLetterPublicationPdC ilp)

createIndex

public void createIndex(InfoLetterPublicationPdC ilp)

createIndex

public void createIndex(InfoLetter il)

isPdcUsed

public boolean isPdcUsed()

importCsvEmails

public void importCsvEmails(org.apache.commons.fileupload.FileItem filePart)
                     throws com.stratelia.webactiv.util.exception.UtilTrappedException,
                            InfoLetterPeasTrappedException,
                            InfoLetterException
Import Csv emails

Parameters:
filePart -
Throws:
com.stratelia.webactiv.util.exception.UtilTrappedException
InfoLetterPeasTrappedException
InfoLetterException

exportCsvEmails

public boolean exportCsvEmails()
                        throws IOException,
                               InfoLetterException
Export Csv emails

Returns:
boolean
Throws:
IOException
InfoLetterException

isNewsLetterSendByMail

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

Returns:
boolean

updateContentInfoLetterPublication

public void updateContentInfoLetterPublication(String content,
                                               InfoLetterPublicationPdC ilp)
save wysiwyg content of the newsletter

Parameters:
content -
ilp -


Copyright © 2016 Silverpeas. All Rights Reserved.