Package com.structurizr.view
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 Summary
Modifier and Type Method Description voidcopyLayoutInformationFrom(ViewSet source)ComponentViewcreateComponentView(Container container, java.lang.String key, java.lang.String description)Creates a component view, where the scope of the view is the specified container.ContainerViewcreateContainerView(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.DeploymentViewcreateDeploymentView(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.DeploymentViewcreateDeploymentView(java.lang.String key, java.lang.String description)Creates a deployment view.DynamicViewcreateDynamicView(Container container, java.lang.String key, java.lang.String description)Creates a dynamic view, where the scope is the specified container.DynamicViewcreateDynamicView(SoftwareSystem softwareSystem, java.lang.String key, java.lang.String description)Creates a dynamic view, where the scope is the specified software system.DynamicViewcreateDynamicView(java.lang.String key, java.lang.String description)Creates a dynamic view.FilteredViewcreateFilteredView(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.SystemContextViewcreateSystemContextView(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.SystemLandscapeViewcreateSystemLandscapeView(java.lang.String key, java.lang.String description)Creates a system landscape view.java.util.Collection<ComponentView>getComponentViews()Gets the set of component views.ConfigurationgetConfiguration()Gets the configuration object associated with this set of views.java.util.Collection<ContainerView>getContainerViews()Gets the set of container views.java.util.Collection<DeploymentView>getDeploymentViews()Gets the set of dynamic views.java.util.Collection<DynamicView>getDynamicViews()Gets the set of dynamic views.java.util.Collection<FilteredView>getFilteredViews()java.util.Collection<SystemContextView>getSystemContextViews()Gets the set of system context views.java.util.Collection<SystemLandscapeView>getSystemLandscapeViews()Gets the set of system landscape views.java.util.Collection<View>getViews()Gets the set of all views (except filtered views).booleanisEmpty()
-
Method Details
-
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:
- an 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 viewkey- 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 viewkey- 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 viewkey- 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
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 viewkey- 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 viewkey- 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
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 viewkey- 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 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
-
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 dynamic views.- Returns:
- a Collection of DynamicView objects
-
getViews
Gets the set of all views (except filtered 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()
-