Class SoftwareSystem

All Implemented Interfaces:
Documentable, PropertyHolder, Comparable<ModelItem>

public final class SoftwareSystem extends StaticStructureElement implements Documentable
Represents a "software system" in the C4 model.
  • Method Details

    • getParent

      public Element getParent()
      Gets the parent of this software system.
      Specified by:
      getParent in class Element
      Returns:
      null, as software systems don't have a parent element
    • getLocation

      @Deprecated public Location getLocation()
      Deprecated.
    • getContainers

      @Nonnull public Set<Container> getContainers()
      Gets the set of containers within this software system.
      Returns:
      a Set of Container objects
    • hasContainers

      public boolean hasContainers()
      Determines whether this software system has any containers.
      Returns:
      true if it has containers, false otherwise
    • addContainer

      @Nonnull public Container addContainer(@Nonnull String name)
      Adds a container with the specified name.
      Parameters:
      name - the name of the container (e.g. "Web Application")
      Returns:
      the newly created Container instance added to the model (or null)
      Throws:
      IllegalArgumentException - if a container with the same name exists already
    • addContainer

      @Nonnull public Container addContainer(@Nonnull String name, String description)
      Adds a container with the specified name and description.
      Parameters:
      name - the name of the container (e.g. "Web Application")
      description - a short description/list of responsibilities
      Returns:
      the newly created Container instance added to the model (or null)
      Throws:
      IllegalArgumentException - if a container with the same name exists already
    • addContainer

      @Nonnull public Container addContainer(@Nonnull String name, String description, String technology)
      Adds a container with the specified name, description and technology.
      Parameters:
      name - the name of the container (e.g. "Web Application")
      description - a short description/list of responsibilities
      technology - the technology choice (e.g. "Spring MVC", "Java EE", etc)
      Returns:
      the newly created Container instance added to the model (or null)
      Throws:
      IllegalArgumentException - if a container with the same name exists already
    • getContainerWithName

      @Nullable public Container getContainerWithName(@Nonnull String name)
      Gets the container with the specified name.
      Parameters:
      name - the name of the Container
      Returns:
      the Container instance with the specified name, or null if it doesn't exist
      Throws:
      IllegalArgumentException - if the name is null or empty
    • getContainerWithId

      @Nullable public Container getContainerWithId(@Nonnull String id)
      Gets the container with the specified ID.
      Parameters:
      id - the ModelItem.getId() of the container
      Returns:
      the Container instance with the specified ID, or null if it doesn't exist
      Throws:
      IllegalArgumentException - if the ID is null or empty
    • getCanonicalName

      public String getCanonicalName()
      Gets the canonical name of this software system, in the form "/Software System".
      Specified by:
      getCanonicalName in class ModelItem
      Returns:
      the canonical name, as a String
    • getDefaultTags

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

      public Documentation getDocumentation()
      Gets the documentation associated with this software system.
      Specified by:
      getDocumentation in interface Documentable
      Returns:
      a Documentation object