Class NewsletterBlogService


  • public class NewsletterBlogService
    extends java.lang.Object
    Newsletter blog service. This class implements the singleton design pattern.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String fillTemplateWithDocumentInfos​(java.lang.Integer strTemplateFilekey, java.util.Collection<fr.paris.lutece.plugins.blog.business.Blog> listBlogs, java.util.Locale locale, java.lang.String strBaseUrl, fr.paris.lutece.portal.business.user.AdminUser user)
      Fills a given document template with the document data
      java.lang.String fillTemplateWithDocumentInfos​(java.lang.String strTemplatePath, java.util.Collection<fr.paris.lutece.plugins.blog.business.Blog> listBlogs, java.util.Locale locale, java.lang.String strBaseUrl, fr.paris.lutece.portal.business.user.AdminUser user)
      Fills a given document template with the document data
      java.lang.String generateDocumentsList​(NewsletterBlog newsletterDocument, int nTemplateId, java.sql.Timestamp datePublishing, java.lang.String strBaseUrl, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)
      Generate the html code for documents corresponding to the documents associated with the topic and to a given publishing date
      static NewsletterBlogService getInstance()
      Returns the instance of the singleton
      fr.paris.lutece.util.ReferenceList getPortletBlogList()
      Load the portlet of type blog_LIST
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NewsletterBlogService

        public NewsletterBlogService()
    • Method Detail

      • getInstance

        public static NewsletterBlogService getInstance()
        Returns the instance of the singleton
        Returns:
        The instance of the singleton
      • generateDocumentsList

        public java.lang.String generateDocumentsList​(NewsletterBlog newsletterDocument,
                                                      int nTemplateId,
                                                      java.sql.Timestamp datePublishing,
                                                      java.lang.String strBaseUrl,
                                                      fr.paris.lutece.portal.business.user.AdminUser user,
                                                      java.util.Locale locale)
        Generate the html code for documents corresponding to the documents associated with the topic and to a given publishing date
        Parameters:
        newsletterDocument - the topic to generate
        nTemplateId - the document id to use
        datePublishing - minimum date of publishing of documents. Documents published before this date will not be considered
        strBaseUrl - the url of the portal
        user - The current admin user
        locale - The locale
        Returns:
        the html code for the document list of null if no document template available
      • fillTemplateWithDocumentInfos

        public java.lang.String fillTemplateWithDocumentInfos​(java.lang.String strTemplatePath,
                                                              java.util.Collection<fr.paris.lutece.plugins.blog.business.Blog> listBlogs,
                                                              java.util.Locale locale,
                                                              java.lang.String strBaseUrl,
                                                              fr.paris.lutece.portal.business.user.AdminUser user)
        Fills a given document template with the document data
        Parameters:
        strBaseUrl - The base url of the portal
        strTemplatePath - The path of the template file
        listBlogs - the object gathering the document data
        locale - the locale used to build the template
        user - The current user
        Returns:
        the html code corresponding to the document data
      • fillTemplateWithDocumentInfos

        public java.lang.String fillTemplateWithDocumentInfos​(java.lang.Integer strTemplateFilekey,
                                                              java.util.Collection<fr.paris.lutece.plugins.blog.business.Blog> listBlogs,
                                                              java.util.Locale locale,
                                                              java.lang.String strBaseUrl,
                                                              fr.paris.lutece.portal.business.user.AdminUser user)
        Fills a given document template with the document data
        Parameters:
        strBaseUrl - The base url of the portal
        strTemplateFilekey - The id of the template file
        listBlogs - the object gathering the document data
        locale - the locale used to build the template
        user - The current user
        Returns:
        the html code corresponding to the document data
      • getPortletBlogList

        public fr.paris.lutece.util.ReferenceList getPortletBlogList()
        Load the portlet of type blog_LIST
        Returns: