Class DeploymentNode

All Implemented Interfaces:
PropertyHolder

public final class DeploymentNode extends DeploymentElement

Represents a deployment node, which is something like:

  • Physical infrastructure (e.g. a physical server or device)
  • Virtualised infrastructure (e.g. IaaS, PaaS, a virtual machine)
  • Containerised infrastructure (e.g. a Docker container)
  • Database server
  • Java EE web/application server
  • Microsoft IIS
  • etc
  • Constructor Details

    • DeploymentNode

      public DeploymentNode()
  • Method Details

    • add

      public SoftwareSystemInstance add(SoftwareSystem softwareSystem)
      Adds a software system instance to this deployment node, replicating relationships.
      Parameters:
      softwareSystem - the SoftwareSystem to add an instance of
      Returns:
      a SoftwareSystemInstance object
    • add

      public SoftwareSystemInstance add(SoftwareSystem softwareSystem, String... deploymentGroups)
      Adds a software system instance to this deployment node, replicating relationships.
      Parameters:
      softwareSystem - the SoftwareSystem to add an instance of
      deploymentGroups - the deployment group(s)
      Returns:
      a SoftwareSystemInstance object
    • add

      public ContainerInstance add(Container container)
      Adds a container instance to this deployment node, replicating relationships.
      Parameters:
      container - the Container to add an instance of
      Returns:
      a ContainerInstance object
    • add

      public ContainerInstance add(Container container, String... deploymentGroups)
      Adds a container instance to this deployment node, optionally replicating relationships.
      Parameters:
      container - the Container to add an instance of
      deploymentGroups - the deployment group(s)
      Returns:
      a ContainerInstance object
    • addDeploymentNode

      public DeploymentNode addDeploymentNode(String name)
      Adds a child deployment node.
      Parameters:
      name - the name of the deployment node
      Returns:
      a DeploymentNode object
    • addDeploymentNode

      public DeploymentNode addDeploymentNode(String name, String description, String technology)
      Adds a child deployment node.
      Parameters:
      name - the name of the deployment node
      description - a short description
      technology - the technology
      Returns:
      a DeploymentNode object
    • addDeploymentNode

      public DeploymentNode addDeploymentNode(String name, String description, String technology, int instances)
      Adds a child deployment node.
      Parameters:
      name - the name of the deployment node
      description - a short description
      technology - the technology
      instances - the number of instances
      Returns:
      a DeploymentNode object
    • addDeploymentNode

      public DeploymentNode addDeploymentNode(String name, String description, String technology, int instances, Map<String,String> properties)
      Adds a child deployment node.
      Parameters:
      name - the name of the deployment node
      description - a short description
      technology - the technology
      instances - the number of instances
      properties - a Map (String,String) describing name=value properties
      Returns:
      a DeploymentNode object
    • getDeploymentNodeWithName

      public DeploymentNode getDeploymentNodeWithName(String name)
      Gets the DeploymentNode with the specified name.
      Parameters:
      name - the name of the deployment node
      Returns:
      the DeploymentNode instance with the specified name (or null if it doesn't exist).
    • getInfrastructureNodeWithName

      public InfrastructureNode getInfrastructureNodeWithName(String name)
      Gets the infrastructure node with the specified name.
      Parameters:
      name - the name of the infrastructure node
      Returns:
      the InfrastructureNode instance with the specified name (or null if it doesn't exist).
    • addInfrastructureNode

      public InfrastructureNode addInfrastructureNode(String name)
      Adds a child infrastructure node.
      Parameters:
      name - the name of the infrastructure node
      Returns:
      an InfrastructureNode object
    • addInfrastructureNode

      public InfrastructureNode addInfrastructureNode(String name, String description, String technology)
      Adds a child infrastructure node.
      Parameters:
      name - the name of the infrastructure node
      description - a short description
      technology - the technology
      Returns:
      an InfrastructureNode object
    • addInfrastructureNode

      public InfrastructureNode addInfrastructureNode(String name, String description, String technology, Map<String,String> properties)
      Adds a child infrastructure node.
      Parameters:
      name - the name of the infrastructure node
      description - a short description
      technology - the technology
      properties - a Map (String,String) describing name=value properties
      Returns:
      an InfrastructureNode object
    • uses

      public Relationship uses(DeploymentNode destination, String description, String technology)
      Adds a relationship between this and another deployment node.
      Parameters:
      destination - the destination DeploymentNode
      description - a short description of the relationship
      technology - the technology
      Returns:
      a Relationship object
    • uses

      public Relationship uses(DeploymentNode destination, String description, String technology, InteractionStyle interactionStyle)
      Adds a relationship between this and another deployment node.
      Parameters:
      destination - the destination DeploymentNode
      description - a short description of the relationship
      technology - the technology
      interactionStyle - the interaction style (Synchronous vs Asynchronous)
      Returns:
      a Relationship object
    • uses

      public Relationship uses(DeploymentNode destination, String description, String technology, InteractionStyle interactionStyle, String[] tags)
      Adds a relationship between this and another deployment node.
      Parameters:
      destination - the destination DeploymentNode
      description - a short description of the relationship
      technology - the technology
      interactionStyle - the interaction style (Synchronous vs Asynchronous)
      tags - an array of tags
      Returns:
      a Relationship object
    • uses

      public Relationship uses(InfrastructureNode destination, String description, String technology)
      Adds a relationship between this deployment node and an infrastructure node.
      Parameters:
      destination - the destination InfrastructureNode
      description - a short description of the relationship
      technology - the technology
      Returns:
      a Relationship object
    • uses

      public Relationship uses(InfrastructureNode destination, String description, String technology, InteractionStyle interactionStyle)
      Adds a relationship between this deployment node and an infrastructure node.
      Parameters:
      destination - the destination InfrastructureNode
      description - a short description of the relationship
      technology - the technology
      interactionStyle - the interaction style (Synchronous vs Asynchronous)
      Returns:
      a Relationship object
    • uses

      public Relationship uses(InfrastructureNode destination, String description, String technology, InteractionStyle interactionStyle, String[] tags)
      Adds a relationship between this deployment node and an infrastructure node.
      Parameters:
      destination - the destination InfrastructureNode
      description - a short description of the relationship
      technology - the technology
      interactionStyle - the interaction style (Synchronous vs Asynchronous)
      tags - an array of tags
      Returns:
      a Relationship object
    • getChildren

      public Set<DeploymentNode> getChildren()
      Gets the set of child deployment nodes.
      Returns:
      a Set of DeploymentNode objects
    • getInfrastructureNodes

      public Set<InfrastructureNode> getInfrastructureNodes()
      Gets the set of child infrastructure nodes.
      Returns:
      a Set of InfrastructureNode objects
    • hasChildren

      public boolean hasChildren()
    • getSoftwareSystemInstances

      public Set<SoftwareSystemInstance> getSoftwareSystemInstances()
      Gets the set of software system instances associated with this deployment node.
      Returns:
      a Set of SoftwareSystemInstance objects
    • getContainerInstances

      public Set<ContainerInstance> getContainerInstances()
      Gets the set of container instances associated with this deployment node.
      Returns:
      a Set of ContainerInstance objects
    • getTechnology

      public String getTechnology()
    • setTechnology

      public void setTechnology(String technology)
    • getInstances

      public int getInstances()
    • setInstances

      public void setInstances(int instances)
    • getDefaultTags

      public Set<String> getDefaultTags()
      Specified by:
      getDefaultTags in class ModelItem
    • getCanonicalName

      public String getCanonicalName()
      Specified by:
      getCanonicalName in class ModelItem