fr.paris.lutece.plugins.newsletter.business
Interface INewsLetterDAO

All Known Implementing Classes:
NewsLetterDAO

public interface INewsLetterDAO

The interface representing the business methods data layer must implement


Method Summary
 void associateNewsLetterDocumentList(int nNewsLetterId, int nDocumentListId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Associate a new topic to a newsletter
 boolean checkLinkedPortlet(int nIdNewsletter)
          Checks whether a portlet uses the newsletter
 boolean checkPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check the unicity of the primary key
 void delete(int nNewsLetterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove a record from the table
 void deleteNewsLetterDocumentList(int nNewsLetterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the relationship between a newsletter and the list of documents
 void deleteOldUnconfirmed(java.sql.Timestamp confirmLimitDate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Performs confirm unsubscription process
 void deleteSubscriber(int nNewsLetterId, int nSubscriberId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the subscriber's inscription to a newsletter
 void insert(NewsLetter newsLetter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 void insertSubscriber(int nNewsLetterId, int nSubscriberId, boolean bValidate, java.sql.Timestamp tToday, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new subscriber for a newsletter
 void insertSubscriber(int nNewsLetterId, int nSubscriberId, java.sql.Timestamp tToday, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new subscriber for a newsletter
 boolean isRegistered(int nNewsLetterId, int nSubscriberId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          check if the subscriber is not yet registered to a newsletter
 boolean isTemplateUsed(int nTemplateId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          controls that a template is used by a newsletter
 NewsLetter load(int nNewsLetterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the data of the newsletter from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generate a new primary key to add a newsletter
 java.util.Collection<NewsLetter> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Select the list of the newsletters available
 fr.paris.lutece.util.ReferenceList selectAllId(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Select the list of the newsletters available
 java.lang.String selectDocumentList(int nPortletId)
          loads the list of document from a specific portlet
 java.util.Collection<fr.paris.lutece.plugins.document.business.Document> selectDocumentsByDateAndList(int nCategoryId, java.sql.Timestamp dateLastSending)
          Select the list of documents published since the last sending of the newsletter
 fr.paris.lutece.util.ReferenceList selectDocumentTypePortlets()
          Returns the list of the portlets which are document portlets
 int selectNbrActiveSubscribers(int nNewsLetterId, java.lang.String strSearchString, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Counts the active subscribers for a newsletter
 int selectNbrSubscribers(int nNewsLetterId, java.lang.String strSearchString, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Counts the subscribers for a newsletter
 int[] selectNewsletterCategoryIds(int nNewsletterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the list of categories linked to the newsletter
 void store(NewsLetter newsLetter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 void validateSubscriber(int nNewsLetterId, int nSubscriberId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Updates a subscriber for a newsletter
 

Method Detail

insert

void insert(NewsLetter newsLetter,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Parameters:
newsLetter - the object to insert
plugin - the Plugin

delete

void delete(int nNewsLetterId,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a record from the table

Parameters:
nNewsLetterId - the newsletter identifier
plugin - the Plugin

load

NewsLetter load(int nNewsLetterId,
                fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the data of the newsletter from the table

Parameters:
nNewsLetterId - the newsletter identifier
plugin - the Plugin
Returns:
the object inserted

store

void store(NewsLetter newsLetter,
           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Parameters:
newsLetter - the object to be updated
plugin - the Plugin

checkPrimaryKey

boolean checkPrimaryKey(int nKey,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check the unicity of the primary key

Parameters:
nKey - the key to be checked
plugin - the Plugin
Returns:
true if the identifier exist and false if not

checkLinkedPortlet

boolean checkLinkedPortlet(int nIdNewsletter)
Checks whether a portlet uses the newsletter

Parameters:
nIdNewsletter - the id of the newsletter
Returns:
true if the newsletter is used

newPrimaryKey

int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generate a new primary key to add a newsletter

Parameters:
plugin - the Plugin
Returns:
the new key

selectAll

java.util.Collection<NewsLetter> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select the list of the newsletters available

Parameters:
plugin - the Plugin
Returns:
a collection of objects

selectAllId

fr.paris.lutece.util.ReferenceList selectAllId(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select the list of the newsletters available

Parameters:
plugin - the Plugin
Returns:
a ReferenceList of id and name

insertSubscriber

void insertSubscriber(int nNewsLetterId,
                      int nSubscriberId,
                      java.sql.Timestamp tToday,
                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new subscriber for a newsletter

Parameters:
nNewsLetterId - the newsletter identifier
nSubscriberId - the subscriber identifier
tToday - The day
plugin - the Plugin

deleteOldUnconfirmed

void deleteOldUnconfirmed(java.sql.Timestamp confirmLimitDate,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Performs confirm unsubscription process

Parameters:
confirmLimitDate - all unconfirmed subscriber which subscription date is below confirmLimitDate will be deleted
plugin - the plugin

insertSubscriber

void insertSubscriber(int nNewsLetterId,
                      int nSubscriberId,
                      boolean bValidate,
                      java.sql.Timestamp tToday,
                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new subscriber for a newsletter

Parameters:
nNewsLetterId - the newsletter identifier
nSubscriberId - the subscriber identifier
bValidate - the validation status
tToday - The day
plugin - the Plugin

validateSubscriber

void validateSubscriber(int nNewsLetterId,
                        int nSubscriberId,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Updates a subscriber for a newsletter

Parameters:
nNewsLetterId - the newsletter identifier
nSubscriberId - the subscriber identifier
plugin - the Plugin

deleteSubscriber

void deleteSubscriber(int nNewsLetterId,
                      int nSubscriberId,
                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the subscriber's inscription to a newsletter

Parameters:
nNewsLetterId - the newsletter identifier
nSubscriberId - the subscriber identifier
plugin - the Plugin

isRegistered

boolean isRegistered(int nNewsLetterId,
                     int nSubscriberId,
                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
check if the subscriber is not yet registered to a newsletter

Parameters:
nNewsLetterId - the newsletter identifier
nSubscriberId - the subscriber identifier
plugin - the Plugin
Returns:
true if he is registered and false if not

isTemplateUsed

boolean isTemplateUsed(int nTemplateId,
                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
controls that a template is used by a newsletter

Parameters:
nTemplateId - the template identifier
plugin - the Plugin
Returns:
true if the template is used, false if not

selectDocumentList

java.lang.String selectDocumentList(int nPortletId)
loads the list of document from a specific portlet

Parameters:
nPortletId - the portlet identifier identifier
Returns:
the name of the topic

selectNewsletterCategoryIds

int[] selectNewsletterCategoryIds(int nNewsletterId,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the list of categories linked to the newsletter

Parameters:
nNewsletterId - the newsletter identifier
plugin - the plugin
Returns:
the array of categories id

associateNewsLetterDocumentList

void associateNewsLetterDocumentList(int nNewsLetterId,
                                     int nDocumentListId,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Associate a new topic to a newsletter

Parameters:
nNewsLetterId - the newsletter identifier
nDocumentListId - the topic identifier
plugin - the Plugin

deleteNewsLetterDocumentList

void deleteNewsLetterDocumentList(int nNewsLetterId,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the relationship between a newsletter and the list of documents

Parameters:
nNewsLetterId - the newsletter identifier
plugin - the Plugin

selectDocumentsByDateAndList

java.util.Collection<fr.paris.lutece.plugins.document.business.Document> selectDocumentsByDateAndList(int nCategoryId,
                                                                                                      java.sql.Timestamp dateLastSending)
Select the list of documents published since the last sending of the newsletter

Parameters:
nCategoryId - The id of the category
dateLastSending - the date of the last newsletter sending
Returns:
a list of documents

selectNbrSubscribers

int selectNbrSubscribers(int nNewsLetterId,
                         java.lang.String strSearchString,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Counts the subscribers for a newsletter

Parameters:
nNewsLetterId - the newsletter newsletter
strSearchString - the string to search in the subscriber's email
plugin - the Plugin
Returns:
the number of subscribers

selectNbrActiveSubscribers

int selectNbrActiveSubscribers(int nNewsLetterId,
                               java.lang.String strSearchString,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Counts the active subscribers for a newsletter

Parameters:
nNewsLetterId - the newsletter newsletter
strSearchString - the string to search in the subscriber's email
plugin - the Plugin
Returns:
the number of subscribers

selectDocumentTypePortlets

fr.paris.lutece.util.ReferenceList selectDocumentTypePortlets()
Returns the list of the portlets which are document portlets

Returns:
the list in form of a Collection object


Copyright © 2010 Mairie de Paris. All Rights Reserved.