Package com.structurizr.util
Class ThemeUtils
java.lang.Object
com.structurizr.util.ThemeUtils
public final class ThemeUtils
extends java.lang.Object
Some utility methods for exporting themes to JSON.
-
Constructor Summary
Constructors Constructor Description ThemeUtils() -
Method Summary
Modifier and Type Method Description static java.lang.StringtoJson(com.structurizr.Workspace workspace)Serializes the theme (element and relationship styles) in the specified workspace to a JSON string.static voidtoJson(com.structurizr.Workspace workspace, java.io.File file)Serializes the theme (element and relationship styles) in the specified workspace to a file, as a JSON string.
-
Constructor Details
-
ThemeUtils
public ThemeUtils()
-
-
Method Details
-
toJson
public static void toJson(com.structurizr.Workspace workspace, java.io.File file) throws java.lang.ExceptionSerializes the theme (element and relationship styles) in the specified workspace to a file, as a JSON string.- Parameters:
workspace- a Workspace objectfile- a File representing the JSON definition- Throws:
java.lang.Exception- if something goes wrong
-
toJson
public static java.lang.String toJson(com.structurizr.Workspace workspace) throws java.lang.ExceptionSerializes the theme (element and relationship styles) in the specified workspace to a JSON string.- Parameters:
workspace- a Workspace instance- Returns:
- a JSON string
- Throws:
java.lang.Exception- if something goes wrong
-