Class ViewSet

java.lang.Object
com.structurizr.view.ViewSet

public final class ViewSet
extends java.lang.Object
A set of views onto a software architecture model.
  • Method Details

    • createCustomView

      public CustomView createCustomView​(java.lang.String key, java.lang.String title, java.lang.String description)
      Creates a custom view view.
      Parameters:
      key - the key for the view (must be unique)
      title - a title of the view
      description - a description of the view
      Returns:
      a CustomView object
      Throws:
      java.lang.IllegalArgumentException - if the key is not unique
    • createSystemLandscapeView

      public SystemLandscapeView createSystemLandscapeView​(java.lang.String key, java.lang.String description)
      Creates a system landscape view.
      Parameters:
      key - the key for the view (must be unique)
      description - a description of the view
      Returns:
      a SystemLandscapeView object
      Throws:
      java.lang.IllegalArgumentException - if the key is not unique
    • createSystemContextView

      public SystemContextView createSystemContextView​(SoftwareSystem softwareSystem, java.lang.String key, java.lang.String description)
      Creates a system context view, where the scope of the view is the specified software system.
      Parameters:
      softwareSystem - the SoftwareSystem object representing the scope of the view
      key - the key for the view (must be unique)
      description - a description of the view
      Returns:
      a SystemContextView object
      Throws:
      java.lang.IllegalArgumentException - if the software system is null or the key is not unique
    • createContainerView

      public ContainerView createContainerView​(SoftwareSystem softwareSystem, java.lang.String key, java.lang.String description)
      Creates a container view, where the scope of the view is the specified software system.
      Parameters:
      softwareSystem - the SoftwareSystem object representing the scope of the view
      key - the key for the view (must be unique)
      description - a description of the view
      Returns:
      a ContainerView object
      Throws:
      java.lang.IllegalArgumentException - if the software system is null or the key is not unique
    • createComponentView

      public ComponentView createComponentView​(Container container, java.lang.String key, java.lang.String description)
      Creates a component view, where the scope of the view is the specified container.
      Parameters:
      container - the Container object representing the scope of the view
      key - the key for the view (must be unique)
      description - a description of the view
      Returns:
      a ContainerView object
      Throws:
      java.lang.IllegalArgumentException - if the container is null or the key is not unique
    • createDynamicView

      public DynamicView createDynamicView​(java.lang.String key, java.lang.String description)
      Creates a dynamic view.
      Parameters:
      key - the key for the view (must be unique)
      description - a description of the view
      Returns:
      a DynamicView object
      Throws:
      java.lang.IllegalArgumentException - if the key is not unique
    • createDynamicView

      public DynamicView createDynamicView​(SoftwareSystem softwareSystem, java.lang.String key, java.lang.String description)
      Creates a dynamic view, where the scope is the specified software system. The following elements can be added to the resulting view:
      • People
      • Software systems
      • Containers that reside inside the specified software system
      Parameters:
      softwareSystem - the SoftwareSystem object representing the scope of the view
      key - the key for the view (must be unique)
      description - a description of the view
      Returns:
      a DynamicView object
      Throws:
      java.lang.IllegalArgumentException - if the software system is null or the key is not unique
    • createDynamicView

      public DynamicView createDynamicView​(Container container, java.lang.String key, java.lang.String description)
      Creates a dynamic view, where the scope is the specified container. The following elements can be added to the resulting view:
      • People
      • Software systems
      • Containers with the same parent software system as the specified container
      • Components within the specified container
      Parameters:
      container - the Container object representing the scope of the view
      key - the key for the view (must be unique)
      description - a description of the view
      Returns:
      a DynamicView object
      Throws:
      java.lang.IllegalArgumentException - if the container is null or the key is not unique
    • createDeploymentView

      public DeploymentView createDeploymentView​(java.lang.String key, java.lang.String description)
      Creates a deployment view.
      Parameters:
      key - the key for the deployment view (must be unique)
      description - a description of the view
      Returns:
      a DeploymentView object
      Throws:
      java.lang.IllegalArgumentException - if the key is not unique
    • createDeploymentView

      public DeploymentView createDeploymentView​(SoftwareSystem softwareSystem, java.lang.String key, java.lang.String description)
      Creates a deployment view, where the scope of the view is the specified software system.
      Parameters:
      softwareSystem - the SoftwareSystem object representing the scope of the view
      key - the key for the deployment view (must be unique)
      description - a description of the view
      Returns:
      a DeploymentView object
      Throws:
      java.lang.IllegalArgumentException - if the software system is null or the key is not unique
    • createFilteredView

      public FilteredView createFilteredView​(StaticView view, java.lang.String key, java.lang.String description, FilterMode mode, java.lang.String... tags)
      Creates a FilteredView on top of an existing static view.
      Parameters:
      view - the static view to base the FilteredView upon
      key - the key for the filtered view (must be unique)
      description - a description
      mode - whether to Include or Exclude elements/relationships based upon their tag
      tags - the tags to include or exclude
      Returns:
      a FilteredView object
    • getCustomViews

      public java.util.Collection<CustomView> getCustomViews()
      Gets the set of custom views.
      Returns:
      a Collection of CustomView objects
    • getSystemLandscapeViews

      public java.util.Collection<SystemLandscapeView> getSystemLandscapeViews()
      Gets the set of system landscape views.
      Returns:
      a Collection of SystemLandscapeView objects
    • getSystemContextViews

      public java.util.Collection<SystemContextView> getSystemContextViews()
      Gets the set of system context views.
      Returns:
      a Collection of SystemContextView objects
    • getContainerViews

      public java.util.Collection<ContainerView> getContainerViews()
      Gets the set of container views.
      Returns:
      a Collection of ContainerView objects
    • getComponentViews

      public java.util.Collection<ComponentView> getComponentViews()
      Gets the set of component views.
      Returns:
      a Collection of ComponentView objects
    • getDynamicViews

      public java.util.Collection<DynamicView> getDynamicViews()
      Gets the set of dynamic views.
      Returns:
      a Collection of DynamicView objects
    • getFilteredViews

      public java.util.Collection<FilteredView> getFilteredViews()
    • getDeploymentViews

      public java.util.Collection<DeploymentView> getDeploymentViews()
      Gets the set of dynamic views.
      Returns:
      a Collection of DynamicView objects
    • getViews

      public java.util.Collection<View> getViews()
      Gets the set of all views (except filtered views).
      Returns:
      a Collection of View objects
    • getConfiguration

      public Configuration getConfiguration()
      Gets the configuration object associated with this set of views.
      Returns:
      a Configuration object
    • copyLayoutInformationFrom

      public void copyLayoutInformationFrom​(ViewSet source)
    • isEmpty

      public boolean isEmpty()
    • createDefaultViews

      public void createDefaultViews()
    • clear

      public void clear()
      Removes all views and configuration.