Class StructurizrDslPluginContext

java.lang.Object
com.structurizr.dsl.StructurizrDslPluginContext

public class StructurizrDslPluginContext extends Object
Used to pass contextual information to DSL plugins when they are executed.
  • Constructor Details

    • StructurizrDslPluginContext

      public StructurizrDslPluginContext(File dslFile, com.structurizr.Workspace workspace, Map<String,String> parameters)
  • Method Details

    • getDslFile

      public File 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

      public String getParameter(String name)
      Gets the named parameter.
      Parameters:
      name - the parameter name
      Returns:
      the parameter value (null if unset)
    • getParameter

      public String getParameter(String name, String defaultValue)
      Gets the named parameter, with a default value if unset.
      Parameters:
      name - the parameter name
      defaultValue - the default value
      Returns:
      the parameter value, or defaultValue if unset