Class NewsletterBlogHome
- java.lang.Object
-
- fr.paris.lutece.plugins.newsletter.modules.blog.business.NewsletterBlogHome
-
public final class NewsletterBlogHome extends java.lang.ObjectHome for newsletter document
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidassociateNewsLetterDocumentCategory(int nTopicId, int nDocumentTagId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Associate a blogs category to a newsletter topicstatic voidassociateNewsLetterDocumentPortlet(int nTopicId, int nPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Associate a new portlet to a newsletter topicstatic voidcreateDocumentTopic(NewsletterBlog topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new newsletter blogs topic into the databasestatic voiddeleteDocumentTopic(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a newsletter blogs topic from the databasestatic NewsletterBlogfindByPrimaryKey(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get a newsletter blogs topic from its idstatic int[]findNewsletterPortletsIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)loads the list of blogs list portlets linked to the newsletterstatic int[]findNewsletterTagIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)loads the list of categories of the newsletterstatic booleanfindTemplate(int nIdNewsletterTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a template is used by a topicstatic fr.paris.lutece.util.ReferenceListgetAllTag(fr.paris.lutece.portal.business.user.AdminUser user)Fetches all the tags definedstatic java.util.List<java.lang.Integer>getPublishedDocumentsIdsListByPortletIds(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 voidremoveNewsLetterDocumentPortlet(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove the relationship between a topic and the list of portletsstatic voidremoveNewsLetterDocumentTags(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Removes the relationship between a list of blogs categories and a newsletter topicstatic voidupdateDocumentTopic(NewsletterBlog topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update a newsletter blogs topic
-
-
-
Method Detail
-
findByPrimaryKey
public static NewsletterBlog findByPrimaryKey(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get a newsletter blogs topic from its id- Parameters:
nIdTopic- the id of the topic to getplugin- The plugin- Returns:
- The topic, or null if no topic was found
-
updateDocumentTopic
public static void updateDocumentTopic(NewsletterBlog topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a newsletter blogs topic- Parameters:
topic- The topic to updateplugin- The plugin
-
deleteDocumentTopic
public static void deleteDocumentTopic(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a newsletter blogs topic from the database- Parameters:
nIdTopic- The id of the newsletter blogs topic to removeplugin- The plugin
-
createDocumentTopic
public static void createDocumentTopic(NewsletterBlog topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new newsletter blogs topic into the database- Parameters:
topic- The newsletter blogs topic to insertplugin- the plugin
-
getAllTag
public static fr.paris.lutece.util.ReferenceList getAllTag(fr.paris.lutece.portal.business.user.AdminUser user)
Fetches all the tags defined- Parameters:
user- the current user- Returns:
- A list of all tags
-
associateNewsLetterDocumentCategory
public static void associateNewsLetterDocumentCategory(int nTopicId, int nDocumentTagId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Associate a blogs category to a newsletter topic- Parameters:
nTopicId- the topic identifiernDocumentTagId- the id of the blogs tag to associateplugin- the Plugin
-
removeNewsLetterDocumentTags
public static void removeNewsLetterDocumentTags(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Removes the relationship between a list of blogs categories and a newsletter topic- Parameters:
nTopicId- the newsletter identifierplugin- the Plugin
-
findNewsletterTagIds
public static int[] findNewsletterTagIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)loads the list of categories of the newsletter- Parameters:
nTopicId- the topic identifierplugin- the plugin- Returns:
- the array of categories id
-
associateNewsLetterDocumentPortlet
public static void associateNewsLetterDocumentPortlet(int nTopicId, int nPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Associate a new portlet to a newsletter topic- Parameters:
nTopicId- the topic idnPortletId- the portlet identifierplugin- the newsletter blogs plugin
-
removeNewsLetterDocumentPortlet
public static void removeNewsLetterDocumentPortlet(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove the relationship between a topic and the list of portlets- Parameters:
nTopicId- the topic idplugin- the newsletter blogs plugin
-
findNewsletterPortletsIds
public static int[] findNewsletterPortletsIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)loads the list of blogs list portlets linked to the newsletter- Parameters:
nTopicId- the topic identifierplugin- the plugin- Returns:
- the array of portlets id
-
getPublishedDocumentsIdsListByPortletIds
public static java.util.List<java.lang.Integer> getPublishedDocumentsIdsListByPortletIds(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- TODOplugin- The document plugin- Returns:
- The list of documents id.
-
findTemplate
public static boolean findTemplate(int nIdNewsletterTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a template is used by a topic- Parameters:
nIdNewsletterTemplate- The id of the templateplugin- The newsletter plugin- Returns:
- True if the template is used by a topic, false otherwise
-
-