com.stratelia.silverpeas.infoLetter.implementation
Class InfoLetterDataManager

java.lang.Object
  extended by com.stratelia.silverpeas.infoLetter.implementation.InfoLetterDataManager
All Implemented Interfaces:
InfoLetterDataInterface

public class InfoLetterDataManager
extends Object
implements InfoLetterDataInterface

Class declaration

Author:

Constructor Summary
InfoLetterDataManager()
           
 
Method Summary
 InfoLetter createDefaultLetter(String componentId)
          Create a default Info Letter when instanciated
 void createInfoLetter(InfoLetter il)
          Implementation of InfoLetterDataInterface interface
 void createInfoLetterPublication(InfoLetterPublicationPdC ilp, String userId)
          Create information letter publication
 void deleteInfoLetterPublication(com.stratelia.webactiv.util.WAPrimaryKey pk, String componentId)
          Delete information letter publication
 Set<String> getEmailsExternalsSuscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
           
 InfoLetter getInfoLetter(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
          Retrieve an information letter from his primary key
 InfoLetterPublicationPdC getInfoLetterPublication(com.stratelia.webactiv.util.WAPrimaryKey publiPK)
          Retrieve information letter publication from his key
 List<InfoLetterPublication> getInfoLetterPublications(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
          Retrieve information letter publications
 List<InfoLetter> getInfoLetters(String instanceId)
          Retrieve information letters
 com.silverpeas.subscribe.util.SubscriptionSubscriberList getInternalSuscribers(String componentId)
           
 int getSilverObjectId(String pubId, String componentId)
           
 void initTemplate(String componentId, com.stratelia.webactiv.util.WAPrimaryKey letterPK, String userId)
           
 boolean isUserSuscribed(String userId, String componentId)
          Check if use is an internal subscriber of the information letter
 Connection openConnection()
          open connection
 Set<String> sendLetterByMail(InfoLetterPublicationPdC ilp, String server, String mimeMultipart, Set<String> listEmailDest, String subject, String emailFrom)
          Send letter by mail
 void setEmailsExternalsSubscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK, Set<String> emails)
          Save external subscriber emails address
 void setInternalSuscribers(String componentId, com.stratelia.webactiv.beans.admin.UserDetail[] users, com.stratelia.webactiv.beans.admin.Group[] groups)
          Update internal user subscribers list
 void toggleSuscriber(String userId, String componentId, boolean isUserSubscribing)
           
 void updateInfoLetter(InfoLetter ie)
          Update information letter
 void updateInfoLetterPublication(InfoLetterPublicationPdC ilp)
          Update information letter publication
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfoLetterDataManager

public InfoLetterDataManager()
Method Detail

createInfoLetter

public void createInfoLetter(InfoLetter il)
Implementation of InfoLetterDataInterface interface

Specified by:
createInfoLetter in interface InfoLetterDataInterface
Parameters:
il - the information letter to create

updateInfoLetter

public void updateInfoLetter(InfoLetter ie)
Description copied from interface: InfoLetterDataInterface
Update information letter

Specified by:
updateInfoLetter in interface InfoLetterDataInterface
Parameters:
ie - the information letter to update

getInfoLetters

public List<InfoLetter> getInfoLetters(String instanceId)
Description copied from interface: InfoLetterDataInterface
Retrieve information letters

Specified by:
getInfoLetters in interface InfoLetterDataInterface
Parameters:
instanceId - the application identifier
Returns:
the information letters of the current application identifier given in parameter

getInfoLetterPublications

public List<InfoLetterPublication> getInfoLetterPublications(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
Description copied from interface: InfoLetterDataInterface
Retrieve information letter publications

Specified by:
getInfoLetterPublications in interface InfoLetterDataInterface
Parameters:
letterPK - the information letter primary key
Returns:
the list of information letter publications of an information letter

createInfoLetterPublication

public void createInfoLetterPublication(InfoLetterPublicationPdC ilp,
                                        String userId)
Description copied from interface: InfoLetterDataInterface
Create information letter publication

Specified by:
createInfoLetterPublication in interface InfoLetterDataInterface
Parameters:
ilp - the information letter publication pdc to create
userId - the creator user identifier

deleteInfoLetterPublication

public void deleteInfoLetterPublication(com.stratelia.webactiv.util.WAPrimaryKey pk,
                                        String componentId)
Description copied from interface: InfoLetterDataInterface
Delete information letter publication

Specified by:
deleteInfoLetterPublication in interface InfoLetterDataInterface
Parameters:
pk - the information letter publication primary key
componentId - the component identifier

updateInfoLetterPublication

public void updateInfoLetterPublication(InfoLetterPublicationPdC ilp)
Description copied from interface: InfoLetterDataInterface
Update information letter publication

Specified by:
updateInfoLetterPublication in interface InfoLetterDataInterface
Parameters:
ilp - the information letter publication to update

getInfoLetter

public InfoLetter getInfoLetter(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
Description copied from interface: InfoLetterDataInterface
Retrieve an information letter from his primary key

Specified by:
getInfoLetter in interface InfoLetterDataInterface
Parameters:
letterPK - the letter primary key
Returns:
the infirmation letter

getInfoLetterPublication

public InfoLetterPublicationPdC getInfoLetterPublication(com.stratelia.webactiv.util.WAPrimaryKey publiPK)
Description copied from interface: InfoLetterDataInterface
Retrieve information letter publication from his key

Specified by:
getInfoLetterPublication in interface InfoLetterDataInterface
Parameters:
publiPK - the information letter publication primary key
Returns:
an Information Letter Publication PdC

createDefaultLetter

public InfoLetter createDefaultLetter(String componentId)
Description copied from interface: InfoLetterDataInterface
Create a default Info Letter when instanciated

Specified by:
createDefaultLetter in interface InfoLetterDataInterface
Parameters:
componentId - the component identifier
Returns:
a default Info Letter

getSilverObjectId

public int getSilverObjectId(String pubId,
                             String componentId)
Specified by:
getSilverObjectId in interface InfoLetterDataInterface

getInternalSuscribers

public com.silverpeas.subscribe.util.SubscriptionSubscriberList getInternalSuscribers(String componentId)
Specified by:
getInternalSuscribers in interface InfoLetterDataInterface
Parameters:
componentId - componentId component instance id
Returns:
map of subscriber ids indexed by type of subscriber

setInternalSuscribers

public void setInternalSuscribers(String componentId,
                                  com.stratelia.webactiv.beans.admin.UserDetail[] users,
                                  com.stratelia.webactiv.beans.admin.Group[] groups)
Description copied from interface: InfoLetterDataInterface
Update internal user subscribers list

Specified by:
setInternalSuscribers in interface InfoLetterDataInterface
Parameters:
componentId - componentId component instance id

getEmailsExternalsSuscribers

public Set<String> getEmailsExternalsSuscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
Specified by:
getEmailsExternalsSuscribers in interface InfoLetterDataInterface

setEmailsExternalsSubscribers

public void setEmailsExternalsSubscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK,
                                          Set<String> emails)
Description copied from interface: InfoLetterDataInterface
Save external subscriber emails address

Specified by:
setEmailsExternalsSubscribers in interface InfoLetterDataInterface
Parameters:
letterPK - the letter primary key
emails - the list of external emails to save

toggleSuscriber

public void toggleSuscriber(String userId,
                            String componentId,
                            boolean isUserSubscribing)
Specified by:
toggleSuscriber in interface InfoLetterDataInterface

isUserSuscribed

public boolean isUserSuscribed(String userId,
                               String componentId)
Description copied from interface: InfoLetterDataInterface
Check if use is an internal subscriber of the information letter

Specified by:
isUserSuscribed in interface InfoLetterDataInterface
Parameters:
userId - the user identifier
Returns:
true if user is a subscriber, false else if

initTemplate

public void initTemplate(String componentId,
                         com.stratelia.webactiv.util.WAPrimaryKey letterPK,
                         String userId)
Specified by:
initTemplate in interface InfoLetterDataInterface

openConnection

public Connection openConnection()
                          throws InfoLetterException
open connection

Specified by:
openConnection in interface InfoLetterDataInterface
Returns:
Connection
Throws:
InfoLetterException
Since:
26 Fevrier 2002

sendLetterByMail

public Set<String> sendLetterByMail(InfoLetterPublicationPdC ilp,
                                    String server,
                                    String mimeMultipart,
                                    Set<String> listEmailDest,
                                    String subject,
                                    String emailFrom)
Description copied from interface: InfoLetterDataInterface
Send letter by mail

Specified by:
sendLetterByMail in interface InfoLetterDataInterface
Parameters:
ilp - the information letter
Returns:
list of emails in error


Copyright © 2016 Silverpeas. All Rights Reserved.