Class PortletHtmlContent

java.lang.Object
fr.paris.lutece.portal.business.portlet.Portlet
fr.paris.lutece.portal.business.portlet.PortletHtmlContent
All Implemented Interfaces:
XmlContent

public abstract class PortletHtmlContent extends Portlet
Class that allow templates to generate content without using XML and XSL.
  • Constructor Details

    • PortletHtmlContent

      public PortletHtmlContent()
  • Method Details

    • getHtmlContent

      public abstract String getHtmlContent(jakarta.servlet.http.HttpServletRequest request)
      Get the HTML content of the portlet. If the content must be generated from XML and XSL, then this method should return null. This method should only be overrided if the method Portlet.isContentGeneratedByXmlAndXsl() returns true Force to override the default implementation
      Overrides:
      getHtmlContent in class Portlet
      Parameters:
      request - The request
      Returns:
      The HTML content of the portlet, or null if the content is generated from XML and XSL
    • getXml

      public String getXml(jakarta.servlet.http.HttpServletRequest request) throws SiteMessageException
      This method should return the body of an Xml document providing the content
      Parameters:
      request - The HTTP Servlet Request
      Returns:
      string The String
      Throws:
      SiteMessageException - occurs when a site message need to be displayed
    • getXmlDocument

      public String getXmlDocument(jakarta.servlet.http.HttpServletRequest request) throws SiteMessageException
      This method should return the whole Xml document providing the content (including the header)
      Parameters:
      request - The HTTP Servlet Request
      Returns:
      string The String
      Throws:
      SiteMessageException - occurs when a site message need to be displayed
    • isContentGeneratedByXmlAndXsl

      public boolean isContentGeneratedByXmlAndXsl()
      Check if the content of this portlet is generated by xml and xsl, or if it manage its own content generation
      Overrides:
      isContentGeneratedByXmlAndXsl in class Portlet
      Returns:
      True if the content must be generated from XML and XSL, false if it must be generated by the Portlet.getHtmlContent(HttpServletRequest request) method