Class BlogPublicationHome
- java.lang.Object
-
- fr.paris.lutece.plugins.blog.business.portlet.BlogPublicationHome
-
public class BlogPublicationHome extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcountPublicationByIdBlogAndDate(int nIdBlog, 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 Collection<BlogPublication>findSinceDatePublishingAndStatus(Date datePublishing, Date dateEndPublishing, int nStatus)Find the list ofBlogPublicationobjects specified the status and published at or after the specified datestatic List<BlogPublication>getAllDocPublication()Load all BlogPublicationstatic List<BlogPublication>getDocPublicationByIdDoc(int nDocId)load a list BlogPublication by the Blog identifiantstatic List<BlogPublication>getDocPublicationByPortlet(int nIdPortlet)load a list BlogPublication by the portlet idstatic List<BlogPublication>getDocPublicationByPortletAndPlublicationDate(int nIdPortlet, Date datePublishing, Date dateEndPublishing)Retrieve all blogs by Portlet and between publication dates.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 dateUpdatedstatic 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.static voidremove(int nIdDoc, int nIdPortlet)Delete the BlogPublication by the primary keystatic 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 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 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
-
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 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 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 dateplugin- 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 updatedplugin- 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 iddate- The date- Returns:
- The count
-
-