Class Preflight

java.lang.Object
network.ike.plugin.ws.preflight.Preflight

public final class Preflight extends Object
Runs a sequence of PreflightConditions against a shared PreflightContext and collects the failures into a PreflightResult. A single entry point both draft and publish siblings share, so the two variants cannot diverge on which conditions get checked.

Example:

PreflightResult result = Preflight.of(
    List.of(PreflightCondition.WORKING_TREE_CLEAN),
    PreflightContext.of(root, graph, sorted));

if (publish) result.requirePassed(WsGoal.ALIGN_PUBLISH);
else         result.warnIfFailed(log, WsGoal.ALIGN_PUBLISH);
  • Method Details

    • of

      public static PreflightResult of(List<PreflightCondition> conditions, PreflightContext ctx)
      Evaluate each condition in order against the given context. Evaluation is not short-circuiting — every condition runs so the user sees every failing precondition in a single run.
      Parameters:
      conditions - the conditions to evaluate
      ctx - the shared context for the run
      Returns:
      the collected outcome