Class WhatsNewPortletService

java.lang.Object
fr.paris.lutece.plugins.whatsnew.service.portlet.WhatsNewPortletService

public class WhatsNewPortletService extends Object
WhatsNewPortletService
  • Constructor Details

    • WhatsNewPortletService

      public WhatsNewPortletService()
  • Method Details

    • getInstance

      public static WhatsNewPortletService getInstance()
      Return the ThemeService singleton
      Returns:
      the ThemeService singleton
    • init

      public void init()
      Init
    • getPortlet

      public WhatsNewPortlet getPortlet(int nPortletId)
      Get the portlet with the given portlet id
      Parameters:
      nPortletId - the portlet id
      Returns:
      a WhatsNewPortlet
    • getPortletTypeId

      public String getPortletTypeId()
      Get the portlet type id
      Returns:
      the portlet type id
    • create

      public void create(WhatsNewPortlet portlet)
      Create a new WhatsNewPortlet
      Parameters:
      portlet - a WhatsNewPortlet
    • update

      public void update(WhatsNewPortlet portlet)
      Parameters:
      portlet - a WhatsNewPortlet
    • remove

      public void remove(WhatsNewPortlet portlet)
      Parameters:
      portlet - a WhatsNewPortlet
    • selectAll

      public List<WhatsNewPortlet> selectAll()
      Select all WhatsNewPortlet
      Returns:
      a list of WhatsNewPortlet
    • getPageIdsFromWhatsNewId

      public List<Integer> getPageIdsFromWhatsNewId(int nWhatsNewPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load all page IDs associated to the given whatNewPortletId
      Parameters:
      nWhatsNewPortletId - the ID of the portlet
      plugin - Plugin
      Returns:
      a list of page IDs
    • getPortletIdsFromWhatsNewId

      public List<Integer> getPortletIdsFromWhatsNewId(int nWhatsNewPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load all portlet IDs associated to the given whatsNewPortletId
      Parameters:
      nWhatsNewPortletId - the ID of the portlet
      plugin - Plugin
      Returns:
      a list of portlet IDs
    • getDocumentsFromWhatsNewId

      public List<PortletDocumentLink> getDocumentsFromWhatsNewId(int nWhatsNewPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load all the documents associated to the given whatsnewPortletId
      Parameters:
      nWhatsNewPortletId - the ID of the portlet
      plugin - Plugin
      Returns:
      a list of PortletDocumentLink
    • createModeratedPage

      public void createModeratedPage(int nWhatsNewPortletId, int nPageId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a link between a whatsnew portlet and a page
      Parameters:
      nWhatsNewPortletId - the ID of the portlet
      nPageId - the page ID
      plugin - Plugin
    • createModeratedPortlet

      public void createModeratedPortlet(int nWhatsNewPortletId, int nPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a link between a whatsnew portlet and a portlet
      Parameters:
      nWhatsNewPortletId - the ID of the whatsnew portlet
      nPortletId - the ID of the portlet
      plugin - Plugin
    • createModeratedDocument

      public void createModeratedDocument(int nWhatsNewPortletId, PortletDocumentLink pdLink, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a link between a document and a whatsnew portlet
      Parameters:
      nWhatsNewPortletId - the ID of the whatsnew portlet
      pdLink - PortletDocumentLink
      plugin - Plugin
    • removeModeratedElements

      public void removeModeratedElements(WhatsNewPortlet portlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove all the moderated elements from the given portlet
      Parameters:
      portlet - the WhatsNewPortlet
      plugin - Plugin
    • removeModeratedPages

      public void removeModeratedPages(WhatsNewPortlet whatsNewPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete all links of a whatsnew portlet to the pages
      Parameters:
      whatsNewPortlet - the portlet
      plugin - Plugin
    • removeModeratedPortlets

      public void removeModeratedPortlets(WhatsNewPortlet whatsNewPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete all links of a whatsnew portlet to the portlets
      Parameters:
      whatsNewPortlet - the portlet
      plugin - Plugin
    • removeModeratedDocuments

      public void removeModeratedDocuments(WhatsNewPortlet whatsNewPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete all links of a whatsnew portlet to the documents
      Parameters:
      whatsNewPortlet - the portlet
      plugin - Plugin
    • removeModeratedPage

      public void removeModeratedPage(int nWhatsNewPortletId, int nPageId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a link between a whatsnew portlet and a page
      Parameters:
      nWhatsNewPortletId - the ID of the portlet
      nPageId - the page ID
      plugin - Plugin
    • removeModeratedPortlet

      public void removeModeratedPortlet(int nWhatsNewPortletId, int nPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a link between a whatsnew portlet and a portlet
      Parameters:
      nWhatsNewPortletId - the ID of the whatsnew portlet
      nPortletId - the ID of the portlet
      plugin - Plugin
    • removeModeratedDocument

      public void removeModeratedDocument(int nWhatsNewPortletId, PortletDocumentLink pdLink, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a link between a whatsnew portlet and a document
      Parameters:
      nWhatsNewPortletId - the ID of the portlet
      pdLink - PortletDocumentLink
      plugin - Plugin