Class PublishingService
- java.lang.Object
-
- fr.paris.lutece.plugins.blog.service.PublishingService
-
public class PublishingService extends Object
Publishing service
-
-
Constructor Summary
Constructors Constructor Description PublishingService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(int nBlogId, int nPortletId)AssignBlogto aPortletBlogPublicationgetBlogPublication(int nPortletId, int nBlogId)Collection<fr.paris.lutece.portal.business.portlet.Portlet>getBlogsPortlets()Loads the list of portletsCollection<fr.paris.lutece.portal.business.portlet.Portlet>getBlogsPortletstoPublish()Loads the list of portlets blogs empty and blogsliststatic PublishingServicegetInstance()Get the unique instance of the servicestatic List<Integer>getLastPublishedBlogsIdsListByPortletIds(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 dateUpdatedCollection<fr.paris.lutece.portal.business.portlet.Portlet>getPortletsByBlogId(String strBlogId)Loads the list of the portlets whoes contain blog specified by idstatic 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.Collection<Blog>getPublishedBlogsSinceDate(Date datePublishing, Date dateEndPublishing, BlogFilter blogFilter, Locale locale)Loads the list of the blog whose filter and date publication is specified Return published blogs since the publication date.booleanisAssigned(int nBlogId)Check if the specifiedBlogis assigned (unpublished or published) into at least onePortletbooleanisAssigned(int nBlogId, int nPortletId)Check if the specifiedBlogis assigned (unpublished or published) into the specifiedPortletbooleanisPublished(int nBlogId, int nPortletId)Check if the specifiedBlogis published into the specifiedPortletvoidpublish(int nBlogId, int nPortletId)Publishing blogs assigned to a portlet at the begin of the listvoidunAssign(int nBlogId, int nPortletId)unAssignBlogto aPortlet
-
-
-
Method Detail
-
getInstance
public static PublishingService getInstance()
Get the unique instance of the service- Returns:
- The unique instance
-
assign
public void assign(int nBlogId, int nPortletId)AssignBlogto aPortlet- Parameters:
nBlogId- TheBlogidentifiernPortletId- ThePortletidentifier
-
publish
public void publish(int nBlogId, int nPortletId)Publishing blogs assigned to a portlet at the begin of the list- Parameters:
nBlogId- the Blog idnPortletId- the portlet identifier
-
unAssign
public void unAssign(int nBlogId, int nPortletId)unAssignBlogto aPortlet- Parameters:
nBlogId- TheBlogidentifiernPortletId- ThePortletidentifier
-
isPublished
public boolean isPublished(int nBlogId, int nPortletId)Check if the specifiedBlogis published into the specifiedPortlet
-
isAssigned
public boolean isAssigned(int nBlogId)
Check if the specifiedBlogis assigned (unpublished or published) into at least onePortlet
-
isAssigned
public boolean isAssigned(int nBlogId, int nPortletId)Check if the specifiedBlogis assigned (unpublished or published) into the specifiedPortlet
-
getBlogPublication
public BlogPublication getBlogPublication(int nPortletId, int nBlogId)
- Parameters:
nPortletId- thePortletidentifiernBlogId- theBlogidentifier- Returns:
- a
BlogPublicationor null if no object match
-
getBlogsPortlets
public Collection<fr.paris.lutece.portal.business.portlet.Portlet> getBlogsPortlets()
Loads the list of portlets- Returns:
- the
Collectionof the portlets
-
getBlogsPortletstoPublish
public Collection<fr.paris.lutece.portal.business.portlet.Portlet> getBlogsPortletstoPublish()
Loads the list of portlets blogs empty and blogslist- Returns:
- the
Collectionof the portlets
-
getPortletsByBlogId
public Collection<fr.paris.lutece.portal.business.portlet.Portlet> getPortletsByBlogId(String strBlogId)
Loads the list of the portlets whoes contain blog specified by id- Parameters:
strBlogId- the blog identifier- Returns:
- the
Collectionof the portlets
-
getPublishedBlogsSinceDate
public Collection<Blog> getPublishedBlogsSinceDate(Date datePublishing, Date dateEndPublishing, BlogFilter blogFilter, Locale locale)
Loads the list of the blog whose filter and date publication is specified Return published blogs since the publication date. The is also filtered with the blogFilter- Parameters:
datePublishing- The start publication datedateEndPublishing- The end publication dateblogFilter- The filter for the published blog. The filter can be null or empty. The array of Ids will not be taked in account.locale- The locale is used to get the list of blogs with the findByFilter method- Returns:
- the list of the blog in form of a List. return null if datePublishing is null
-
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- The publishing datedateEndPublishing- The publishing end dateplugin- The blog plugin- Returns:
- The list of blogs id.
-
getLastPublishedBlogsIdsListByPortletIds
public static List<Integer> getLastPublishedBlogsIdsListByPortletIds(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.
-
-