Class BrandingFile
java.lang.Object
io.github.jbastgen.stemma.app.config.BrandingFile
The branding file (feature 18): accent and brand colours, graph colours and branch rules, company data and the logo (embedded as
base64) in one JSON file. Unknown keys are ignored, so files of newer versions still load. Documented in
docs/branding-file.md.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordWhat a file holds, checked. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidThe settings with the content of a file taken over (used by the import and by *Take over into the settings*).static BrandingFile.ContentloadManaged(Path configDir, Consumer<String> onError) The filebranding.jsonof the configuration folder, if there is one.static BrandingFile.ContentReads a file; refuses files that are too large.static voidstoreLogo(BrandingFile.Content c, Path configDir) Puts the logo of the content into the configuration folder (replacing the old one).static Stringwrite(ViewSettings v, Path configDir) The JSON text for the settings; the logo is read from the configuration folder.
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
write
The JSON text for the settings; the logo is read from the configuration folder.- Throws:
IOException
-
read
Reads a file; refuses files that are too large.- Throws:
IOException
-
storeLogo
Puts the logo of the content into the configuration folder (replacing the old one).- Throws:
IOException
-
applyTo
The settings with the content of a file taken over (used by the import and by *Take over into the settings*). -
loadManaged
The filebranding.jsonof the configuration folder, if there is one. A damaged file is reported byonError(once) and ignored.
-