Record Class PreflightContext

java.lang.Object
java.lang.Record
network.ike.plugin.ws.preflight.PreflightContext
Record Components:
workspaceRoot - the workspace root directory
graph - the loaded workspace graph (may be null for conditions that operate on raw files)
subprojects - subproject names (in topological order) to evaluate
branchName - target branch for branch-oriented checks (e.g. "feature/my-feature"), or null
tagName - target tag name for tag-oriented checks (checkpoint, release), or null
parentVersion - target parent version for set-parent checks, or null
releaseSet - names of the members releasing in the current mission, for release-set-aware conditions (ike-issues#981) — null when the invoking goal has no release-mission notion
missionReleasedArtifacts - groupId:artifactId keys 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 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 a PreflightContext record class.
      Parameters:
      workspaceRoot - the value for the workspaceRoot record component
      graph - the value for the graph record component
      subprojects - the value for the subprojects record component
      branchName - the value for the branchName record component
      tagName - the value for the tagName record component
      parentVersion - the value for the parentVersion record component
      releaseSet - the value for the releaseSet record component
      missionResolvedProperties - the value for the missionResolvedProperties record component
      missionReleasedArtifacts - the value for the missionReleasedArtifacts record 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 directory
      graph - the loaded workspace graph
      subprojects - subproject names (topological order) to evaluate
      releaseSet - 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 directory
      graph - the loaded workspace graph
      subprojects - subproject names (topological order) to evaluate
      releaseSet - names of the members releasing this mission
      missionResolvedProperties - <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 directory
      graph - the loaded workspace graph
      subprojects - subproject names (topological order) to evaluate
      releaseSet - names of the members releasing this mission
      missionResolvedProperties - <subproject>::<property> keys the release plan rewrites
      missionReleasedArtifacts - groupId:artifactId keys the release plan de-qualifies
      Returns:
      the release-mission context
    • 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.
    • workspaceRoot

      public File workspaceRoot()
      Returns the value of the workspaceRoot record component.
      Returns:
      the value of the workspaceRoot record component
    • graph

      public network.ike.workspace.WorkspaceGraph graph()
      Returns the value of the graph record component.
      Returns:
      the value of the graph record component
    • subprojects

      public List<String> subprojects()
      Returns the value of the subprojects record component.
      Returns:
      the value of the subprojects record component
    • branchName

      public String branchName()
      Returns the value of the branchName record component.
      Returns:
      the value of the branchName record component
    • tagName

      public String tagName()
      Returns the value of the tagName record component.
      Returns:
      the value of the tagName record component
    • parentVersion

      public String parentVersion()
      Returns the value of the parentVersion record component.
      Returns:
      the value of the parentVersion record component
    • releaseSet

      public Set<String> releaseSet()
      Returns the value of the releaseSet record component.
      Returns:
      the value of the releaseSet record component
    • missionResolvedProperties

      public Set<String> missionResolvedProperties()
      Returns the value of the missionResolvedProperties record component.
      Returns:
      the value of the missionResolvedProperties record component
    • missionReleasedArtifacts

      public Set<String> missionReleasedArtifacts()
      Returns the value of the missionReleasedArtifacts record component.
      Returns:
      the value of the missionReleasedArtifacts record component