Record Class PreflightContext
java.lang.Object
java.lang.Record
network.ike.plugin.ws.preflight.PreflightContext
- Record Components:
workspaceRoot- the workspace root directorygraph- the loaded workspace graph (may benullfor conditions that operate on raw files)subprojects- subproject names (in topological order) to evaluatebranchName- target branch for branch-oriented checks (e.g."feature/my-feature"), ornulltagName- target tag name for tag-oriented checks (checkpoint, release), ornullparentVersion- target parent version for set-parent checks, ornullreleaseSet- names of the members releasing in the current mission, for release-set-aware conditions (ike-issues#981) —nullwhen the invoking goal has no release-mission notionmissionReleasedArtifacts-groupId:artifactIdkeys of the artifacts the current mission's release plan de-qualifies — every reference to one of them is retargeted by the version pass, so snapshot references to them must not refuse the release (ike-issues#1022); empty when no mission is running
public record PreflightContext(File workspaceRoot, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects, String branchName, String tagName, String parentVersion, Set<String> releaseSet, Set<String> missionResolvedProperties, Set<String> missionReleasedArtifacts)
extends Record
Data that
PreflightCondition.check(PreflightContext) invocations
may need. Each condition pulls only the fields it uses — context
fields that aren't relevant for a given invocation may be null.
New fields are added here as new preflight conditions are introduced that need them. Keep the record flat: a condition that grows a private parameter should pass it through this record rather than through a back-channel.
-
Constructor Summary
ConstructorsConstructorDescriptionPreflightContext(File workspaceRoot, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects, String branchName, String tagName, String parentVersion, Set<String> releaseSet, Set<String> missionResolvedProperties, Set<String> missionReleasedArtifacts) Creates an instance of aPreflightContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebranchNamerecord component.final booleanIndicates whether some other object is "equal to" this one.network.ike.workspace.WorkspaceGraphgraph()Returns the value of thegraphrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themissionReleasedArtifactsrecord component.Returns the value of themissionResolvedPropertiesrecord component.static PreflightContextMinimal context for conditions that only need root + subproject list.static PreflightContextof(File root, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects, Set<String> releaseSet) Context for the release preflight — carries this mission's release set so conditions can exempt what the mission itself resolves (ike-issues#981).static PreflightContextof(File root, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects, Set<String> releaseSet, Set<String> missionResolvedProperties) Context for the release preflight, carrying both this mission's release set and the version properties the mission's own release plan rewrites.static PreflightContextof(File root, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects, Set<String> releaseSet, Set<String> missionResolvedProperties, Set<String> missionReleasedArtifacts) Context for the release preflight, carrying the release set, the version properties the mission's plan rewrites (ike-issues#1004), and the artifacts the mission releases (ike-issues#1022).Returns the value of theparentVersionrecord component.Returns the value of thereleaseSetrecord component.Returns the value of thesubprojectsrecord component.tagName()Returns the value of thetagNamerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theworkspaceRootrecord component.
-
Constructor Details
-
PreflightContext
public PreflightContext(File workspaceRoot, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects, String branchName, String tagName, String parentVersion, Set<String> releaseSet, Set<String> missionResolvedProperties, Set<String> missionReleasedArtifacts) Creates an instance of aPreflightContextrecord class.- Parameters:
workspaceRoot- the value for theworkspaceRootrecord componentgraph- the value for thegraphrecord componentsubprojects- the value for thesubprojectsrecord componentbranchName- the value for thebranchNamerecord componenttagName- the value for thetagNamerecord componentparentVersion- the value for theparentVersionrecord componentreleaseSet- the value for thereleaseSetrecord componentmissionResolvedProperties- the value for themissionResolvedPropertiesrecord componentmissionReleasedArtifacts- the value for themissionReleasedArtifactsrecord component
-
-
Method Details
-
of
public static PreflightContext of(File root, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects) Minimal context for conditions that only need root + subproject list. -
of
public static PreflightContext of(File root, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects, Set<String> releaseSet) Context for the release preflight — carries this mission's release set so conditions can exempt what the mission itself resolves (ike-issues#981).- Parameters:
root- the workspace root directorygraph- the loaded workspace graphsubprojects- subproject names (topological order) to evaluatereleaseSet- names of the members releasing this mission- Returns:
- the release-mission context
-
of
public static PreflightContext of(File root, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects, Set<String> releaseSet, Set<String> missionResolvedProperties) Context for the release preflight, carrying both this mission's release set and the version properties the mission's own release plan rewrites. The plan is the authority on what the mission resolves: a property it de-qualifies never reaches a released POM as a SNAPSHOT, whatever the manifest does or does not declare about it (ike-issues#1004).- Parameters:
root- the workspace root directorygraph- the loaded workspace graphsubprojects- subproject names (topological order) to evaluatereleaseSet- names of the members releasing this missionmissionResolvedProperties-<subproject>::<property>keys the release plan rewrites- Returns:
- the release-mission context
-
of
public static PreflightContext of(File root, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects, Set<String> releaseSet, Set<String> missionResolvedProperties, Set<String> missionReleasedArtifacts) Context for the release preflight, carrying the release set, the version properties the mission's plan rewrites (ike-issues#1004), and the artifacts the mission releases (ike-issues#1022). The plan remains the authority on both exemption channels: a property it rewrites and a reference to an artifact it de-qualifies are each resolved by the mission before anything deploys.- Parameters:
root- the workspace root directorygraph- the loaded workspace graphsubprojects- subproject names (topological order) to evaluatereleaseSet- names of the members releasing this missionmissionResolvedProperties-<subproject>::<property>keys the release plan rewritesmissionReleasedArtifacts-groupId:artifactIdkeys the release plan de-qualifies- Returns:
- the release-mission context
-
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). -
workspaceRoot
Returns the value of theworkspaceRootrecord component.- Returns:
- the value of the
workspaceRootrecord component
-
graph
-
subprojects
Returns the value of thesubprojectsrecord component.- Returns:
- the value of the
subprojectsrecord component
-
branchName
Returns the value of thebranchNamerecord component.- Returns:
- the value of the
branchNamerecord component
-
tagName
-
parentVersion
Returns the value of theparentVersionrecord component.- Returns:
- the value of the
parentVersionrecord component
-
releaseSet
Returns the value of thereleaseSetrecord component.- Returns:
- the value of the
releaseSetrecord component
-
missionResolvedProperties
-
missionReleasedArtifacts
Returns the value of themissionReleasedArtifactsrecord component.- Returns:
- the value of the
missionReleasedArtifactsrecord component
-