Record Class DriftReport
- Record Components:
dimension- human-readable dimension namehasDrift- true if reconciliation would change statesummary- one-line drift summary (empty when no drift)detailLines- additional context lines (empty list ok)defaultAction- one-line description of what apply would dooptOutCommand- exact copy-paste command to skip this dimension
Reconciler.detect(WorkspaceContext) call describing what (if
anything) the reconciler would change on scaffold-publish.
The optOutCommand is rendered inline beside the
dimension in scaffold-draft output so users can copy-paste
to opt out without first looking up the flag name elsewhere.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultActionrecord component.Returns the value of thedetailLinesrecord component.Returns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanhasDrift()Returns the value of thehasDriftrecord component.final inthashCode()Returns a hash code value for this object.static DriftReportConvenience constructor for the "no drift" case.Returns the value of theoptOutCommandrecord component.summary()Returns the value of thesummaryrecord component.Render this report as a Markdown fragment describing what ascaffold-publishreconciler applied — the past-tense counterpart oftoMarkdown()(IKE-Network/ike-issues#431).Render this report as a Markdown fragment for a goal report file (IKE-Network/ike-issues#407).final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DriftReport
public DriftReport(String dimension, boolean hasDrift, String summary, List<String> detailLines, String defaultAction, String optOutCommand) Creates an instance of aDriftReportrecord class.- Parameters:
dimension- the value for thedimensionrecord componenthasDrift- the value for thehasDriftrecord componentsummary- the value for thesummaryrecord componentdetailLines- the value for thedetailLinesrecord componentdefaultAction- the value for thedefaultActionrecord componentoptOutCommand- the value for theoptOutCommandrecord component
-
-
Method Details
-
noDrift
Convenience constructor for the "no drift" case.- Parameters:
dimension- the dimension name- Returns:
- a report with
hasDrift = false
-
toMarkdown
Render this report as a Markdown fragment for a goal report file (IKE-Network/ike-issues#407).Shared renderer so reconciler drift looks the same in every report that includes it: a checkmark line when there is no drift, otherwise the dimension, summary, detail lines, default action, and the copy-paste opt-out command.
- Returns:
- a Markdown fragment, newline-terminated
-
toAppliedMarkdown
Render this report as a Markdown fragment describing what ascaffold-publishreconciler applied — the past-tense counterpart oftoMarkdown()(IKE-Network/ike-issues#431).A reconciler's
Reconciler.apply(WorkspaceContext)does exactly what itsReconciler.detect(WorkspaceContext)reported when the two are called back to back on an unchanged workspace, so the samedetailLines(e.g.doc-example: ike-parent:66 → 67) describe the applied changes. The driftsummary,defaultAction, andoptOutCommandare future-tense and omitted here.- Returns:
- a Markdown fragment, newline-terminated
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
dimension
-
hasDrift
-
summary
-
detailLines
Returns the value of thedetailLinesrecord component.- Returns:
- the value of the
detailLinesrecord component
-
defaultAction
Returns the value of thedefaultActionrecord component.- Returns:
- the value of the
defaultActionrecord component
-
optOutCommand
Returns the value of theoptOutCommandrecord component.- Returns:
- the value of the
optOutCommandrecord component
-