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

public record PreflightContext(File workspaceRoot, network.ike.workspace.WorkspaceGraph graph, List<String> subprojects, String branchName, String tagName, String parentVersion) 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)
      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
  • 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.
    • 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