Interface PageTreeSitemapGenerator

All Superinterfaces:
SitemapGenerator

@ProviderType public interface PageTreeSitemapGenerator extends SitemapGenerator
A service that exposes the filters and utility methods the default SitemapGenerator of for pages uses.

It acts as extension point for a delegation pattern implementation, where another SitemapGenerator replaces the default one but needs to use some of its functionality anyway.

  • Method Details

    • shouldInclude

      boolean shouldInclude(@NotNull @NotNull Resource resource)
      Returns true if the given Resource should be included.
      Parameters:
      resource -
      Returns:
      See Also:
      • ResourceTreeSitemapGenerator.shouldInclude(Resource)
    • shouldFollow

      boolean shouldFollow(@NotNull @NotNull Resource resource)
      Returns true if the given Resource should be followed for traversal.
      Parameters:
      resource -
      Returns:
      See Also:
      • ResourceTreeSitemapGenerator.shouldFollow(Resource)
    • getCanonicalUrl

      @Nullable @Nullable String getCanonicalUrl(Page page)
      Returns the canonical url of a given Page.

      This may be the Page's path externalized by the SitemapLinkExternalizer or the canonical url specified by the SeoTags.PN_CANONICAL_URL property.

      Parameters:
      page -
      Returns:
    • getAlternateLanguageLinks

      @NotNull @NotNull Map<Locale,String> getAlternateLanguageLinks(Page page)
      Returns a mapping from Locale to the canonical url for the language alternatives of the given Page.
      Parameters:
      page - the Page get the alternate language links for
      Returns:
      returns the map of alternate language links of the page as it is added to a Sitemap
    • isPublished

      @Deprecated boolean isPublished(Page page)
      Deprecated.
      Returns true when the Page is published.

      When called on Publishers, this is always @code true}.

      Parameters:
      page - the Page to check
      Returns:
      true when the page is published, false otherwise
    • isNoIndex

      @Deprecated boolean isNoIndex(Page page)
      Deprecated.
      Returns true when the Page is set to be not indexed by search engines.
      Parameters:
      page - the Page to check
      Returns:
      true when the page is not to be contained in the Sitemap, false otherwise
    • isRedirect

      @Deprecated boolean isRedirect(Page page)
      Deprecated.
      Returns true when the Page has a redirect target.
      Parameters:
      page - the Page to check
      Returns:
      true when the page is a redirect, false otherwise
    • isProtected

      @Deprecated boolean isProtected(Page page)
      Deprecated.
      Returns true when the Page requires authentication.
      Parameters:
      page - the Page to check
      Returns:
      true when the page is a protected by CUG, false otherwise