Class SiteMapBuilder

java.lang.Object
org.broadleafcommerce.common.sitemap.service.SiteMapBuilder

public class SiteMapBuilder extends Object
Handles creating the various sitemap files.
Author:
bpolster
  • Field Details

    • LOG

      protected static final org.apache.commons.logging.Log LOG
    • fileWorkArea

      protected FileWorkArea fileWorkArea
    • siteMapConfig

      protected SiteMapConfiguration siteMapConfig
    • currentURLSetWrapper

      protected SiteMapURLSetWrapper currentURLSetWrapper
    • indexedFileNames

      protected List<String> indexedFileNames
    • baseUrl

      protected String baseUrl
    • gzipSiteMapFiles

      protected boolean gzipSiteMapFiles
  • Constructor Details

  • Method Details

    • addUrl

      public void addUrl(SiteMapURLWrapper urlWrapper)
      Returns the SiteMapURLSetWrapper that a Generator should use to add its next URL element.
    • persistXMLDocument

      protected void persistXMLDocument(String fileName, Object xmlObject)
      Method takes in a valid JAXB object (e.g. has a RootElement) and persists it to the temporary directory associated with this builder.
      Parameters:
      fileName -
    • persistIndexedURLSetWrapper

      protected void persistIndexedURLSetWrapper(SiteMapURLSetWrapper urlSetWrapper)
      Save the passed in URL set to a new indexed file.
    • persistNonIndexedSiteMap

      protected void persistNonIndexedSiteMap()
      Save the passed in URL set to a non-indexed file.
    • persistIndexedSiteMap

      protected void persistIndexedSiteMap()
      Save the site map index file.
    • createNextIndexedFileName

      protected String createNextIndexedFileName()
      Create the name of the indexed files. For example, sitemap1.xml, sitemap2.xml, etc.
      Returns:
    • persistSiteMap

      protected void persistSiteMap()
    • getIndexedFileNames

      public List<String> getIndexedFileNames()
    • getBaseUrl

      public String getBaseUrl()