atg.commerce.sitemap
Class CatalogSitemapGenerator
java.lang.Object
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.sitemap.DynamicSitemapGenerator
atg.commerce.sitemap.CatalogSitemapGenerator
- All Implemented Interfaces:
- NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, SitemapGenerator, java.util.EventListener
public class CatalogSitemapGenerator
- extends DynamicSitemapGenerator
Extension of DynamicSitemapGenerator to be used with custom catalogs.
Some properties of repository items in custom catalogs are dynamically
derived based on the current profile's catalog. As sitemap generators are
used outside the scope of a request or a session so profile object is not
available during sitemaps generating. This extension sets current context catalog
to allow custom catalog derived properties to be resolved outside of request scope.
Context catalog is determined as default catalog for passed site ID. If not site ID is
specified then configured 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 component
Field Summary |
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
DEFAULT_LOG_TRACE_STATUS |
Methods inherited from class atg.sitemap.DynamicSitemapGenerator |
generateSitemap, generateSitemapUrls, generateSitemapUrls, getChangeFrequency, getItemDescriptorName, getNumberOfItemsPerTransaction, getPriority, getQuery, getSitemapFilePrefix, getSitemapURL, getSitemapURL, getSortDirectives, getSourceRepository, getTemplate, getTransactionManager, getUrlParameterLookup, getUrlPrefix, getWebApp, populateUrlParameters, setChangeFrequency, setItemDescriptorName, setNumberOfItemsPerTransaction, setPriority, setSitemapFilePrefix, setSourceRepository, setTemplate, setTransactionManager, setUrlPrefix, setWebApp |
Methods inherited from class atg.nucleus.GenericService |
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, 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, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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 |
CLASS_VERSION
public static java.lang.String CLASS_VERSION
- Class version string
CatalogSitemapGenerator
public CatalogSitemapGenerator()
getContextCatalog
public java.lang.String getContextCatalog()
- Returns:
- catalog ID to use for resolving custom catalog properties
setContextCatalog
public void setContextCatalog(java.lang.String pContextCatalog)
- Parameters:
ContextCatalog
- catalog ID to use for resolving custom catalog properties
getCatalogRepository
public Repository getCatalogRepository()
- Returns:
- the Catalog Repository
setCatalogRepository
public void setCatalogRepository(Repository pCatalogRepository)
- Parameters:
the
- Catalog Repository
setCatalogProperties
public void setCatalogProperties(CatalogProperties pCatalogProperties)
- Parameters:
the
- class that holds the names of all catalog properties
getCatalogProperties
public CatalogProperties getCatalogProperties()
- Returns:
- the class that holds the names of all catalog properties
getCatalogTools
public CustomCatalogTools getCatalogTools()
- Returns:
- the Catalog tools
setCatalogTools
public void setCatalogTools(CustomCatalogTools pCatalogTools)
- Parameters:
the
- Catalog tools
preGenerateSitemapUrls
protected void preGenerateSitemapUrls(SitemapGeneratorService pSitemapGeneratorService,
java.lang.String pSiteId)
- Overrides
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.
- Overrides:
preGenerateSitemapUrls
in class DynamicSitemapGenerator
- Parameters:
pSitemapGeneratorService
- Sitemap Generator service that holds global settings
for sitemap generating.pSiteId
- site ID for which sitemap is generated.
getDefaultCatalogForSite
protected RepositoryItem getDefaultCatalogForSite(java.lang.String pSiteId,
SitemapGeneratorService pSitemapGeneratorService)
throws RepositoryException
- Returns default catalog for a specified site ID.
- Parameters:
pSiteId
- site IDpSitemapGeneratorService
- Sitemap Generator service component
- Returns:
- default catalog for a specified site ID.
- Throws:
RepositoryException