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 -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the Content Service namegetPage(jakarta.servlet.http.HttpServletRequest request, int nMode) Returns the document page for a given document and a given portlet.booleanisInvoked(jakarta.servlet.http.HttpServletRequest request) Analyzes request parameters to see if the request should be handled by the current Content Servicevoidstatic voidremoveDocumentFromCache(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.voidremoveFromCache(String strDocumentId, String strPortletId) Remove a document from the cacheMethods inherited from class fr.paris.lutece.portal.service.content.ContentService
getPluginName, setPluginName
-
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:
getPagein classfr.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 signedfr.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:
isInvokedin classfr.paris.lutece.portal.service.content.ContentService- Parameters:
request- The HTTP request- Returns:
- true if this ContentService should handle this request
-
getName
Returns the Content Service name- Specified by:
getNamein classfr.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
Remove a document from the cache- Parameters:
strDocumentId- the document idstrPortletId- the portlet id
-
loachInit
public void loachInit()
-