Class Preflight
java.lang.Object
network.ike.plugin.ws.preflight.Preflight
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 Summary
Modifier and TypeMethodDescriptionstatic PreflightResultof(List<PreflightCondition> conditions, PreflightContext ctx) Evaluate each condition in order against the given context.
-
Method Details
-
of
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 evaluatectx- the shared context for the run- Returns:
- the collected outcome
-