Class DeploymentView

All Implemented Interfaces:
PropertyHolder

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

    • getModel

      public Model getModel()
      Description copied from class: ModelView
      Gets the model that this view belongs to.
      Overrides:
      getModel in class ModelView
      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
    • add

      public void add(@Nonnull InfrastructureNode infrastructureNode)
      Adds an infrastructure node (and its parent deployment nodes) to this view.
      Parameters:
      infrastructureNode - the InfrastructureNode to add
    • add

      public void add(@Nonnull SoftwareSystemInstance softwareSystemInstance)
      Adds a software system instance (and its parent deployment nodes) to this view.
      Parameters:
      softwareSystemInstance - the SoftwareSystemInstance to add
    • add

      public void add(@Nonnull ContainerInstance containerInstance)
      Adds a container instance (and its parent deployment nodes) to this view.
      Parameters:
      containerInstance - the ContainerInstance to add
    • 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 an infrastructure node from this view.
      Parameters:
      infrastructureNode - the InfrastructureNode to be removed
    • remove

      public void remove(@Nonnull SoftwareSystemInstance softwareSystemInstance)
      Removes a software system instance from this view.
      Parameters:
      softwareSystemInstance - the SoftwareSystemInstance to be removed
    • remove

      public void remove(@Nonnull ContainerInstance containerInstance)
      Removes a container instance 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 String getName()
      Gets the (computed) name of this view.
      Specified by:
      getName in class View
      Returns:
      the name, as a String
    • getEnvironment

      public 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(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
    • checkElementCanBeAdded

      protected void checkElementCanBeAdded(Element elementToBeAdded)
      Specified by:
      checkElementCanBeAdded in class ModelView
    • canBeRemoved

      protected boolean canBeRemoved(Element element)
      Specified by:
      canBeRemoved in class ModelView
    • 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 List<Animation> getAnimations()
    • add

      public void add(@Nonnull CustomElement customElement)
      Adds the given custom element to this view, including relationships to/from that custom element.
      Parameters:
      customElement - the CustomElement to add
    • add

      public void add(@Nonnull CustomElement customElement, boolean addRelationships)
      Adds the given custom element to this view.
      Parameters:
      customElement - the CustomElement to add
      addRelationships - whether to add relationships to/from the custom element
    • remove

      public void remove(@Nonnull CustomElement customElement)
      Removes the given custom element from this view.
      Parameters:
      customElement - the CustomElement to add