atg.sitemap
Class SitemapIndexGenerator

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.sitemap.SitemapIndexGenerator
All Implemented Interfaces:
atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class SitemapIndexGenerator
extends GenericService

Generates Sitemap index repository item which contains links to all sitemap entries.

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.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
SitemapIndexGenerator()
           
 
Method Summary
 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.
 
Methods inherited from class atg.nucleus.GenericService
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, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

SitemapIndexGenerator

public SitemapIndexGenerator()
Method Detail

getSiteIndexFilename

public java.lang.String getSiteIndexFilename()
Returns Sitemap index filename.

Returns:
the Sitemap index filename

setSiteIndexFilename

public void setSiteIndexFilename(java.lang.String pSiteIndexFilename)
Sets Sitemap index filename.

Parameters:
the - Sitemap index filename

getUrlPrefix

public java.lang.String getUrlPrefix()
Returns URL prefix to the application with protocol, host, port

Returns:
URL prefix to the application with protocol, host, port

setUrlPrefix

public void setUrlPrefix(java.lang.String pUrlPrefix)
Sets new URL prefix to the application with protocol, host, port

Parameters:
UrlPrefix - new URL prefix to the application with protocol, host, port

getWebApp

public WebApp getWebApp()
Returns representation of web application in WebApp.

Returns:
the WebApp - component which represents web application

setWebApp

public void setWebApp(WebApp pWebApp)
Sets new WebApp component.

Parameters:
WebApp - new WebApp component

generateSitemapIndex

public void generateSitemapIndex(SitemapGeneratorService pSitemapGeneratorService)
This method generates index for sitemaps and write this index into sitemap repository.

We retrieve all sitemap items, build sitemap entry for each of them, and write sitemap index file into sitemap repository.


getSitemapUrl

public java.lang.String getSitemapUrl(RepositoryItem pSitemap,
                                      SitemapPropertiesManager pSitemapPropertiesManager)
Gets full sitemap URL for specified sitemap repository item. Resulting URL includes protocol, host, port and context path if they are specified in component's configuration.

Parameters:
pSitemap - sitemap repository item
pSitemapPropertiesManager - sitemap properties manager
Returns:
full sitemap URL.