Record Class CascadeRepo

java.lang.Object
java.lang.Record
network.ike.workspace.cascade.CascadeRepo
Record Components:
coordinate - the project's reactor-root coordinate
repo - the on-disk directory / GitHub repo name
url - the canonical upstream git URL, or null when unknown
repositoryKey - the <scm>-derived repository identity; null when the assembler had no RepositoryKeyResolver
cascade - the project's own parsed release-cascade.yaml

public record CascadeRepo(MavenCoordinate coordinate, String repo, String url, RepositoryKey repositoryKey, ProjectCascade cascade) extends Record
One node in the assembled IKE release cascade graph (IKE-Network/ike-issues#402, #420, #496).

A node pairs a project's identity — its reactor-root Maven MavenCoordinate and repository locators — with the ProjectCascade parsed from that project's own src/main/cascade/release-cascade.yaml. Nodes are produced only by CascadeAssembler, which traverses the per-project manifests and stitches them into a single ordered ReleaseCascade.

Two identities live on the node. The coordinate names the coordinate the assembler started from for this node — the entry-point used to find the node's ProjectCascade. The repositoryKey names the repository the coordinate belongs to (the <scm>-derived join key), and is the durable node identity once #496 part D collapses self-edges and coordinate aliases onto the repository. repositoryKey may be null on nodes assembled without a RepositoryKeyResolver — older assemblies and tests are unaffected.

The repo and url fields are pure locators — the on-disk directory name and the canonical upstream git URL the cascade executor uses to reach the project.

  • Constructor Details

    • CascadeRepo

      public CascadeRepo(MavenCoordinate coordinate, String repo, String url, RepositoryKey repositoryKey, ProjectCascade cascade)
      Canonical constructor — validates the coordinate and the embedded ProjectCascade, and defaults repo to the artifactId when blank.
    • CascadeRepo

      public CascadeRepo(MavenCoordinate coordinate, String repo, String url, ProjectCascade cascade)
      Convenience constructor for callers that have no RepositoryKey yet — older assemblies and tests. The repositoryKey field is set to null.
      Parameters:
      coordinate - the project's coordinate
      repo - the on-disk directory / GitHub repo name
      url - the canonical upstream git URL, or null
      cascade - the project's parsed manifest
    • CascadeRepo

      public CascadeRepo(String groupId, String artifactId, String repo, String url, ProjectCascade cascade)
      Convenience constructor accepting raw groupId / artifactId strings. Wraps them into a MavenCoordinate.
      Parameters:
      groupId - the Maven groupId
      artifactId - the Maven artifactId
      repo - the on-disk directory / GitHub repo name
      url - the canonical upstream git URL
      cascade - the project's parsed manifest
    • CascadeRepo

      public CascadeRepo(String groupId, String artifactId, String repo, String url, RepositoryKey repositoryKey, ProjectCascade cascade)
      Convenience constructor accepting raw groupId / artifactId strings plus a RepositoryKey.
      Parameters:
      groupId - the Maven groupId
      artifactId - the Maven artifactId
      repo - the on-disk directory / GitHub repo name
      url - the canonical upstream git URL
      repositoryKey - the repository identity, or null
      cascade - the project's parsed manifest
  • Method Details

    • groupId

      public String groupId()
      Returns the coordinate's groupId. Delegates to MavenCoordinate.groupId() for compatibility with the pre-record API.
      Returns:
      the groupId
    • artifactId

      public String artifactId()
      Returns the coordinate's artifactId. Delegates to MavenCoordinate.artifactId() for compatibility with the pre-record API.
      Returns:
      the artifactId
    • ga

      public String ga()
      Returns the "groupId:artifactId" display form.
      Returns:
      the G:A string
    • upstream

      public List<CascadeEdge> upstream()
      The upstream edges — the projects this one consumes.
      Returns:
      this project's upstream edges; never null
    • downstream

      public List<CascadeEdge> downstream()
      The downstream edges — the projects that consume this one.
      Returns:
      this project's downstream edges; never null
    • consumes

      public List<String> consumes()
      The groupIds this project consumes, drawn from its upstream edges.
      Returns:
      the upstream groupIds; never null
    • head

      public boolean head()
      Whether this project is the head of the cascade.
      Returns:
      true if it declares no upstream edge
    • terminal

      public boolean terminal()
      Whether this project is the terminus of the cascade.
      Returns:
      true if it declares no downstream edge
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • coordinate

      public MavenCoordinate coordinate()
      Returns the value of the coordinate record component.
      Returns:
      the value of the coordinate record component
    • repo

      public String repo()
      Returns the value of the repo record component.
      Returns:
      the value of the repo record component
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • repositoryKey

      public RepositoryKey repositoryKey()
      Returns the value of the repositoryKey record component.
      Returns:
      the value of the repositoryKey record component
    • cascade

      public ProjectCascade cascade()
      Returns the value of the cascade record component.
      Returns:
      the value of the cascade record component