public class CatalogSitemapGenerator extends DynamicSitemapGenerator
contextCatalog
property is used to get
the value of default catalog.
This class is intended to be used when generating sitemaps for dynamic URLs
using indirect URL templates along with custom catalogs.
Some additional properties should be specified for CatalogSitemapGenerator
component in comparison with DynamicSitemapGenerator
component:
- contextCatalog - catalog id to use for resolving custom catalog derived properties.
- catalogRepository - path to catalog repository component
- catalogProperties - path to component that holds the names of all catalog properties
- catalogTools - path custom catalog tools componentModifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
SITEMAP_FOOTER
SERVICE_INFO_KEY
MAX_SITEMAPS, MAX_SIZE, MAX_URLS, NUCLEUS_SERVLET_PATH
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
CatalogSitemapGenerator() |
Modifier and Type | Method and Description |
---|---|
CatalogProperties |
getCatalogProperties() |
Repository |
getCatalogRepository() |
CustomCatalogTools |
getCatalogTools() |
java.lang.String |
getContextCatalog() |
protected RepositoryItem |
getDefaultCatalogForSite(java.lang.String pSiteId,
SitemapGeneratorService pSitemapGeneratorService)
Returns default catalog for a specified site ID.
|
protected void |
preGenerateSitemapUrls(SitemapGeneratorService pSitemapGeneratorService,
java.lang.String pSiteId)
Overrides
DynamicSytemapGenerator preGenerateSitemapUrls
method to set current context catalog before generating sitemaps. |
void |
setCatalogProperties(CatalogProperties pCatalogProperties) |
void |
setCatalogRepository(Repository pCatalogRepository) |
void |
setCatalogTools(CustomCatalogTools pCatalogTools) |
void |
setContextCatalog(java.lang.String pContextCatalog) |
cutServletPathFromSitemapURL, generateSitemap, generateSitemapUrls, generateSitemapUrls, getChangeFrequency, getItemDescriptorName, getNumberOfItemsPerTransaction, getPriority, getQuery, getSitemapFilePrefix, getSitemapURL, getSitemapURL, getSortDirectives, getSourceRepository, getTemplate, getTransactionManager, getUrlParameterLookup, getUrlPrefix, getWebApp, isNeedServletPathOnSitemapURL, populateUrlParameters, setChangeFrequency, setItemDescriptorName, setNeedServletPathOnSitemapURL, setNumberOfItemsPerTransaction, setPriority, setSitemapFilePrefix, setSourceRepository, setTemplate, setTransactionManager, setUrlPrefix, setWebApp
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
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public java.lang.String getContextCatalog()
public void setContextCatalog(java.lang.String pContextCatalog)
ContextCatalog
- catalog ID to use for resolving custom catalog propertiespublic Repository getCatalogRepository()
public void setCatalogRepository(Repository pCatalogRepository)
the
- Catalog Repositorypublic void setCatalogProperties(CatalogProperties pCatalogProperties)
the
- class that holds the names of all catalog propertiespublic CatalogProperties getCatalogProperties()
public CustomCatalogTools getCatalogTools()
public void setCatalogTools(CustomCatalogTools pCatalogTools)
the
- Catalog toolsprotected void preGenerateSitemapUrls(SitemapGeneratorService pSitemapGeneratorService, java.lang.String pSiteId)
DynamicSytemapGenerator
preGenerateSitemapUrls
method to set current context catalog before generating sitemaps. If site ID is specified
the current catalog is set to default catalog for a site, otherwise the configured
default context catalog is used.preGenerateSitemapUrls
in class DynamicSitemapGenerator
pSitemapGeneratorService
- Sitemap Generator service that holds global settings
for sitemap generating.pSiteId
- site ID for which sitemap is generated.protected RepositoryItem getDefaultCatalogForSite(java.lang.String pSiteId, SitemapGeneratorService pSitemapGeneratorService) throws RepositoryException
pSiteId
- site IDpSitemapGeneratorService
- Sitemap Generator service componentRepositoryException