org.opencms.site.xmlsitemap
Class CmsXmlSitemapActionElement

java.lang.Object
  extended by org.opencms.jsp.CmsJspBean
      extended by org.opencms.jsp.CmsJspActionElement
          extended by org.opencms.site.xmlsitemap.CmsXmlSitemapActionElement

public class CmsXmlSitemapActionElement
extends CmsJspActionElement

Action element class for displaying the XML sitemap from a JSP.


Field Summary
protected  CmsXmlSeoConfiguration m_configuration
          The configuration bean.
 
Fields inherited from class org.opencms.jsp.CmsJspActionElement
NOT_INITIALIZED
 
Constructor Summary
CmsXmlSitemapActionElement(javax.servlet.jsp.PageContext pageContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Constructor, with parameters.
 
Method Summary
 CmsXmlSitemapGenerator createSitemapGenerator(java.lang.String className, java.lang.String folderRootPath)
          Creates an XML sitemap generator instance given a class name and the root path for the sitemap.
 void renderXmlSitemap()
          Writes the XML sitemap to the response.
 void run()
          Displays either the generated sitemap.xml or the generated robots.txt, depending on the configuration.
 
Methods inherited from class org.opencms.jsp.CmsJspActionElement
editable, editable, editable, editableManualClose, editableManualOpen, getContent, getContent, getMessages, getMessages, getMessages, getMessages, getNavigation, getNavigationUri, img, img, include, include, include, include, include, include, includeSilent, includeSilent, includeSilent, includeSilent, info, label, link, link, properties, properties, property, property, property, property, template, template, template, toAbsolute, user
 
Methods inherited from class org.opencms.jsp.CmsJspBean
getCmsObject, getController, getJspContext, getMessage, getRequest, getRequestContext, getResponse, handleException, init, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_configuration

protected CmsXmlSeoConfiguration m_configuration
The configuration bean.

Constructor Detail

CmsXmlSitemapActionElement

public CmsXmlSitemapActionElement(javax.servlet.jsp.PageContext pageContext,
                                  javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
Constructor, with parameters.

Parameters:
pageContext - the JSP page context object
request - the JSP request
response - the JSP response
Method Detail

createSitemapGenerator

public CmsXmlSitemapGenerator createSitemapGenerator(java.lang.String className,
                                                     java.lang.String folderRootPath)
                                              throws CmsException
Creates an XML sitemap generator instance given a class name and the root path for the sitemap.

Parameters:
className - the class name of the sitemap generator (may be null for the default
folderRootPath - the root path of the start folder for the sitemap
Returns:
the sitemap generator instance
Throws:
CmsException - if something goes wrong

renderXmlSitemap

public void renderXmlSitemap()
                      throws java.lang.Exception
Writes the XML sitemap to the response.

Throws:
java.lang.Exception - if something goes wrong

run

public void run()
         throws java.lang.Exception
Displays either the generated sitemap.xml or the generated robots.txt, depending on the configuration.

Throws:
java.lang.Exception - if something goes wrong