Record Class BaselineFinding

java.lang.Object
java.lang.Record
dev.archunitjava.baseline.BaselineFinding
All Implemented Interfaces:
Comparable<BaselineFinding>

public record BaselineFinding(String identityFingerprint, String evidenceFingerprint, String exactFingerprint, String ruleId, String violationId, String violationCode, String severity, List<String> subjects, List<String> subjectIds, List<String> evidenceLocations) extends Record implements Comparable<BaselineFinding>
Reviewable snapshot and two-part stable fingerprint for one rule violation.
  • Constructor Details

    • BaselineFinding

      public BaselineFinding(String identityFingerprint, String evidenceFingerprint, String exactFingerprint, String ruleId, String violationId, String violationCode, String severity, List<String> subjects, List<String> subjectIds, List<String> evidenceLocations)
      Creates an instance of a BaselineFinding record class.
      Parameters:
      identityFingerprint - the value for the identityFingerprint record component
      evidenceFingerprint - the value for the evidenceFingerprint record component
      exactFingerprint - the value for the exactFingerprint record component
      ruleId - the value for the ruleId record component
      violationId - the value for the violationId record component
      violationCode - the value for the violationCode record component
      severity - the value for the severity record component
      subjects - the value for the subjects record component
      subjectIds - the value for the subjectIds record component
      evidenceLocations - the value for the evidenceLocations record component
  • Method Details

    • capture

      public static BaselineFinding capture(RuleResult result, Violation violation)
    • compareTo

      public int compareTo(BaselineFinding other)
      Specified by:
      compareTo in interface Comparable<BaselineFinding>
    • 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.
    • identityFingerprint

      public String identityFingerprint()
      Returns the value of the identityFingerprint record component.
      Returns:
      the value of the identityFingerprint record component
    • evidenceFingerprint

      public String evidenceFingerprint()
      Returns the value of the evidenceFingerprint record component.
      Returns:
      the value of the evidenceFingerprint record component
    • exactFingerprint

      public String exactFingerprint()
      Returns the value of the exactFingerprint record component.
      Returns:
      the value of the exactFingerprint record component
    • ruleId

      public String ruleId()
      Returns the value of the ruleId record component.
      Returns:
      the value of the ruleId record component
    • violationId

      public String violationId()
      Returns the value of the violationId record component.
      Returns:
      the value of the violationId record component
    • violationCode

      public String violationCode()
      Returns the value of the violationCode record component.
      Returns:
      the value of the violationCode record component
    • severity

      public String severity()
      Returns the value of the severity record component.
      Returns:
      the value of the severity record component
    • subjects

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

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

      public List<String> evidenceLocations()
      Returns the value of the evidenceLocations record component.
      Returns:
      the value of the evidenceLocations record component