com.stratelia.silverpeas.infoLetter.model
Interface InfoLetterDataInterface

All Known Implementing Classes:
InfoLetterDataManager

public interface InfoLetterDataInterface

Interface declaration

Author:

Method Summary
 InfoLetter createDefaultLetter(String componentId)
          Create a default Info Letter when instanciated
 void createInfoLetter(InfoLetter il)
          Create information letter
 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 applicationId)
          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()
          Ouverture de la connection vers la source de donnees
 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 il)
          Update information letter
 void updateInfoLetterPublication(InfoLetterPublicationPdC ilp)
          Update information letter publication
 

Method Detail

openConnection

Connection openConnection()
                          throws InfoLetterException
Ouverture de la connection vers la source de donnees

Returns:
Connection la connection
Throws:
InfoLetterException
Since:
26 Fevrier 2002

createInfoLetter

void createInfoLetter(InfoLetter il)
Create information letter

Parameters:
il - the information letter to create

updateInfoLetter

void updateInfoLetter(InfoLetter il)
Update information letter

Parameters:
il - the information letter to update

getInfoLetters

List<InfoLetter> getInfoLetters(String applicationId)
Retrieve information letters

Parameters:
applicationId - the application identifier
Returns:
the information letters of the current application identifier given in parameter

getInfoLetterPublications

List<InfoLetterPublication> getInfoLetterPublications(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
Retrieve information letter publications

Parameters:
letterPK - the information letter primary key
Returns:
the list of information letter publications of an information letter

createInfoLetterPublication

void createInfoLetterPublication(InfoLetterPublicationPdC ilp,
                                 String userId)
Create information letter publication

Parameters:
ilp - the information letter publication pdc to create
userId - the creator user identifier

deleteInfoLetterPublication

void deleteInfoLetterPublication(com.stratelia.webactiv.util.WAPrimaryKey pk,
                                 String componentId)
Delete information letter publication

Parameters:
pk - the information letter publication primary key
componentId - the component identifier

updateInfoLetterPublication

void updateInfoLetterPublication(InfoLetterPublicationPdC ilp)
Update information letter publication

Parameters:
ilp - the information letter publication to update

getInfoLetter

InfoLetter getInfoLetter(com.stratelia.webactiv.util.WAPrimaryKey letterPK)
Retrieve an information letter from his primary key

Parameters:
letterPK - the letter primary key
Returns:
the infirmation letter

getInfoLetterPublication

InfoLetterPublicationPdC getInfoLetterPublication(com.stratelia.webactiv.util.WAPrimaryKey publiPK)
Retrieve information letter publication from his key

Parameters:
publiPK - the information letter publication primary key
Returns:
an Information Letter Publication PdC

createDefaultLetter

InfoLetter createDefaultLetter(String componentId)
Create a default Info Letter when instanciated

Parameters:
componentId - the component identifier
Returns:
a default Info Letter

getInternalSuscribers

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

setInternalSuscribers

void setInternalSuscribers(String componentId,
                           com.stratelia.webactiv.beans.admin.UserDetail[] users,
                           com.stratelia.webactiv.beans.admin.Group[] groups)
Update internal user subscribers list

Parameters:
componentId - componentId component instance id
users -
groups -

getEmailsExternalsSuscribers

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

setEmailsExternalsSubscribers

void setEmailsExternalsSubscribers(com.stratelia.webactiv.util.WAPrimaryKey letterPK,
                                   Set<String> emails)
Save external subscriber emails address

Parameters:
letterPK - the letter primary key
emails - the list of external emails to save

toggleSuscriber

void toggleSuscriber(String userId,
                     String componentId,
                     boolean isUserSubscribing)

isUserSuscribed

boolean isUserSuscribed(String userId,
                        String componentId)
Check if use is an internal subscriber of the information letter

Parameters:
userId - the user identifier
componentId -
Returns:
true if user is a subscriber, false else if

initTemplate

void initTemplate(String componentId,
                  com.stratelia.webactiv.util.WAPrimaryKey letterPK,
                  String userId)

getSilverObjectId

int getSilverObjectId(String pubId,
                      String componentId)

sendLetterByMail

Set<String> sendLetterByMail(InfoLetterPublicationPdC ilp,
                             String server,
                             String mimeMultipart,
                             Set<String> listEmailDest,
                             String subject,
                             String emailFrom)
Send letter by mail

Parameters:
ilp - the information letter
server -
mimeMultipart -
listEmailDest -
subject -
emailFrom -
Returns:
list of emails in error


Copyright © 2016 Silverpeas. All Rights Reserved.