Class ThemeManifest

java.lang.Object
org.codelibs.fess.theme.ThemeManifest

public final class ThemeManifest extends Object
Parsed representation of a static theme's theme.yml manifest.

Use parse(InputStream) to build an instance; the parser performs structural and value validation and throws ThemeManifestException on any failure.

  • Field Details

    • CURRENT_API_VERSION

      public static final String CURRENT_API_VERSION
      Required apiVersion value for theme manifests.
      See Also:
    • KIND

      public static final String KIND
      Required kind value for theme manifests.
      See Also:
    • NAME_PATTERN

      public static final Pattern NAME_PATTERN
      Regex enforced on the theme name field (spec §4.2).
    • SEMVER_PATTERN

      public static final Pattern SEMVER_PATTERN
      Regex enforced on the theme version field (subset of SemVer 2.0).
  • Method Details

    • parse

      public static ThemeManifest parse(InputStream in)
      Parses and validates a theme.yml document.
      Parameters:
      in - input stream containing the YAML manifest; the caller retains ownership of closing it
      Returns:
      a validated manifest instance
      Throws:
      ThemeManifestException - if the YAML cannot be parsed or fails schema validation
    • getApiVersion

      public String getApiVersion()
      Returns the manifest apiVersion.
      Returns:
      the apiVersion value
    • getKind

      public String getKind()
      Returns the manifest kind.
      Returns:
      the kind value
    • getName

      public String getName()
      Returns the theme directory name.
      Returns:
      the theme name
    • getDisplayName

      public String getDisplayName()
      Returns the human-readable display name.
      Returns:
      the display name
    • getVersion

      public String getVersion()
      Returns the SemVer version string.
      Returns:
      the version string
    • getAuthor

      public String getAuthor()
      Returns the optional author field.
      Returns:
      the author, or null when absent
    • getDescription

      public String getDescription()
      Returns the optional description.
      Returns:
      the description, or null when absent
    • getLicense

      public String getLicense()
      Returns the optional license identifier.
      Returns:
      the license, or null when absent
    • getHomepage

      public String getHomepage()
      Returns the optional homepage URL.
      Returns:
      the homepage URL, or null when absent
    • getMinFessVersion

      public String getMinFessVersion()
      Returns the minimum supported Fess version.
      Returns:
      the minimum Fess version, or null when unspecified
    • getSupportedLocales

      public List<String> getSupportedLocales()
      Returns the list of supported locales.
      Returns:
      the supported locales (never null, may be empty)
    • getEntry

      public String getEntry()
      Returns the entry-point file (defaults to index.html).
      Returns:
      the entry-point file path
    • isSpaFallback

      public boolean isSpaFallback()
      Returns whether SPA-style fallback to the entry file is enabled.
      Returns:
      true when SPA fallback is enabled