Class SeoMixin.Builder

All Implemented Interfaces:
RestBuilder<SeoMixin.Builder>
Enclosing class:
SeoMixin

Builder for SeoMixin instances.

Extends RestMixin.Builder so the mixin's bespoke robots/sitemap setters chain with true covariant returns alongside the inherited RestBuildersurface (e.g. path, roleGuard).

  • Constructor Details

  • Method Details

    • robotsAllow

      public SeoMixin.Builder robotsAllow(String userAgent, String... paths)
      Adds an Allow rule to the robots policy.

      Multiple invocations append rules in order. The first call to either robotsAllow(...) or robotsDisallow(...) replaces the deny-all default; subsequent calls continue to append.

      Parameters:
      userAgent - The user agent (e.g. "*" or "Googlebot"). Must not be null or blank.
      paths - Allowed path prefixes (e.g. "/"). At least one path is required.
      Returns:
      This object.
    • robotsDisallow

      public SeoMixin.Builder robotsDisallow(String userAgent, String... paths)
      Adds a Disallow rule to the robots policy.
      Parameters:
      userAgent - The user agent (e.g. "*"). Must not be null or blank.
      paths - Disallowed path prefixes. At least one path is required.
      Returns:
      This object.
    • robotsTxt

      Sets a fully-formed robots.txt body, overriding any rule-builder calls.

      Useful when the desired policy doesn't fit the simple allow/disallow/per-user-agent shape of robotsAllow(...) / robotsDisallow(...) (e.g. when including Sitemap: or Crawl-delay: directives).

      Parameters:
      value - The full robots.txt body. Must not be null.
      Returns:
      This object.
    • sitemapEntry

      Adds a sitemap entry with only the loc URL.
      Parameters:
      url - The fully-qualified URL.
      Returns:
      This object.
    • sitemapEntry

      public SeoMixin.Builder sitemapEntry(String url, ZonedDateTime lastmod, String changefreq, Double priority)
      Adds a sitemap entry with optional lastmod, changefreq, and priority components.
      Parameters:
      url - The fully-qualified URL.
      lastmod - The last-modified instant (or null to omit).
      changefreq - Change-frequency hint (e.g. "weekly", "daily"; or null to omit).
      priority - Priority value 0.0..1.0 (or null to omit).
      Returns:
      This object.
    • build

      public SeoMixin build()
      Builds a SeoMixin instance.
      Overrides:
      build in class RestMixin.Builder<SeoMixin,SeoMixin.Builder>
      Returns:
      A configured instance.