Class FieldNormalizationReconciler

java.lang.Object
network.ike.plugin.ws.reconcile.FieldNormalizationReconciler
All Implemented Interfaces:
Reconciler

public class FieldNormalizationReconciler extends Object implements Reconciler
Reconciler that keeps the denormalized workspace.yaml fields (version, groupId) in sync with each cloned subproject's POM.

Subsumes the retired ws:fix goal (IKE-Network/ike-issues#393). The Maven coordinates in workspace.yaml are denormalized convenience — the authoritative source is each subproject's pom.xml. This reconciler detects when the manifest has drifted from POM truth and applies the corrections.

Only version and groupId are touched. Novel fields (repo, branch, type, depends-on) are never modified by this reconciler.

Subprojects that are not yet cloned are silently skipped — they have no POM to compare against.

  • Constructor Details

    • FieldNormalizationReconciler

      public FieldNormalizationReconciler()
  • Method Details

    • dimension

      public String dimension()
      Description copied from interface: Reconciler
      Human-readable name of the dimension this reconciler owns. Used as the heading in scaffold-draft output.
      Specified by:
      dimension in interface Reconciler
      Returns:
      the dimension label, e.g. "Denormalized YAML fields"
    • optOutFlag

      public String optOutFlag()
      Description copied from interface: Reconciler
      The Maven property name (without the -D prefix) that opts out of this reconciler's apply pass. Setting the property to "false" skips this dimension on a given scaffold-publish invocation.
      Specified by:
      optOutFlag in interface Reconciler
      Returns:
      the opt-out flag name, e.g. "updateFields"
    • detect

      public DriftReport detect(WorkspaceContext ctx)
      Description copied from interface: Reconciler
      Inspect the workspace and report any drift this reconciler would correct. Read-only — must not mutate the workspace.
      Specified by:
      detect in interface Reconciler
      Parameters:
      ctx - the workspace context
      Returns:
      drift report; DriftReport.noDrift(String) if nothing to do
    • apply

      public void apply(WorkspaceContext ctx)
      Description copied from interface: Reconciler
      Apply reconciliation. Caller is responsible for checking ReconcilerOptions.isOptedOut(String) before invoking; implementations may also re-check defensively.
      Specified by:
      apply in interface Reconciler
      Parameters:
      ctx - the workspace context