Package com.structurizr.model
Class DeploymentNode
java.lang.Object
com.structurizr.model.ModelItem
com.structurizr.model.Element
com.structurizr.model.DeploymentElement
com.structurizr.model.DeploymentNode
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
-
Field Summary
Fields inherited from class com.structurizr.model.DeploymentElement
DEFAULT_DEPLOYMENT_ENVIRONMENT, DEFAULT_DEPLOYMENT_GROUP
-
Constructor Summary
Constructors Constructor Description DeploymentNode()
-
Method Summary
Modifier and Type Method Description ContainerInstance
add(Container container)
Adds a container instance to this deployment node, replicating relationships.ContainerInstance
add(Container container, java.lang.String... deploymentGroups)
Adds a container instance to this deployment node, optionally replicating relationships.SoftwareSystemInstance
add(SoftwareSystem softwareSystem)
Adds a software system instance to this deployment node, replicating relationships.SoftwareSystemInstance
add(SoftwareSystem softwareSystem, java.lang.String... deploymentGroups)
Adds a software system instance to this deployment node, replicating relationships.DeploymentNode
addDeploymentNode(java.lang.String name)
Adds a child deployment node.DeploymentNode
addDeploymentNode(java.lang.String name, java.lang.String description, java.lang.String technology)
Adds a child deployment node.DeploymentNode
addDeploymentNode(java.lang.String name, java.lang.String description, java.lang.String technology, int instances)
Adds a child deployment node.DeploymentNode
addDeploymentNode(java.lang.String name, java.lang.String description, java.lang.String technology, int instances, java.util.Map<java.lang.String,java.lang.String> properties)
Adds a child deployment node.InfrastructureNode
addInfrastructureNode(java.lang.String name)
Adds a child infrastructure node.InfrastructureNode
addInfrastructureNode(java.lang.String name, java.lang.String description, java.lang.String technology)
Adds a child infrastructure node.InfrastructureNode
addInfrastructureNode(java.lang.String name, java.lang.String description, java.lang.String technology, java.util.Map<java.lang.String,java.lang.String> properties)
Adds a child infrastructure node.java.lang.String
getCanonicalName()
java.util.Set<DeploymentNode>
getChildren()
Gets the set of child deployment nodes.java.util.Set<ContainerInstance>
getContainerInstances()
Gets the set of container instances associated with this deployment node.DeploymentNode
getDeploymentNodeWithName(java.lang.String name)
Gets the DeploymentNode with the specified name.java.util.Set<InfrastructureNode>
getInfrastructureNodes()
Gets the set of child infrastructure nodes.InfrastructureNode
getInfrastructureNodeWithName(java.lang.String name)
Gets the infrastructure node with the specified name.int
getInstances()
protected java.util.Set<java.lang.String>
getRequiredTags()
java.util.Set<SoftwareSystemInstance>
getSoftwareSystemInstances()
Gets the set of software system instances associated with this deployment node.java.lang.String
getTechnology()
boolean
hasChildren()
void
setInstances(int instances)
void
setTechnology(java.lang.String technology)
Relationship
uses(DeploymentNode destination, java.lang.String description, java.lang.String technology)
Adds a relationship between this and another deployment node.Relationship
uses(DeploymentNode destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle)
Adds a relationship between this and another deployment node.Relationship
uses(DeploymentNode destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle, java.lang.String[] tags)
Adds a relationship between this and another deployment node.Relationship
uses(InfrastructureNode destination, java.lang.String description, java.lang.String technology)
Adds a relationship between this deployment node and an infrastructure node.Relationship
uses(InfrastructureNode destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle)
Adds a relationship between this deployment node and an infrastructure node.Relationship
uses(InfrastructureNode destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle, java.lang.String[] tags)
Adds a relationship between this deployment node and an infrastructure node.Methods inherited from class com.structurizr.model.Element
getDescription, getEfferentRelationshipsWith, getEfferentRelationshipWith, getEfferentRelationshipWith, getModel, getName, getRelationships, hasAfferentRelationships, hasEfferentRelationshipWith, hasEfferentRelationshipWith, setDescription, setModel, toString, uses, uses, uses
Methods inherited from class com.structurizr.model.ModelItem
addPerspective, addProperty, addTags, getId, getOriginId, getPerspectives, getProperties, getTags, getTagsAsSet, getUrl, hasTag, removeTag, setUrl
-
Constructor Details
-
DeploymentNode
public DeploymentNode()
-
-
Method Details
-
add
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, java.lang.String... deploymentGroups)Adds a software system instance to this deployment node, replicating relationships.- Parameters:
softwareSystem
- the SoftwareSystem to add an instance ofdeploymentGroups
- the deployment group(s)- Returns:
- a SoftwareSystemInstance object
-
add
Adds a container instance to this deployment node, replicating relationships.- Parameters:
container
- the Container to add an instance of- Returns:
- a ContainerInstance object
-
add
Adds a container instance to this deployment node, optionally replicating relationships.- Parameters:
container
- the Container to add an instance ofdeploymentGroups
- the deployment group(s)- Returns:
- a ContainerInstance object
-
addDeploymentNode
Adds a child deployment node.- Parameters:
name
- the name of the deployment node- Returns:
- a DeploymentNode object
-
addDeploymentNode
public DeploymentNode addDeploymentNode(java.lang.String name, java.lang.String description, java.lang.String technology)Adds a child deployment node.- Parameters:
name
- the name of the deployment nodedescription
- a short descriptiontechnology
- the technology- Returns:
- a DeploymentNode object
-
addDeploymentNode
public DeploymentNode addDeploymentNode(java.lang.String name, java.lang.String description, java.lang.String technology, int instances)Adds a child deployment node.- Parameters:
name
- the name of the deployment nodedescription
- a short descriptiontechnology
- the technologyinstances
- the number of instances- Returns:
- a DeploymentNode object
-
addDeploymentNode
public DeploymentNode addDeploymentNode(java.lang.String name, java.lang.String description, java.lang.String technology, int instances, java.util.Map<java.lang.String,java.lang.String> properties)Adds a child deployment node.- Parameters:
name
- the name of the deployment nodedescription
- a short descriptiontechnology
- the technologyinstances
- the number of instancesproperties
- a Map (String,String) describing name=value properties- Returns:
- a DeploymentNode object
-
getDeploymentNodeWithName
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
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
Adds a child infrastructure node.- Parameters:
name
- the name of the infrastructure node- Returns:
- an InfrastructureNode object
-
addInfrastructureNode
public InfrastructureNode addInfrastructureNode(java.lang.String name, java.lang.String description, java.lang.String technology)Adds a child infrastructure node.- Parameters:
name
- the name of the infrastructure nodedescription
- a short descriptiontechnology
- the technology- Returns:
- an InfrastructureNode object
-
addInfrastructureNode
public InfrastructureNode addInfrastructureNode(java.lang.String name, java.lang.String description, java.lang.String technology, java.util.Map<java.lang.String,java.lang.String> properties)Adds a child infrastructure node.- Parameters:
name
- the name of the infrastructure nodedescription
- a short descriptiontechnology
- the technologyproperties
- a Map (String,String) describing name=value properties- Returns:
- an InfrastructureNode object
-
uses
public Relationship uses(DeploymentNode destination, java.lang.String description, java.lang.String technology)Adds a relationship between this and another deployment node.- Parameters:
destination
- the destination DeploymentNodedescription
- a short description of the relationshiptechnology
- the technology- Returns:
- a Relationship object
-
uses
public Relationship uses(DeploymentNode destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle)Adds a relationship between this and another deployment node.- Parameters:
destination
- the destination DeploymentNodedescription
- a short description of the relationshiptechnology
- the technologyinteractionStyle
- the interaction style (Synchronous vs Asynchronous)- Returns:
- a Relationship object
-
uses
public Relationship uses(DeploymentNode destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle, java.lang.String[] tags)Adds a relationship between this and another deployment node.- Parameters:
destination
- the destination DeploymentNodedescription
- a short description of the relationshiptechnology
- the technologyinteractionStyle
- the interaction style (Synchronous vs Asynchronous)tags
- an array of tags- Returns:
- a Relationship object
-
uses
public Relationship uses(InfrastructureNode destination, java.lang.String description, java.lang.String technology)Adds a relationship between this deployment node and an infrastructure node.- Parameters:
destination
- the destination InfrastructureNodedescription
- a short description of the relationshiptechnology
- the technology- Returns:
- a Relationship object
-
uses
public Relationship uses(InfrastructureNode destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle)Adds a relationship between this deployment node and an infrastructure node.- Parameters:
destination
- the destination InfrastructureNodedescription
- a short description of the relationshiptechnology
- the technologyinteractionStyle
- the interaction style (Synchronous vs Asynchronous)- Returns:
- a Relationship object
-
uses
public Relationship uses(InfrastructureNode destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle, java.lang.String[] tags)Adds a relationship between this deployment node and an infrastructure node.- Parameters:
destination
- the destination InfrastructureNodedescription
- a short description of the relationshiptechnology
- the technologyinteractionStyle
- the interaction style (Synchronous vs Asynchronous)tags
- an array of tags- Returns:
- a Relationship object
-
getChildren
Gets the set of child deployment nodes.- Returns:
- a Set of DeploymentNode objects
-
getInfrastructureNodes
Gets the set of child infrastructure nodes.- Returns:
- a Set of InfrastructureNode objects
-
hasChildren
public boolean hasChildren() -
getSoftwareSystemInstances
Gets the set of software system instances associated with this deployment node.- Returns:
- a Set of SoftwareSystemInstance objects
-
getContainerInstances
Gets the set of container instances associated with this deployment node.- Returns:
- a Set of ContainerInstance objects
-
getTechnology
public java.lang.String getTechnology() -
setTechnology
public void setTechnology(java.lang.String technology) -
getInstances
public int getInstances() -
setInstances
public void setInstances(int instances) -
getRequiredTags
protected java.util.Set<java.lang.String> getRequiredTags()- Specified by:
getRequiredTags
in classModelItem
-
getCanonicalName
public java.lang.String getCanonicalName()- Specified by:
getCanonicalName
in classModelItem
-