fr.paris.lutece.plugins.newsletter.modules.document.business
Interface INewsletterDocumentDAO

All Known Implementing Classes:
NewsletterDocumentDAO

public interface INewsletterDocumentDAO

Interface for NewsletterDocumentDAO


Method Summary
 void associateNewsLetterDocumentCategory(int nTopicId, int nDocumentCategoryId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Associate a new category to a newsletter topic
 void associateNewsLetterDocumentPortlet(int nTopicId, int nPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Associate a new portlet to a newsletter topic
 void createDocumentTopic(NewsletterDocument topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new newsletter document topic into the database
 void deleteDocumentTopic(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove a newsletter document topic from the database
 void deleteNewsLetterDocumentCategories(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the relationship between a topic and the list of documents
 void deleteNewsLetterDocumentPortlet(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the relationship between a topic and the list of portlets
 NewsletterDocument findByPrimaryKey(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get a newsletter document topic from its id
 boolean findTemplate(int nIdNewsletterTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check if a template is used by a topic
 List<Integer> getPublishedDocumentsIdsListByPortletIds(int[] nPortletsIds, Date datePublishing, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of id of published documents associated with a given collection of portlets.
 fr.paris.lutece.util.ReferenceList selectDocumentListPortlets()
          Returns the list of the portlets which are document portlets
 Collection<fr.paris.lutece.plugins.document.business.Document> selectDocumentsByDateAndCategory(int nCategoryId, Timestamp dateLastSending, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Select the list of documents published since the last sending of the newsletter
 int[] selectNewsletterCategoryIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the list of categories linked to the newsletter
 int[] selectNewsletterPortletsIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the list of document list portlets linked to the newsletter
 void updateDocumentTopic(NewsletterDocument topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update a newsletter document topic
 

Method Detail

findByPrimaryKey

NewsletterDocument findByPrimaryKey(int nIdTopic,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get a newsletter document topic from its id

Parameters:
nIdTopic - the id of the topic to get
plugin - The plugin
Returns:
The topic, or null if no topic was found

updateDocumentTopic

void updateDocumentTopic(NewsletterDocument topic,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a newsletter document topic

Parameters:
topic - The topic to update
plugin - The plugin

deleteDocumentTopic

void deleteDocumentTopic(int nIdTopic,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a newsletter document topic from the database

Parameters:
nIdTopic - The id of the newsletter document topic to remove
plugin - The plugin

createDocumentTopic

void createDocumentTopic(NewsletterDocument topic,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new newsletter document topic into the database

Parameters:
topic - The newsletter document topic to insert
plugin - the plugin

selectDocumentsByDateAndCategory

Collection<fr.paris.lutece.plugins.document.business.Document> selectDocumentsByDateAndCategory(int nCategoryId,
                                                                                                Timestamp dateLastSending,
                                                                                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
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
plugin - the document Plugin
Returns:
a list of documents

selectDocumentListPortlets

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

Returns:
the list in form of a Collection object

associateNewsLetterDocumentCategory

void associateNewsLetterDocumentCategory(int nTopicId,
                                         int nDocumentCategoryId,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Associate a new category to a newsletter topic

Parameters:
nTopicId - the topic id
nDocumentCategoryId - the document category identifier
plugin - the newsletter document plugin

deleteNewsLetterDocumentCategories

void deleteNewsLetterDocumentCategories(int nTopicId,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the relationship between a topic and the list of documents

Parameters:
nTopicId - the topic id
plugin - the newsletter document plugin

selectNewsletterCategoryIds

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

Parameters:
nTopicId - the topic id
plugin - the newsletter document plugin
Returns:
the array of categories id

associateNewsLetterDocumentPortlet

void associateNewsLetterDocumentPortlet(int nTopicId,
                                        int nPortletId,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Associate a new portlet to a newsletter topic

Parameters:
nTopicId - the topic id
nPortletId - the portlet identifier
plugin - the newsletter document plugin

deleteNewsLetterDocumentPortlet

void deleteNewsLetterDocumentPortlet(int nTopicId,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the relationship between a topic and the list of portlets

Parameters:
nTopicId - the topic id
plugin - the newsletter document plugin

selectNewsletterPortletsIds

int[] selectNewsletterPortletsIds(int nTopicId,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the list of document list portlets linked to the newsletter

Parameters:
nTopicId - the topic id
plugin - the newsletter document plugin
Returns:
the array of categories id

getPublishedDocumentsIdsListByPortletIds

List<Integer> getPublishedDocumentsIdsListByPortletIds(int[] nPortletsIds,
                                                       Date datePublishing,
                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of id of published documents associated with a given collection of portlets.

Parameters:
nPortletsIds - The list of portlet ids.
datePublishing - TODO
plugin - The document plugin
Returns:
The list of documents id.

findTemplate

boolean findTemplate(int nIdNewsletterTemplate,
                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if a template is used by a topic

Parameters:
nIdNewsletterTemplate - The id of the template
plugin - The newsletter plugin
Returns:
True if the template is used by a topic, false otherwise


Copyright © 2013 Mairie de Paris. All Rights Reserved.