Class BlogPublicationHome
java.lang.Object
fr.paris.lutece.plugins.blog.business.portlet.BlogPublicationHome
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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>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.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 dateUpdatedgetPublishedBlogsIdsListByPortletIds(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 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 Details
-
create
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
Update an instance of the BlogPublication- Parameters:
blogPub-
-
getDocPublicationByIdDoc
load a list BlogPublication by the Blog identifiant- Parameters:
nDocId- The Blog id- Returns:
- list of BlogPublication
-
getDocPublicationByPortlet
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
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
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
Counts the number of valid publication of a blog at a given date.- Parameters:
nIdBlog- The blog iddate- The date- Returns:
- The count
-