Package org.opencms.site.xmlsitemap
Class CmsXmlSitemapActionElement
- java.lang.Object
-
- org.opencms.jsp.CmsJspBean
-
- org.opencms.jsp.CmsJspActionElement
-
- org.opencms.site.xmlsitemap.CmsXmlSitemapActionElement
-
public class CmsXmlSitemapActionElement extends CmsJspActionElement
Action element class for displaying the XML sitemap from a JSP.
-
-
Field Summary
Fields Modifier and Type Field Description protected CmsXmlSeoConfiguration
m_configuration
The configuration bean.-
Fields inherited from class org.opencms.jsp.CmsJspActionElement
NOT_INITIALIZED
-
-
Constructor Summary
Constructors Constructor Description CmsXmlSitemapActionElement(javax.servlet.jsp.PageContext pageContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Constructor, with parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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.static CmsXmlSitemapGenerator
prepareSitemapGenerator(CmsResource seoFileRes, CmsXmlSeoConfiguration config)
Constructs an XML sitemap generator given an XML sitemap configuration file.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, handleMissingFlexController, init, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptions
-
-
-
-
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 objectrequest
- the JSP requestresponse
- the JSP response
-
-
Method Detail
-
createSitemapGenerator
public static 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 defaultfolderRootPath
- the root path of the start folder for the sitemap- Returns:
- the sitemap generator instance
- Throws:
CmsException
- if something goes wrong
-
prepareSitemapGenerator
public static CmsXmlSitemapGenerator prepareSitemapGenerator(CmsResource seoFileRes, CmsXmlSeoConfiguration config) throws CmsException
Constructs an XML sitemap generator given an XML sitemap configuration file.- Parameters:
seoFileRes
- the sitemap XML fileconfig
- the parsed configuration- Returns:
- the sitemap generator, or null if the given configuration is not an XML sitemap configuration
- Throws:
CmsException
- 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
-
-