| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.sitemap.DynamicSitemapGenerator
public class DynamicSitemapGenerator
Sitemap generator service for dynamic items. Typically, this generator should generate sitemap information for repository items which don't have static pages and use page templates, for example products, skus, categories, etc.
This is an example of what will be generated:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.example.com/</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url> </urlset>
The available tags are described below:
For additional information see Sitemap protocol
| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| static java.lang.String | SITEMAP_FOOTER | 
| Fields inherited from class atg.nucleus.GenericService | 
|---|
| SERVICE_INFO_KEY | 
| Fields inherited from interface atg.sitemap.SitemapGenerator | 
|---|
| MAX_SITEMAPS, MAX_SIZE, MAX_URLS | 
| 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 | |
|---|---|
| DynamicSitemapGenerator() | |
| Method Summary | |
|---|---|
|  void | generateSitemap(SitemapGeneratorService pSitemapGeneratorService)This method generates sitemaps. | 
|  void | generateSitemapUrls(java.lang.String pItemDescriptorName,
                    SitemapGeneratorService pSitemapGeneratorService)This method generates sitemap repository items for pItemDescriptorNameIf number of URLs exceeds limits set in MaxSitemapSize or in MaxUrlsPerSitemap
 then generator split up sitemap into several sitemaps. | 
|  void | generateSitemapUrls(java.lang.String pItemDescriptorName,
                    SitemapGeneratorService pSitemapGeneratorService,
                    java.lang.String pSiteId)This method generates sitemap repository items for pItemDescriptorNameIf number of URLs exceeds limits set in MaxSitemapSize or in MaxUrlsPerSitemap
 then generator split up sitemap into several sitemaps. | 
|  java.lang.String | getChangeFrequency()Returns how frequently the page is likely to change. | 
|  java.lang.String | getItemDescriptorName()Returns item descriptor name. | 
|  int | getNumberOfItemsPerTransaction()Returns number of items per transaction. | 
|  java.lang.Float | getPriority()Returns the priority of URL relative to other URLs on site. | 
| protected  Query | getQuery(Repository pRepository,
         java.lang.String pItemDescriptorName)Gets unconstrained query for retrieving all repository items of specified type from repository. | 
|  java.lang.String | getSitemapFilePrefix()Returns sitemap file prefix. | 
|  java.lang.String | getSitemapURL(RepositoryItem pRepositoryItem)Returns sitemap URL for pRepositoryItemgenerated using direct/indirect
 template specified in componentstemplateproperty | 
|  java.lang.String | getSitemapURL(RepositoryItem pRepositoryItem,
              RepositoryItem pSite,
              SitemapGeneratorService pSitemapGeneratorService)Returns sitemap URL for pRepositoryItemgenerated using direct/indirect
 template specified in componentstemplateproperty | 
| protected  SortDirectives | getSortDirectives()Gets sort directives to use for repository items querying from source repository. | 
|  atg.adapter.gsa.GSARepository | getSourceRepository()Returns repository where generator retrieves information to build sitemap. | 
|  UrlTemplate | getTemplate()Returns template used to generate URL for repository item. | 
|  javax.transaction.TransactionManager | getTransactionManager()Returns current transaction manager. | 
| protected  UrlParameterLookup | getUrlParameterLookup(java.lang.String pLookupItemName,
                      RepositoryItem pItem)Creates lookup for URL parameters with item name pLookupItemNameand 
 for the specified 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. | 
| protected  void | populateUrlParameters(UrlParameter[] pParameters,
                      UrlParameterLookup[] pLookups)Finds best matching lookups for URL parameters based on their names and populates parameters with values. | 
| protected  void | preGenerateSitemapUrls(SitemapGeneratorService pSitemapGeneratorService,
                       java.lang.String pSiteId)Configure some context before sitemap generating. | 
