Class BlogPublicationHome
- java.lang.Object
-
- fr.paris.lutece.plugins.blog.business.portlet.BlogPublicationHome
-
public class BlogPublicationHome extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcountPublicationByIdBlogAndDate(int nIdBlog, java.util.Date date)Counts the number of valid publication of a blog at a given date.static BlogPublicationcreate(BlogPublication blogPub)Create an instance of the BlogPublication classstatic BlogPublicationfindDocPublicationByPimaryKey(int nPortletId, int nDocId)load a BlogPublication by Blog id and portlet idstatic java.util.Collection<BlogPublication>findSinceDatePublishingAndStatus(java.util.Date datePublishing, java.util.Date dateEndPublishing, int nStatus)Find the list ofBlogPublicationobjects specified the status and published at or after the specified datestatic java.util.List<BlogPublication>getAllDocPublication()Load all BlogPublicationstatic java.util.List<BlogPublication>getDocPublicationByIdDoc(int nDocId)load a list BlogPublication by the Blog identifiantstatic java.util.List<BlogPublication>getDocPublicationByPortlet(int nIdPortlet)load a list BlogPublication by the portlet idstatic java.util.List<BlogPublication>getDocPublicationByPortletAndPlublicationDate(int nIdPortlet, java.util.Date datePublishing, java.util.Date dateEndPublishing)Retrieve all blogs by Portlet and between publication dates.static java.util.List<java.lang.Integer>getLastPublishedDocumentsIdsListByPortletIds(int[] nPortletsIds, java.util.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 dateUpdatedstatic java.util.List<java.lang.Integer>getPublishedBlogsIdsListByPortletIds(int[] nPortletsIds, java.util.Date datePublishing, java.util.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.static voidremove(int nIdDoc, int nIdPortlet)Delete the BlogPublication by the primary keystatic voidremoveByBlogId(int nIdDoc)Delete the BlogPublication by the blog idstatic voidremoveByIdPortlet(int nIdPortlet)Delete the BlogPublication by portlet idstatic voidupdate(BlogPublication blogPub)Update an instance of the BlogPublication
-
-
-
Method Detail
-
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 java.util.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 java.util.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 java.util.List<BlogPublication> getDocPublicationByPortletAndPlublicationDate(int nIdPortlet, java.util.Date datePublishing, java.util.Date dateEndPublishing)
Retrieve all blogs by Portlet and between publication dates.- Parameters:
nIdPortlet- The portlet iddatePublishing- The publication datedateEndPublishing- 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 idnDocId- 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 idnIdPortlet- 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 java.util.List<BlogPublication> getAllDocPublication()
Load all BlogPublication- Returns:
- list BlogPublication
-
findSinceDatePublishingAndStatus
public static java.util.Collection<BlogPublication> findSinceDatePublishingAndStatus(java.util.Date datePublishing, java.util.Date dateEndPublishing, int nStatus)
Find the list ofBlogPublicationobjects specified the status and published at or after the specified date- Parameters:
datePublishing- The publication datedateEndPublishing- The end publication datenStatus- The status- Returns:
- The
BlogPublicationobjectsCollectionordered by BlogOrder ascending. The list is empty if no objects found.
-
getPublishedBlogsIdsListByPortletIds
public static java.util.List<java.lang.Integer> getPublishedBlogsIdsListByPortletIds(int[] nPortletsIds, java.util.Date datePublishing, java.util.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 dateplugin- The Blog plugin- Returns:
- The list of Blogs id.
-
getLastPublishedDocumentsIdsListByPortletIds
public static java.util.List<java.lang.Integer> getLastPublishedDocumentsIdsListByPortletIds(int[] nPortletsIds, java.util.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 updatedplugin- The plugin- Returns:
- The list of Blogs id.
-
countPublicationByIdBlogAndDate
public static int countPublicationByIdBlogAndDate(int nIdBlog, java.util.Date date)Counts the number of valid publication of a blog at a given date.- Parameters:
nIdBlog- The blog iddate- The date- Returns:
- The count
-
-