Class SitemapService


  • public final class SitemapService
    extends java.lang.Object
    Sitemap Service
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String generateSitemap()
      Generate Sitemap
      static java.io.File getSitemapFile()
      Gets the file the sitemap is written to.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • generateSitemap

        public static java.lang.String generateSitemap()
        Generate Sitemap
        Returns:
        The sitemap content
      • getSitemapFile

        public static java.io.File getSitemapFile()
        Gets the file the sitemap is written to. It lives outside the webapp : the webapp is a build artefact, replaced at every deployment, and a generated file kept there is lost - or, on a site shipping its own sitemap, overwritten. The directory defaults to a subdirectory of the system temporary directory, always writable and harmless since the daemon rebuilds the sitemap anyway ; point seo.generatedFilesPath at a persistent volume to keep it across restarts.
        Returns:
        The sitemap file, whose parent directory may not exist yet