Class NewsletterBlogService
- java.lang.Object
-
- fr.paris.lutece.plugins.newsletter.modules.blog.service.NewsletterBlogService
-
public class NewsletterBlogService extends java.lang.ObjectNewsletter blog service. This class implements the singleton design pattern.
-
-
Constructor Summary
Constructors Constructor Description NewsletterBlogService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringfillTemplateWithDocumentInfos(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 datajava.lang.StringfillTemplateWithDocumentInfos(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 datajava.lang.StringgenerateDocumentsList(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 datestatic NewsletterBlogServicegetInstance()Returns the instance of the singletonfr.paris.lutece.util.ReferenceListgetPortletBlogList()Load the portlet of type blog_LIST
-
-
-
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 generatenTemplateId- the document id to usedatePublishing- minimum date of publishing of documents. Documents published before this date will not be consideredstrBaseUrl- the url of the portaluser- The current admin userlocale- 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 portalstrTemplatePath- The path of the template filelistBlogs- the object gathering the document datalocale- the locale used to build the templateuser- 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 portalstrTemplateFilekey- The id of the template filelistBlogs- the object gathering the document datalocale- the locale used to build the templateuser- 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:
-
-