Class BlogPublicationHome

java.lang.Object
fr.paris.lutece.plugins.blog.business.portlet.BlogPublicationHome

public class BlogPublicationHome extends Object
  • Method Details

    • create

      public static BlogPublication create(BlogPublication blogPub)
      Create an instance of the BlogPublication class
      Parameters:
      blogPub - The instance of the BlogPublication which contains the informations to store
      Returns:
      The instance of BlogPub which has been created.
    • update

      public static void update(BlogPublication blogPub)
      Update an instance of the BlogPublication
      Parameters:
      blogPub -
    • getDocPublicationByIdDoc

      public static List<BlogPublication> getDocPublicationByIdDoc(int nDocId)
      load a list BlogPublication by the Blog identifiant
      Parameters:
      nDocId - The Blog id
      Returns:
      list of BlogPublication
    • getDocPublicationByPortlet

      public static List<BlogPublication> getDocPublicationByPortlet(int nIdPortlet)
      load a list BlogPublication by the portlet id
      Parameters:
      nIdPortlet - The protlet id
      Returns:
      list of BlogPublication
    • getDocPublicationByPortletAndPlublicationDate

      public static List<BlogPublication> getDocPublicationByPortletAndPlublicationDate(int nIdPortlet, Date datePublishing, Date dateEndPublishing)
      Retrieve all blogs by Portlet and between publication dates.
      Parameters:
      nIdPortlet - The portlet id
      datePublishing - The publication date
      dateEndPublishing - The end publication date
      Returns:
      list of BlogPublication
    • findDocPublicationByPimaryKey

      public static BlogPublication findDocPublicationByPimaryKey(int nPortletId, int nDocId)
      load a BlogPublication by Blog id and portlet id
      Parameters:
      nPortletId - The portlet id
      nDocId - The Blogs id
      Returns:
      BlogPublication
    • removeByIdPortlet

      public static void removeByIdPortlet(int nIdPortlet)
      Delete the BlogPublication by portlet id
      Parameters:
      nIdPortlet - The portlet id
    • remove

      public static void remove(int nIdDoc, int nIdPortlet)
      Delete the BlogPublication by the primary key
      Parameters:
      nIdDoc - The Blog id
      nIdPortlet - The portlet id
    • removeByBlogId

      public static void removeByBlogId(int nIdDoc)
      Delete the BlogPublication by the blog id
      Parameters:
      nIdDoc - The Blog id
    • getAllDocPublication

      public static List<BlogPublication> getAllDocPublication()
      Load all BlogPublication
      Returns:
      list BlogPublication
    • findSinceDatePublishingAndStatus

      public static Collection<BlogPublication> findSinceDatePublishingAndStatus(Date datePublishing, Date dateEndPublishing, int nStatus)
      Find the list of BlogPublication objects specified the status and published at or after the specified date
      Parameters:
      datePublishing - The publication date
      dateEndPublishing - The end publication date
      nStatus - The status
      Returns:
      The BlogPublication objects Collection ordered by BlogOrder ascending. The list is empty if no objects found.
    • getPublishedBlogsIdsListByPortletIds

      public static List<Integer> getPublishedBlogsIdsListByPortletIds(int[] nPortletsIds, Date datePublishing, Date dateEndPublishing, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of id of published Blogs associated with a given collection of portlets.
      Parameters:
      nPortletsIds - The list of portlet ids.
      datePublishing -
      dateEndPublishing - The end publication date
      plugin - The Blog plugin
      Returns:
      The list of Blogs id.
    • getLastPublishedDocumentsIdsListByPortletIds

      public static List<Integer> getLastPublishedDocumentsIdsListByPortletIds(int[] nPortletsIds, Date dateUpdated, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of id of published Blogs, associated with a given collection of porlets, which has been updated since the dateUpdated
      Parameters:
      nPortletsIds - The list of portlet ids.
      dateUpdated - The date from the blogs had to be updated
      plugin - The plugin
      Returns:
      The list of Blogs id.
    • countPublicationByIdBlogAndDate

      public static int countPublicationByIdBlogAndDate(int nIdBlog, Date date)
      Counts the number of valid publication of a blog at a given date.
      Parameters:
      nIdBlog - The blog id
      date - The date
      Returns:
      The count