Class NewsletterBlogService

java.lang.Object
fr.paris.lutece.plugins.newsletter.modules.blog.service.NewsletterBlogService

@ApplicationScoped public class NewsletterBlogService extends Object
Newsletter blog service.
  • Constructor Details

    • NewsletterBlogService

      public NewsletterBlogService()
  • Method Details

    • generateDocumentsList

      public String generateDocumentsList(NewsletterBlog newsletterDocument, int nTemplateId, Timestamp datePublishing, String strBaseUrl, fr.paris.lutece.portal.business.user.AdminUser user, 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 String fillTemplateWithDocumentInfos(String strTemplatePath, Collection<fr.paris.lutece.plugins.blog.business.Blog> listBlogs, Locale locale, String strBaseUrl, fr.paris.lutece.portal.business.user.AdminUser user)
      Fills a given document template with the document data.
      Parameters:
      strTemplatePath - The path of the template file
      listBlogs - the object gathering the document data
      locale - the locale used to build the template
      strBaseUrl - The base url of the portal
      user - The current user
      Returns:
      the html code corresponding to the document data
    • fillTemplateWithDocumentInfos

      public String fillTemplateWithDocumentInfos(Integer strTemplateFilekey, Collection<fr.paris.lutece.plugins.blog.business.Blog> listBlogs, Locale locale, String strBaseUrl, fr.paris.lutece.portal.business.user.AdminUser user)
      Fills a given document template (from an uploaded file) with the document data.
      Parameters:
      strTemplateFilekey - The id of the template file
      listBlogs - the object gathering the document data
      locale - the locale used to build the template
      strBaseUrl - The base url of the portal
      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:
      the reference list of portlets of type BLOG_LIST