Record Class EditSummary

java.lang.Object
java.lang.Record
io.jenkins.plugins.xmleditor.steps.EditSummary
Record Components:
written - path written, or null when nothing was written
dryRun - true when nothing was written on purpose
All Implemented Interfaces:
Serializable

public record EditSummary(String file, boolean changed, String written, List<OperationReport> reports, String diff, List<String> messages, boolean dryRun) extends Record implements Serializable
What an edit did to one file (or to text), sent back from the agent.
See Also:
  • Constructor Details

    • EditSummary

      public EditSummary(String file, boolean changed, String written, List<OperationReport> reports, String diff, List<String> messages, boolean dryRun)
      Creates an instance of a EditSummary record class.
      Parameters:
      file - the value for the file record component
      changed - the value for the changed record component
      written - the value for the written record component
      reports - the value for the reports record component
      diff - the value for the diff record component
      messages - the value for the messages record component
      dryRun - the value for the dryRun record component
  • Method Details

    • log

      public void log(PrintStream logger)
    • toFileValue

      public LinkedHashMap<String,Object> toFileValue()
      [file:, changed:, operations: [[type:, xpath:, matched:, modified:, oldValues:]]]
    • toPipelineValue

      public LinkedHashMap<String,Object> toPipelineValue()
      Value returned by xmlEdit file:: the file value plus dryRun.
    • toPipelineValue

      public static LinkedHashMap<String,Object> toPipelineValue(List<EditSummary> summaries, boolean dryRun)
      Value returned by xmlEdit files:: [changed:, dryRun:, files: [...]].
    • 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 '=='.
      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.
    • file

      public String file()
      Returns the value of the file record component.
      Returns:
      the value of the file record component
    • changed

      public boolean changed()
      Returns the value of the changed record component.
      Returns:
      the value of the changed record component
    • written

      public String written()
      Returns the value of the written record component.
      Returns:
      the value of the written record component
    • reports

      public List<OperationReport> reports()
      Returns the value of the reports record component.
      Returns:
      the value of the reports record component
    • diff

      public String diff()
      Returns the value of the diff record component.
      Returns:
      the value of the diff record component
    • messages

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

      public boolean dryRun()
      Returns the value of the dryRun record component.
      Returns:
      the value of the dryRun record component