fr.paris.lutece.portal.business.portlet
Class PortletHtmlContent

java.lang.Object
  extended by fr.paris.lutece.portal.business.portlet.Portlet
      extended by 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.


Field Summary
 
Fields inherited from class fr.paris.lutece.portal.business.portlet.Portlet
FLAG_DISPLAY_ON_LARGE_DEVICE, FLAG_DISPLAY_ON_NORMAL_DEVICE, FLAG_DISPLAY_ON_SMALL_DEVICE, FLAG_DISPLAY_ON_XLARGE_DEVICE, STATUS_PUBLISHED, STATUS_UNPUBLISHED
 
Fields inherited from interface fr.paris.lutece.portal.business.XmlContent
TAG_CHILD_PAGES_LIST, TAG_CURRENT_PAGE_ID, TAG_DISPLAY_ON_LARGE_DEVICE, TAG_DISPLAY_ON_NORMAL_DEVICE, TAG_DISPLAY_ON_SMALL_DEVICE, TAG_DISPLAY_ON_XLARGE_DEVICE, TAG_DISPLAY_PORTLET_TITLE, TAG_MENU, TAG_MENU_INDEX, TAG_MENU_LIST, TAG_MODE, TAG_PAGE, TAG_PAGE_DESCRIPTION, TAG_PAGE_ID, TAG_PAGE_IMAGE, TAG_PAGE_LEVEL, TAG_PAGE_NAME, TAG_PARENT_PAGE_ID, TAG_PLUGIN_NAME, TAG_PORTLET, TAG_PORTLET_ID, TAG_PORTLET_NAME, TAG_SUBLEVEL_INDEX, TAG_SUBLEVEL_MENU, TAG_SUBLEVEL_MENU_LIST
 
Constructor Summary
PortletHtmlContent()
           
 
Method Summary
abstract  String getHtmlContent(javax.servlet.http.HttpServletRequest request)
          Get the HTML content of the portlet.
 String getXml(javax.servlet.http.HttpServletRequest request)
          This method should return the body of an Xml document providing the content
 String getXmlDocument(javax.servlet.http.HttpServletRequest request)
          This method should return the whole Xml document providing the content (including the header)
 boolean isContentGeneratedByXmlAndXsl()
          Check if the content of this portlet is generated by xml and xsl, or if it manage its own content generation
 
Methods inherited from class fr.paris.lutece.portal.business.portlet.Portlet
addPortletTags, canBeCachedForAnonymousUsers, canBeCachedForConnectedUsers, copy, getAcceptAlias, getColumn, getDateUpdate, getDeviceDisplayFlags, getDisplayPortletTitle, getHomeClassName, getId, getName, getOrder, getPageId, getPluginName, getPortletTypeId, getPortletTypeName, getRole, getStatus, getStyleId, getUrlCreation, getUrlUpdate, getXslFile, getXslParams, getXslSource, hasDeviceDisplayFlag, remove, setAcceptAlias, setColumn, setDateUpdate, setDeviceDisplayFlags, setDisplayPortletTitle, setHomeClassName, setId, setName, setOrder, setPageId, setPluginName, setPortletTypeId, setPortletTypeName, setRole, setStatus, setStyleId, setUrlCreation, setUrlUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletHtmlContent

public PortletHtmlContent()
Method Detail

getHtmlContent

public abstract String getHtmlContent(javax.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(javax.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(javax.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


Copyright © 2014 Mairie de Paris. All Rights Reserved.