Package org.codelibs.fess.theme
Class ThemeManifest
java.lang.Object
org.codelibs.fess.theme.ThemeManifest
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringRequiredapiVersionvalue for theme manifests.static final StringRequiredkindvalue for theme manifests.static final PatternRegex enforced on the themenamefield (spec §4.2).static final PatternRegex enforced on the themeversionfield (subset of SemVer 2.0). -
Method Summary
Modifier and TypeMethodDescriptionReturns the manifestapiVersion.Returns the optional author field.Returns the optional description.Returns the human-readable display name.getEntry()Returns the entry-point file (defaults toindex.html).Returns the optional homepage URL.getKind()Returns the manifestkind.Returns the optional license identifier.Returns the minimum supported Fess version.getName()Returns the theme directory name.Returns the list of supported locales.Returns the SemVer version string.booleanReturns whether SPA-style fallback to the entry file is enabled.static ThemeManifestparse(InputStream in) Parses and validates atheme.ymldocument.
-
Field Details
-
CURRENT_API_VERSION
RequiredapiVersionvalue for theme manifests.- See Also:
-
KIND
Requiredkindvalue for theme manifests.- See Also:
-
NAME_PATTERN
Regex enforced on the themenamefield (spec §4.2). -
SEMVER_PATTERN
Regex enforced on the themeversionfield (subset of SemVer 2.0).
-
-
Method Details
-
parse
Parses and validates atheme.ymldocument.- 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
Returns the manifestapiVersion.- Returns:
- the apiVersion value
-
getKind
Returns the manifestkind.- Returns:
- the kind value
-
getName
Returns the theme directory name.- Returns:
- the theme name
-
getDisplayName
Returns the human-readable display name.- Returns:
- the display name
-
getVersion
Returns the SemVer version string.- Returns:
- the version string
-
getAuthor
Returns the optional author field.- Returns:
- the author, or
nullwhen absent
-
getDescription
Returns the optional description.- Returns:
- the description, or
nullwhen absent
-
getLicense
Returns the optional license identifier.- Returns:
- the license, or
nullwhen absent
-
getHomepage
Returns the optional homepage URL.- Returns:
- the homepage URL, or
nullwhen absent
-
getMinFessVersion
Returns the minimum supported Fess version.- Returns:
- the minimum Fess version, or
nullwhen unspecified
-
getSupportedLocales
Returns the list of supported locales.- Returns:
- the supported locales (never
null, may be empty)
-
getEntry
Returns the entry-point file (defaults toindex.html).- Returns:
- the entry-point file path
-
isSpaFallback
public boolean isSpaFallback()Returns whether SPA-style fallback to the entry file is enabled.- Returns:
truewhen SPA fallback is enabled
-