Record Class SiteReconcilerOptions

java.lang.Object
java.lang.Record
network.ike.plugin.reconcile.SiteReconcilerOptions
Record Components:
rawFlags - map of flag-name → string value (already extracted from Maven system properties by the calling Mojo)

public record SiteReconcilerOptions(Map<String,String> rawFlags) extends Record
Flag bag passed through SiteContext to site reconcilers. Backs the convergence-pattern flag scheme defined in IKE-Network/ike-issues#398 (mirroring the #393 ws-side scheme):
  • Default (no flag): deploy current version + register on the landing page.
  • Opt out: -D<optOutFlag>=false — skip a single reconciler entirely (e.g. -DupdateSite=false, -DupdateRegistration=false).
  • Uninstall: -Dsite=removed — invert the apply pass and tear down the deployed site + registration (subsumes the retired clean-site + deregister-site workflows).
  • Field Details

  • Constructor Details

    • SiteReconcilerOptions

      public SiteReconcilerOptions(Map<String,String> rawFlags)
      Creates an instance of a SiteReconcilerOptions record class.
      Parameters:
      rawFlags - the value for the rawFlags record component
  • Method Details

    • isOptedOut

      public boolean isOptedOut(String flag)
      Tests whether a reconciler has been opted out via -D<flag>=false.
      Parameters:
      flag - flag name (without -D prefix)
      Returns:
      true if the flag is present with value "false"
    • pin

      public Optional<String> pin(String flag)
      Returns the user-supplied pin value for a reconciler that supports pinning to a specific version or target.
      Parameters:
      flag - pin-flag name (without -D prefix)
      Returns:
      the pinned value, or empty if no pin was provided
    • isUninstall

      public boolean isUninstall()
      Tests whether the user requested the uninstall pass via -Dsite=removed.
      Returns:
      true if -Dsite=removed was supplied — the publish pass should run as an uninstall instead of a forward deploy
    • empty

      public static SiteReconcilerOptions empty()
      Convenience factory for callers that have no flags to pass.
      Returns:
      an options bag with no flags set
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • rawFlags

      public Map<String,String> rawFlags()
      Returns the value of the rawFlags record component.
      Returns:
      the value of the rawFlags record component