Record Class SiteDriftReport

java.lang.Object
java.lang.Record
network.ike.plugin.reconcile.SiteDriftReport
Record Components:
dimension - human-readable dimension name
hasDrift - true if reconciliation would change state
summary - one-line drift summary (empty when no drift)
detailLines - additional context lines (empty list ok)
defaultAction - one-line description of what apply would do
optOutCommand - exact copy-paste command to skip this dimension

public record SiteDriftReport(String dimension, boolean hasDrift, String summary, List<String> detailLines, String defaultAction, String optOutCommand) extends Record
Report from a SiteReconciler.detect(SiteContext) call describing what (if anything) the reconciler would change on site-publish.

The optOutCommand is rendered inline beside the dimension in site-draft output so users can copy-paste to opt out without first looking up the flag name elsewhere.

Parallels network.ike.plugin.ws.reconcile.DriftReport in the workspace plugin — see SiteReconciler for why the two are intentionally not shared.

  • Constructor Details

    • SiteDriftReport

      public SiteDriftReport(String dimension, boolean hasDrift, String summary, List<String> detailLines, String defaultAction, String optOutCommand)
      Creates an instance of a SiteDriftReport record class.
      Parameters:
      dimension - the value for the dimension record component
      hasDrift - the value for the hasDrift record component
      summary - the value for the summary record component
      detailLines - the value for the detailLines record component
      defaultAction - the value for the defaultAction record component
      optOutCommand - the value for the optOutCommand record component
  • Method Details

    • noDrift

      public static SiteDriftReport noDrift(String dimension)
      Convenience constructor for the "no drift" case.
      Parameters:
      dimension - the dimension name
      Returns:
      a report with hasDrift = false
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • dimension

      public String dimension()
      Returns the value of the dimension record component.
      Returns:
      the value of the dimension record component
    • hasDrift

      public boolean hasDrift()
      Returns the value of the hasDrift record component.
      Returns:
      the value of the hasDrift record component
    • summary

      public String summary()
      Returns the value of the summary record component.
      Returns:
      the value of the summary record component
    • detailLines

      public List<String> detailLines()
      Returns the value of the detailLines record component.
      Returns:
      the value of the detailLines record component
    • defaultAction

      public String defaultAction()
      Returns the value of the defaultAction record component.
      Returns:
      the value of the defaultAction record component
    • optOutCommand

      public String optOutCommand()
      Returns the value of the optOutCommand record component.
      Returns:
      the value of the optOutCommand record component