Package com.structurizr.model
Class Person
java.lang.Object
public final class Person extends StaticStructureElement
Represents a "person" in the C4 model.
-
Method Summary
Modifier and Type Method Description Relationship
delivers(Person destination, java.lang.String description)
Adds a unidirectional relationship between this element and a person.Relationship
delivers(Person destination, java.lang.String description, java.lang.String technology)
Adds a unidirectional relationship between this element and a person.Relationship
delivers(Person destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle)
Adds a unidirectional relationship between this element and a person.java.lang.String
getCanonicalName()
Location
getLocation()
Gets the location of this person.Element
getParent()
Gets the parent of this element.protected java.util.Set<java.lang.String>
getRequiredTags()
Relationship
interactsWith(Person destination, java.lang.String description)
Adds an interaction between this person and another.Relationship
interactsWith(Person destination, java.lang.String description, java.lang.String technology)
Adds an interaction between this person and another.Relationship
interactsWith(Person destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle)
Adds an interaction between this person and another.void
setLocation(Location location)
Methods inherited from class com.structurizr.model.StaticStructureElement
delivers, uses, uses, uses, uses, uses, uses, uses, uses, uses, uses, uses, uses, uses, uses
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
-
Method Details
-
getParent
Description copied from class:Element
Gets the parent of this element. -
getLocation
Gets the location of this person.- Returns:
- a Location
-
setLocation
-
getCanonicalName
public java.lang.String getCanonicalName()- Specified by:
getCanonicalName
in classModelItem
-
getRequiredTags
protected java.util.Set<java.lang.String> getRequiredTags()- Specified by:
getRequiredTags
in classModelItem
-
delivers
Description copied from class:StaticStructureElement
Adds a unidirectional relationship between this element and a person.- Overrides:
delivers
in classStaticStructureElement
- Parameters:
destination
- the target of the relationshipdescription
- a description of the relationship (e.g. "sends e-mail to")- Returns:
- the relationship that has just been created and added to the model
-
delivers
public Relationship delivers(Person destination, java.lang.String description, java.lang.String technology)Description copied from class:StaticStructureElement
Adds a unidirectional relationship between this element and a person.- Overrides:
delivers
in classStaticStructureElement
- Parameters:
destination
- the target of the relationshipdescription
- a description of the relationship (e.g. "sends e-mail to")technology
- the technology details (e.g. JSON/HTTPS)- Returns:
- the relationship that has just been created and added to the model
-
delivers
public Relationship delivers(Person destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle)Description copied from class:StaticStructureElement
Adds a unidirectional relationship between this element and a person.- Overrides:
delivers
in classStaticStructureElement
- Parameters:
destination
- the target of the relationshipdescription
- a description of the relationship (e.g. "sends e-mail to")technology
- the technology details (e.g. JSON/HTTPS)interactionStyle
- the interaction style (sync vs async)- Returns:
- the relationship that has just been created and added to the model
-
interactsWith
Adds an interaction between this person and another.- Parameters:
destination
- the Person being interacted withdescription
- a description of the interaction- Returns:
- the resulting Relationship
-
interactsWith
public Relationship interactsWith(Person destination, java.lang.String description, java.lang.String technology)Adds an interaction between this person and another.- Parameters:
destination
- the Person being interacted withdescription
- a description of the interactiontechnology
- the technology of the interaction (e.g. Telephone)- Returns:
- the resulting Relationship
-
interactsWith
public Relationship interactsWith(Person destination, java.lang.String description, java.lang.String technology, InteractionStyle interactionStyle)Adds an interaction between this person and another.- Parameters:
destination
- the Person being interacted withdescription
- a description of the interactiontechnology
- the technology of the interaction (e.g. Telephone)interactionStyle
- the interaction style (e.g. Synchronous or Asynchronous)- Returns:
- the resulting Relationship
-