Class DeploymentView

java.lang.Object
com.structurizr.view.View
com.structurizr.view.DeploymentView

public final class DeploymentView
extends View
A deployment view, used to show the mapping of container instances to deployment nodes.
  • Method Details

    • getModel

      public Model getModel()
      Description copied from class: View
      Gets the model that this view belongs to.
      Overrides:
      getModel in class View
      Returns:
      a Model object
    • addDefaultElements

      public void addDefaultElements()
      Adds the default set of elements to this view.
    • addAllDeploymentNodes

      public void addAllDeploymentNodes()
      Adds all of the top-level deployment nodes to this view, for the same deployment environment (if set).
    • add

      public void add​(@Nonnull DeploymentNode deploymentNode)
      Adds a deployment node to this view, including relationships to/from that deployment node (and children).
      Parameters:
      deploymentNode - the DeploymentNode to add
    • add

      public void add​(@Nonnull DeploymentNode deploymentNode, boolean addRelationships)
      Adds a deployment node to this view.
      Parameters:
      deploymentNode - the DeploymentNode to add
      addRelationships - whether to add relationships to/from the person
    • remove

      public void remove​(@Nonnull DeploymentNode deploymentNode)
      Removes the given deployment node from this view.
      Parameters:
      deploymentNode - the DeploymentNode to be removed
    • remove

      public void remove​(@Nonnull InfrastructureNode infrastructureNode)
      Removes the given infrastructure node from this view.
      Parameters:
      infrastructureNode - the InfrastructureNode to be removed
    • remove

      public void remove​(@Nonnull ContainerInstance containerInstance)
      Removes the given infrastructure node from this view.
      Parameters:
      containerInstance - the ContainerInstance to be removed
    • add

      public RelationshipView add​(@Nonnull Relationship relationship)
      Adds a Relationship to this view.
      Parameters:
      relationship - the Relationship to be added
      Returns:
      a RelationshipView object representing the relationship added
    • getName

      public java.lang.String getName()
      Gets the (computed) name of this view.
      Specified by:
      getName in class View
      Returns:
      the name, as a String
    • getEnvironment

      public java.lang.String getEnvironment()
      Gets the name of the environment that this deployment view is for (e.g. "Development", "Live", etc).
      Returns:
      the environment name, as a String
    • setEnvironment

      public void setEnvironment​(java.lang.String environment)
      Sets the name of the environment that this deployment view is for (e.g. "Development", "Live", etc).
      Parameters:
      environment - the environment name, as a String
    • canBeRemoved

      protected boolean canBeRemoved​(Element element)
      Specified by:
      canBeRemoved in class View
    • addAnimation

      public void addAnimation​(InfrastructureNode... infrastructureNodes)
      Adds an animation step, with the specified infrastructure nodes.
      Parameters:
      infrastructureNodes - the infrastructure nodes that should be shown in the animation step
    • addAnimation

      public void addAnimation​(StaticStructureElementInstance... elementInstances)
      Adds an animation step, with the specified element instances.
      Parameters:
      elementInstances - the element instances that should be shown in the animation step
    • addAnimation

      public void addAnimation​(StaticStructureElementInstance[] elementInstances, InfrastructureNode[] infrastructureNodes)
      Adds an animation step, with the specified container instances and infrastructure nodes.
      Parameters:
      elementInstances - the element instances that should be shown in the animation step
      infrastructureNodes - the container infrastructure nodes that should be shown in the animation step
    • getAnimations

      public java.util.List<com.structurizr.view.Animation> getAnimations()