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 purposerepo- git clone URLbranch- the branch to trackversion- Maven version string, or null if not versionedgroupId- Maven groupIddependsOn- inter-repository dependenciesnotes- free-text migration or status notesmavenVersion- Maven version for the wrapper (e.g., "4.0.0-rc-5"), overridesDefaults.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-initchecks out this exact commit instead of branch HEAD. Written byws: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 whenstate="tag-aligned"; null whenstate="snapshot".kind- whenstate="tag-aligned", distinguishes"release"(artifact is in Nexus) from"checkpoint"(artifact may need localmvn install). Null whenstate="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-aligned —
state="snapshot"(the default on legacy manifests). The subproject is in the workspace, tracked as a SNAPSHOT, and released byws:release. - tag-aligned —
state="tag-aligned"withtag="<git-tag>"andkind="release"orkind="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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSentinel for thecheckpointsub-kind of tag-aligned.static final StringSentinel for thereleasesub-kind of tag-aligned.static final StringSentinel for the snapshot-aligned state — the default alignment.static final StringSentinel for the tag-aligned state. -
Constructor Summary
ConstructorsConstructorDescriptionSubproject(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 aSubprojectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbranch()Returns the value of thebranchrecord component.Returns the value of thedependsOnrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.groupId()Returns the value of thegroupIdrecord component.final inthashCode()Returns a hash code value for this object.booleanWhether this subproject participates in the workspace's release cascade —truefor snapshot-aligned (the default),falsefor tag-aligned.booleanWhether this subproject is pinned to a tag and excluded from the release cascade.kind()Returns the value of thekindrecord component.Returns the value of themavenVersionrecord component.name()Returns the value of thenamerecord component.notes()Returns the value of thenotesrecord component.parent()Returns the value of theparentrecord component.repo()Returns the value of thereporecord component.sha()Returns the value of thesharecord component.state()Returns the value of thestaterecord component.tag()Returns the value of thetagrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Field Details
-
STATE_SNAPSHOT
Sentinel for the snapshot-aligned state — the default alignment.- See Also:
-
STATE_TAG_ALIGNED
-
KIND_RELEASE
-
KIND_CHECKPOINT
Sentinel for thecheckpointsub-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 aSubprojectrecord class.- Parameters:
name- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentrepo- the value for thereporecord componentbranch- the value for thebranchrecord componentversion- the value for theversionrecord componentgroupId- the value for thegroupIdrecord componentdependsOn- the value for thedependsOnrecord componentnotes- the value for thenotesrecord componentmavenVersion- the value for themavenVersionrecord componentparent- the value for theparentrecord componentsha- the value for thesharecord componentstate- the value for thestaterecord componenttag- the value for thetagrecord componentkind- the value for thekindrecord component
-
-
Method Details
-
isSnapshotAligned
-
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
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
name
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
repo
-
branch
-
version
-
groupId
-
dependsOn
-
notes
-
mavenVersion
Returns the value of themavenVersionrecord component.- Returns:
- the value of the
mavenVersionrecord component
-
parent
-
sha
-
state
-
tag
-
kind
-