Interface SiteReconciler

All Known Implementing Classes:
DeployedSiteReconciler, LandingPageRegistrationReconciler, StaleSiteCleanupReconciler

public interface SiteReconciler
One dimension of site-state reconciliation under the convergence pattern (ike:site-{draft,publish}, #398).

Each reconciler owns a single conceptual dimension of deployed site state (the project's own site at its versioned URL, its registration on the IKE Network landing page, leftover stale site directories on the deploy server) and has two operations: detect(SiteContext) (read-only, used by site-draft) and apply(SiteContext) (mutating, used by site-publish).

The pattern intentionally subsumes what were previously standalone Maven goals (deploy-site-*, register-site-*, deregister-site-*, clean-site): each retired goal's logic becomes a single SiteReconciler implementation, and site-publish iterates the SiteReconcilerRegistry to apply them in order.

This interface parallels network.ike.plugin.ws.reconcile.Reconciler in the workspace plugin. The two are kept separate because the per-repo SiteContext carries a different shape than the workspace plugin's WorkspaceContext — sharing the interface would force both plugins to fit one context shape. See #398 for the architecture rationale (decision: duplicate, not share).

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Apply reconciliation.
    Inspect deployed site state and report any drift this reconciler would correct.
    Human-readable name of the dimension this reconciler owns.
    The Maven property name (without the -D prefix) that opts out of this reconciler's apply pass.
    default void
    Apply the "uninstall" variant of this reconciler — used by site-publish -Dsite=removed to tear down the deployed site and its registration.
  • Method Details

    • dimension

      String dimension()
      Human-readable name of the dimension this reconciler owns. Used as the heading in site-draft output.
      Returns:
      the dimension label, e.g. "Deployed site version"
    • optOutFlag

      String optOutFlag()
      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 site-publish invocation.
      Returns:
      the opt-out flag name, e.g. "updateSite"
    • detect

      Inspect deployed site state and report any drift this reconciler would correct. Read-only — must not mutate any remote state.
      Parameters:
      ctx - the per-repo site context
      Returns:
      drift report; SiteDriftReport.noDrift(String) if nothing to do
    • apply

      void apply(SiteContext ctx)
      Apply reconciliation. Caller is responsible for checking SiteReconcilerOptions.isOptedOut(String) before invoking; implementations may also re-check defensively.
      Parameters:
      ctx - the per-repo site context
    • uninstall

      default void uninstall(SiteContext ctx)
      Apply the "uninstall" variant of this reconciler — used by site-publish -Dsite=removed to tear down the deployed site and its registration. Default implementation does nothing (reconcilers that only forward-deploy can be inverted by the stale-cleanup reconciler instead).
      Parameters:
      ctx - the per-repo site context