Class LandingPageRegistrationReconciler

java.lang.Object
network.ike.plugin.reconcile.LandingPageRegistrationReconciler
All Implemented Interfaces:
SiteReconciler

public class LandingPageRegistrationReconciler extends Object implements SiteReconciler
Reconciler that keeps the project's entry on the IKE Network landing page (https://ike.network/) in sync with the current project version.

Subsumes the retired ike:register-site-{draft,publish} and ike:deregister-site-{draft,publish} goals (IKE-Network/ike-issues#398).

Detect: probe the homepage https://ike.network/ and look for the version cell beneath the project's <h2 id="<artifactId>"> block — the cell rendered from the project's projects/<id>.adoc fragment after it is included into the master index. Drift = missing section, or version cell differs from SiteContext.projectVersion. (IKE-Network/ike-issues#508 — earlier versions probed /projects/<id>.html, which always 404s in the current single-page site structure; the probe always reported drift and apply always ran.)

Apply: clone the org-site source repo, write a fresh fragment via OrgSiteSupport.registerProject(File, Log, String, String, String, String, String, String, String, String, String, String, List), build the site, push the source repo, and publish the rendered HTML to the publish repo.

Uninstall: clone the source repo, delete the fragment, rebuild, and publish — the same flow as the retired DeregisterSiteDraftMojo.

  • Constructor Details

    • LandingPageRegistrationReconciler

      public LandingPageRegistrationReconciler()
      Creates this reconciler instance.
  • Method Details

    • dimension

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

      public String optOutFlag()
      Description copied from interface: SiteReconciler
      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.
      Specified by:
      optOutFlag in interface SiteReconciler
      Returns:
      the opt-out flag name, e.g. "updateSite"
    • detect

      public SiteDriftReport detect(SiteContext ctx)
      Description copied from interface: SiteReconciler
      Inspect deployed site state and report any drift this reconciler would correct. Read-only — must not mutate any remote state.
      Specified by:
      detect in interface SiteReconciler
      Parameters:
      ctx - the per-repo site context
      Returns:
      drift report; SiteDriftReport.noDrift(String) if nothing to do
    • apply

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

      public void uninstall(SiteContext ctx)
      Description copied from interface: SiteReconciler
      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).
      Specified by:
      uninstall in interface SiteReconciler
      Parameters:
      ctx - the per-repo site context