public class SitemapIndexGenerator extends GenericService
This is an example what will be generated:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>http://www.example.com/sitemap1.xml</loc>
</sitemap>
<sitemap>
<loc>http://www.example.com/sitemap2.xml</loc>
</sitemap>
</sitemapindex>
The loc tag identifies the location of the Sitemap.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
SitemapIndexGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
generateSitemapIndex(SitemapGeneratorService pSitemapGeneratorService)
This method generates index for sitemaps and write this index
into sitemap repository.
|
java.lang.String |
getSiteIndexFilename()
Returns Sitemap index filename.
|
java.lang.String |
getSitemapUrl(RepositoryItem pSitemap,
SitemapPropertiesManager pSitemapPropertiesManager)
Gets full sitemap URL for specified sitemap repository item.
|
java.lang.String |
getUrlPrefix()
Returns URL prefix to the application with protocol, host, port
|
WebApp |
getWebApp()
Returns representation of web application in
WebApp. |
void |
setSiteIndexFilename(java.lang.String pSiteIndexFilename)
Sets Sitemap index filename.
|
void |
setUrlPrefix(java.lang.String pUrlPrefix)
Sets new URL prefix to the application with protocol, host, port
|
void |
setWebApp(WebApp pWebApp)
Sets new WebApp component.
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic java.lang.String getSiteIndexFilename()
public void setSiteIndexFilename(java.lang.String pSiteIndexFilename)
the - Sitemap index filenamepublic java.lang.String getUrlPrefix()
public void setUrlPrefix(java.lang.String pUrlPrefix)
UrlPrefix - new URL prefix to the application with protocol, host, portpublic WebApp getWebApp()
WebApp.public void setWebApp(WebApp pWebApp)
WebApp - new WebApp componentpublic void generateSitemapIndex(SitemapGeneratorService pSitemapGeneratorService)
We retrieve all sitemap items, build sitemap entry for each of them, and write sitemap index file into sitemap repository.
public java.lang.String getSitemapUrl(RepositoryItem pSitemap, SitemapPropertiesManager pSitemapPropertiesManager)
pSitemap - sitemap repository itempSitemapPropertiesManager - sitemap properties manager