Record Class Subproject

java.lang.Object
java.lang.Record
network.ike.workspace.Subproject
Record Components:
name - the subproject identifier (directory name and YAML key)
description - human-readable purpose
repo - git clone URL
branch - the branch to track
version - Maven version string, or null if not versioned
groupId - Maven groupId
dependsOn - inter-repository dependencies
notes - free-text migration or status notes
mavenVersion - Maven version for the wrapper (e.g., "4.0.0-rc-5"), overrides Defaults.mavenVersion(). Null to inherit.
parent - subproject name of the Maven parent POM, or null if the parent is not a workspace subproject. Used by ws:scaffold-draft (which folds verify per #393) and ws:align-publish to enforce parent version alignment.
sha - git commit SHA to check out. When present, ws:scaffold-init checks out this exact commit instead of branch HEAD. Written by ws:checkpoint-publish. Null means use branch HEAD.
state - alignment state — "snapshot" (default, in release cascade) or "tag-aligned" (frozen at a tag, not in release cascade). Schema 1.1+ field (ike-issues#233); legacy manifests default to "snapshot" on read.
tag - git tag this subproject is pinned to when state="tag-aligned"; null when state="snapshot".
kind - when state="tag-aligned", distinguishes "release" (artifact is in Nexus) from "checkpoint" (artifact may need local mvn install). Null when state="snapshot".

public record Subproject(String name, String description, String repo, String branch, String version, String groupId, List<Dependency> dependsOn, String notes, String mavenVersion, String parent, String sha, String state, String tag, String kind) extends Record
A workspace subproject — one git repository in the workspace manifest.

The state, tag, and kind fields express the subproject's alignment with the workspace's release cascade (ike-issues#233). The four-state alignment model:

  • snapshot-alignedstate="snapshot" (the default on legacy manifests). The subproject is in the workspace, tracked as a SNAPSHOT, and released by ws:release.
  • tag-alignedstate="tag-aligned" with tag="<git-tag>" and kind="release" or kind="checkpoint". Source on disk for IDE debugging, but pinned at a tag and not in the release cascade.
  • external-consumer — absent from the manifest entirely; referenced by released GAV from Nexus.
  • unrelated — neither in the manifest nor referenced.

Goals introduced by #233 (ws:attach-snapshot, ws:attach-release, ws:attach-checkpoint, ws:promote, ws:demote, ws:detach) drive transitions across the lattice; ws:add / ws:remove remain shortcuts for external-consumer ⇄ snapshot-aligned.

  • Field Details

    • STATE_SNAPSHOT

      public static final String STATE_SNAPSHOT
      Sentinel for the snapshot-aligned state — the default alignment.
      See Also:
    • STATE_TAG_ALIGNED

      public static final String STATE_TAG_ALIGNED
      Sentinel for the tag-aligned state.
      See Also:
    • KIND_RELEASE

      public static final String KIND_RELEASE
      Sentinel for the release sub-kind of tag-aligned.
      See Also:
    • KIND_CHECKPOINT

      public static final String KIND_CHECKPOINT
      Sentinel for the checkpoint sub-kind of tag-aligned.
      See Also:
  • Constructor Details

    • Subproject

      public Subproject(String name, String description, String repo, String branch, String version, String groupId, List<Dependency> dependsOn, String notes, String mavenVersion, String parent, String sha, String state, String tag, String kind)
      Creates an instance of a Subproject record class.
      Parameters:
      name - the value for the name record component
      description - the value for the description record component
      repo - the value for the repo record component
      branch - the value for the branch record component
      version - the value for the version record component
      groupId - the value for the groupId record component
      dependsOn - the value for the dependsOn record component
      notes - the value for the notes record component
      mavenVersion - the value for the mavenVersion record component
      parent - the value for the parent record component
      sha - the value for the sha record component
      state - the value for the state record component
      tag - the value for the tag record component
      kind - the value for the kind record component
  • Method Details

    • isSnapshotAligned

      public boolean isSnapshotAligned()
      Whether this subproject participates in the workspace's release cascade — true for snapshot-aligned (the default), false for tag-aligned. Convenience over comparing state() to a sentinel.
      Returns:
      true if state() is "snapshot" or null (legacy manifest default)
    • isTagAligned

      public boolean isTagAligned()
      Whether this subproject is pinned to a tag and excluded from the release cascade.
      Returns:
      true if state() equals "tag-aligned"
    • 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

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

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

      public String branch()
      Returns the value of the branch record component.
      Returns:
      the value of the branch record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • groupId

      public String groupId()
      Returns the value of the groupId record component.
      Returns:
      the value of the groupId record component
    • dependsOn

      public List<Dependency> dependsOn()
      Returns the value of the dependsOn record component.
      Returns:
      the value of the dependsOn record component
    • notes

      public String notes()
      Returns the value of the notes record component.
      Returns:
      the value of the notes record component
    • mavenVersion

      public String mavenVersion()
      Returns the value of the mavenVersion record component.
      Returns:
      the value of the mavenVersion record component
    • parent

      public String parent()
      Returns the value of the parent record component.
      Returns:
      the value of the parent record component
    • sha

      public String sha()
      Returns the value of the sha record component.
      Returns:
      the value of the sha record component
    • state

      public String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • tag

      public String tag()
      Returns the value of the tag record component.
      Returns:
      the value of the tag record component
    • kind

      public String kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component