Class DocumentContentService

java.lang.Object
fr.paris.lutece.portal.service.content.ContentService
fr.paris.lutece.plugins.document.service.DocumentContentService

public class DocumentContentService extends fr.paris.lutece.portal.service.content.ContentService
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the Content Service name
    getPage(jakarta.servlet.http.HttpServletRequest request, int nMode)
    Returns the document page for a given document and a given portlet.
    boolean
    isInvoked(jakarta.servlet.http.HttpServletRequest request)
    Analyzes request parameters to see if the request should be handled by the current Content Service
    void
     
    static void
    removeDocumentFromCache(int nDocumentId)
    Removes every page of a document from the cache (any portlet, locale and mode): the document was published, unpublished, modified, archived or moved.
    void
    removeFromCache(String strDocumentId, String strPortletId)
    Remove a document from the cache

    Methods inherited from class fr.paris.lutece.portal.service.content.ContentService

    getPluginName, setPluginName

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DocumentContentService

      public DocumentContentService()
  • Method Details

    • getPage

      public String getPage(jakarta.servlet.http.HttpServletRequest request, int nMode) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.message.SiteMessageException
      Returns the document page for a given document and a given portlet. The page is built from XML data or retrieved from the cache if it's enable and the document in it.
      Specified by:
      getPage in class fr.paris.lutece.portal.service.content.ContentService
      Parameters:
      request - The HTTP request.
      nMode - The current mode.
      Returns:
      The HTML code of the page as a String.
      Throws:
      fr.paris.lutece.portal.service.security.UserNotSignedException - If the user is not signed
      fr.paris.lutece.portal.service.message.SiteMessageException - occurs when a site message need to be displayed
    • isInvoked

      public boolean isInvoked(jakarta.servlet.http.HttpServletRequest request)
      Analyzes request parameters to see if the request should be handled by the current Content Service
      Specified by:
      isInvoked in class fr.paris.lutece.portal.service.content.ContentService
      Parameters:
      request - The HTTP request
      Returns:
      true if this ContentService should handle this request
    • getName

      public String getName()
      Returns the Content Service name
      Specified by:
      getName in class fr.paris.lutece.portal.service.content.ContentService
      Returns:
      The name as a String
    • removeDocumentFromCache

      public static void removeDocumentFromCache(int nDocumentId)
      Removes every page of a document from the cache (any portlet, locale and mode): the document was published, unpublished, modified, archived or moved. Its generation is removed, so its pages are no longer read and expire; the removal reaches the other instances even if the cache is disabled or not used yet on this one.
      Parameters:
      nDocumentId - the document id
    • removeFromCache

      public void removeFromCache(String strDocumentId, String strPortletId)
      Remove a document from the cache
      Parameters:
      strDocumentId - the document id
      strPortletId - the portlet id
    • loachInit

      public void loachInit()