Package com.structurizr.dsl
Class StructurizrDslPluginContext
java.lang.Object
com.structurizr.dsl.StructurizrDslPluginContext
Used to pass contextual information to DSL plugins when they are executed.
-
Constructor Summary
ConstructorsConstructorDescriptionStructurizrDslPluginContext
(File dslFile, com.structurizr.Workspace workspace, Map<String, String> parameters) -
Method Summary
Modifier and TypeMethodDescriptionGets a reference to the DSL file that initiated this plugin context.getParameter
(String name) Gets the named parameter.getParameter
(String name, String defaultValue) Gets the named parameter, with a default value if unset.com.structurizr.Workspace
Gets the current workspace.
-
Constructor Details
-
StructurizrDslPluginContext
-
-
Method Details
-
getDslFile
Gets a reference to the DSL file that initiated this plugin context.- Returns:
- a File instance
-
getWorkspace
public com.structurizr.Workspace getWorkspace()Gets the current workspace.- Returns:
- a Workspace instance
-
getParameter
Gets the named parameter.- Parameters:
name
- the parameter name- Returns:
- the parameter value (null if unset)
-
getParameter
Gets the named parameter, with a default value if unset.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the parameter value, or defaultValue if unset
-