Package com.structurizr.view
Class ViewSet
java.lang.Object
com.structurizr.view.ViewSet
A set of views onto a software architecture model.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all views and configuration.void
copyLayoutInformationFrom
(ViewSet source) createComponentView
(Container container, String key, String description) Creates a component view, where the scope of the view is the specified container.createContainerView
(SoftwareSystem softwareSystem, String key, String description) Creates a container view, where the scope of the view is the specified software system.createCustomView
(String key, String title, String description) Creates a custom view view.void
createDeploymentView
(SoftwareSystem softwareSystem, String key, String description) Creates a deployment view, where the scope of the view is the specified software system.createDeploymentView
(String key, String description) Creates a deployment view.createDynamicView
(Container container, String key, String description) Creates a dynamic view, where the scope is the specified container.createDynamicView
(SoftwareSystem softwareSystem, String key, String description) Creates a dynamic view, where the scope is the specified software system.createDynamicView
(String key, String description) Creates a dynamic view.createFilteredView
(StaticView view, String key, String description, FilterMode mode, String... tags) Creates a FilteredView on top of an existing static view.createImageView
(Element element, String key) Creates an image view, where the scope is the specified element.createImageView
(String key) Creates an image view.createSystemContextView
(SoftwareSystem softwareSystem, String key, String description) Creates a system context view, where the scope of the view is the specified software system.createSystemLandscapeView
(String key, String description) Creates a system landscape view.Gets the set of component views.Gets the configuration object associated with this set of views.Gets the set of container views.Gets the set of custom views.Gets the set of deployment views.Gets the set of dynamic views.Gets the set of image views.Gets the set of system context views.Gets the set of system landscape views.getViews()
Gets the set of all views.getViewWithKey
(String key) Finds the view with the specified key, or null if the view does not exist.boolean
isEmpty()
-
Method Details
-
createCustomView
Creates a custom view view.- Parameters:
key
- the key for the view (must be unique)title
- a title of the viewdescription
- a description of the view- Returns:
- a CustomView object
- Throws:
IllegalArgumentException
- if the key is not unique
-
createSystemLandscapeView
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:
IllegalArgumentException
- if the key is not unique
-
createSystemContextView
public SystemContextView createSystemContextView(SoftwareSystem softwareSystem, String key, 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 viewkey
- the key for the view (must be unique)description
- a description of the view- Returns:
- a SystemContextView object
- Throws:
IllegalArgumentException
- if the software system is null or the key is not unique
-
createContainerView
public ContainerView createContainerView(SoftwareSystem softwareSystem, String key, 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 viewkey
- the key for the view (must be unique)description
- a description of the view- Returns:
- a ContainerView object
- Throws:
IllegalArgumentException
- if the software system is null or the key is not unique
-
createComponentView
Creates a component view, where the scope of the view is the specified container.- Parameters:
container
- the Container object representing the scope of the viewkey
- the key for the view (must be unique)description
- a description of the view- Returns:
- a ContainerView object
- Throws:
IllegalArgumentException
- if the container is null or the key is not unique
-
createDynamicView
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:
IllegalArgumentException
- if the key is not unique
-
createDynamicView
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 viewkey
- the key for the view (must be unique)description
- a description of the view- Returns:
- a DynamicView object
- Throws:
IllegalArgumentException
- if the software system is null or the key is not unique
-
createDynamicView
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 viewkey
- the key for the view (must be unique)description
- a description of the view- Returns:
- a DynamicView object
- Throws:
IllegalArgumentException
- if the container is null or the key is not unique
-
createDeploymentView
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:
IllegalArgumentException
- if the key is not unique
-
createDeploymentView
public DeploymentView createDeploymentView(SoftwareSystem softwareSystem, String key, 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 viewkey
- the key for the deployment view (must be unique)description
- a description of the view- Returns:
- a DeploymentView object
- Throws:
IllegalArgumentException
- if the software system is null or the key is not unique
-
createFilteredView
public FilteredView createFilteredView(StaticView view, String key, String description, FilterMode mode, String... tags) Creates a FilteredView on top of an existing static view.- Parameters:
view
- the static view to base the FilteredView uponkey
- the key for the filtered view (must be unique)description
- a descriptionmode
- whether to Include or Exclude elements/relationships based upon their tagtags
- the tags to include or exclude- Returns:
- a FilteredView object
-
createImageView
Creates an image view.- Parameters:
key
- the key for the view (must be unique)- Returns:
- an ImageView object
- Throws:
IllegalArgumentException
- if the key is not unique
-
createImageView
Creates an image view, where the scope is the specified element.- Parameters:
element
- the Element object representing the scope of the viewkey
- the key for the view (must be unique)- Returns:
- an ImageView object
- Throws:
IllegalArgumentException
- if the element is null or the key is not unique
-
getViewWithKey
Finds the view with the specified key, or null if the view does not exist.- Parameters:
key
- the key- Returns:
- a View object, or null if a view with the specified key could not be found
-
getCustomViews
Gets the set of custom views.- Returns:
- a Collection of CustomView objects
-
getSystemLandscapeViews
Gets the set of system landscape views.- Returns:
- a Collection of SystemLandscapeView objects
-
getSystemContextViews
Gets the set of system context views.- Returns:
- a Collection of SystemContextView objects
-
getContainerViews
Gets the set of container views.- Returns:
- a Collection of ContainerView objects
-
getComponentViews
Gets the set of component views.- Returns:
- a Collection of ComponentView objects
-
getDynamicViews
Gets the set of dynamic views.- Returns:
- a Collection of DynamicView objects
-
getFilteredViews
-
getDeploymentViews
Gets the set of deployment views.- Returns:
- a Collection of DeploymentView objects
-
getImageViews
Gets the set of image views.- Returns:
- a Collection of ImageView objects
-
getViews
Gets the set of all views.- Returns:
- a Collection of View objects
-
getConfiguration
Gets the configuration object associated with this set of views.- Returns:
- a Configuration object
-
copyLayoutInformationFrom
-
isEmpty
public boolean isEmpty() -
createDefaultViews
public void createDefaultViews() -
clear
public void clear()Removes all views and configuration.
-