|  void | setChangeFrequency(java.lang.String pChangeFrequency)Sets how frequently the page is likely to change. | 
|  void | setItemDescriptorName(java.lang.String pItemDescriptorName)Sets new item descriptor name. | 
|  void | setNumberOfItemsPerTransaction(int pNumberOfItemsPerTransaction)Sets number of items per transaction. | 
|  void | setPriority(java.lang.Float pPriority)Sets the priority of URL relative to other URLs on site. | 
|  void | setSitemapFilePrefix(java.lang.String pSitemapFilePrefix)Sets sitemap file prefix. | 
|  void | setSourceRepository(atg.adapter.gsa.GSARepository pSourceRepository)Sets repository where generator retrieves information to build sitemap. | 
|  void | setTemplate(UrlTemplate pTemplate)Sets new URL template. | 
|  void | setTransactionManager(javax.transaction.TransactionManager pTransactionManager)Sets new TransactionManager. | 
|  void | setUrlPrefix(java.lang.String pUrlPrefix)Sets new URL prefix to the application with protocol, host, port | 
|  void | setWebApp(WebApp pWebApp)Sets new WebAppweb application representation. | 
| 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 | 
|---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String SITEMAP_FOOTER
| Constructor Detail | 
|---|
public DynamicSitemapGenerator()
| Method Detail | 
|---|
public atg.adapter.gsa.GSARepository getSourceRepository()
public void setSourceRepository(atg.adapter.gsa.GSARepository pSourceRepository)
pSourceRepository - source repositorypublic java.lang.String getSitemapFilePrefix()
public void setSitemapFilePrefix(java.lang.String pSitemapFilePrefix)
SitemapFilePrefix - new sitemap file prefix.public java.lang.String getItemDescriptorName()
SourceRepository.public void setItemDescriptorName(java.lang.String pItemDescriptorName)
ItemDescriptorName - item descriptor for items from SourceRepositorypublic javax.transaction.TransactionManager getTransactionManager()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
TransactionManager - new transaction manager instancepublic int getNumberOfItemsPerTransaction()
SourceProperty
public void setNumberOfItemsPerTransaction(int pNumberOfItemsPerTransaction)
SourceProperty
NumberOfItemsPerTransaction - number of items per transaction.public WebApp getWebApp()
WebApp.
public void setWebApp(WebApp pWebApp)
WebApp web application representation.
WebApp - new WebApp componentpublic java.lang.String getUrlPrefix()
public void setUrlPrefix(java.lang.String pUrlPrefix)
UrlPrefix - new URL prefix to the application with protocol, host, portpublic java.lang.Float getPriority()
public void setPriority(java.lang.Float pPriority)
pPriority - the priority of URL relative to other URLs on site.public java.lang.String getChangeFrequency()
public void setChangeFrequency(java.lang.String pChangeFrequency)
pChangeFrequency - how frequently the page is likely to change.public UrlTemplate getTemplate()
ItemDescriptorName
 Both direct and indirect templates can be set here. Use indirect template to 
 generate sitemap with static URLs for repository items like
 http://mywebsite.com/mywebapp/jump/product/12345/Button+collar+Oxford+Shirt/
 
 To generate sitemap with dynamic URLs direct template can be passed here:
 e.g. http://mywebsite.com/mywebapp/browse/productDetail.jsp?productId=12345
public void setTemplate(UrlTemplate pTemplate)
ItemDescriptorName
pTemplate - the UrlTemplate to setpublic void generateSitemap(SitemapGeneratorService pSitemapGeneratorService)
generateSitemap in interface SitemapGenerator
public void generateSitemapUrls(java.lang.String pItemDescriptorName,
                                SitemapGeneratorService pSitemapGeneratorService)
pItemDescriptorName
 If number of URLs exceeds limits set in MaxSitemapSize or in MaxUrlsPerSitemap
 then generator split up sitemap into several sitemaps.
pItemDescriptorName - item descriptor namepSitemapGeneratorService - Sitemap Generator service that hold all global settings
public void generateSitemapUrls(java.lang.String pItemDescriptorName,
                                SitemapGeneratorService pSitemapGeneratorService,
                                java.lang.String pSiteId)
pItemDescriptorName
 If number of URLs exceeds limits set in MaxSitemapSize or in MaxUrlsPerSitemap
 then generator split up sitemap into several sitemaps.
pItemDescriptorName - item descriptor namepSitemapGeneratorService - Sitemap Generator service that hold all global settingspSiteId - site ID for which sitemap should be generated
public java.lang.String getSitemapURL(RepositoryItem pRepositoryItem)
                               throws RepositoryException
pRepositoryItem generated using direct/indirect
 template specified in components template property
pRepositoryItem - repository item
RepositoryException
public java.lang.String getSitemapURL(RepositoryItem pRepositoryItem,
                                      RepositoryItem pSite,
                                      SitemapGeneratorService pSitemapGeneratorService)
                               throws RepositoryException
pRepositoryItem generated using direct/indirect
 template specified in components template property
pRepositoryItem - repository itempSite - Site repository itempSitemapGeneratorService - Sitemap Generator service that holds global settings
RepositoryException
protected UrlParameterLookup getUrlParameterLookup(java.lang.String pLookupItemName,
                                                   RepositoryItem pItem)
pLookupItemName and 
 for the specified repository item.
pLookupItemName - lookup item namepItem - repository item to lookup properties of
protected void populateUrlParameters(UrlParameter[] pParameters,
                                     UrlParameterLookup[] pLookups)
pParameters - array of URL parameterspLookups - array of lookups
protected Query getQuery(Repository pRepository,
                         java.lang.String pItemDescriptorName)
                  throws RepositoryException
pRepository - - source repository.pItemDescriptorName - - name of the item descriptor.
RepositoryExceptionprotected SortDirectives getSortDirectives()
protected void preGenerateSitemapUrls(SitemapGeneratorService pSitemapGeneratorService,
                                      java.lang.String pSiteId)
pSitemapGeneratorService - Sitemap Generator service that holds global settings 
                                 for sitemap generating.pSiteId - site ID for which sitemap is generated.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||