Package org.opencms.site.xmlsitemap
Class CmsXmlSitemapActionElement
java.lang.Object
org.opencms.jsp.CmsJspBean
org.opencms.jsp.CmsJspActionElement
org.opencms.site.xmlsitemap.CmsXmlSitemapActionElement
Action element class for displaying the XML sitemap from a JSP.
-
Field Summary
Fields inherited from class org.opencms.jsp.CmsJspActionElement
NOT_INITIALIZED
-
Constructor Summary
ConstructorDescriptionCmsXmlSitemapActionElement
(javax.servlet.jsp.PageContext pageContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Constructor, with parameters. -
Method Summary
Modifier and TypeMethodDescriptionstatic CmsXmlSitemapGenerator
createSitemapGenerator
(String className, 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 Details
-
m_configuration
The configuration bean.
-
-
Constructor Details
-
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 Details
-
createSitemapGenerator
public static CmsXmlSitemapGenerator createSitemapGenerator(String className, 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
Displays either the generated sitemap.xml or the generated robots.txt, depending on the configuration.- Throws:
Exception
- if something goes wrong
-