Record Class CapturePrivacyPolicy

java.lang.Object
java.lang.Record
com.shaft.capture.privacy.CapturePrivacyPolicy
Record Components:
sensitiveFieldNames - logical field names that must never be persisted
sensitiveSelectors - selectors that identify secret inputs
sensitiveAttributeNames - attributes that must be removed
sensitiveUrlParameters - URL parameters whose values must be removed
sensitiveValuePatterns - regular expressions identifying secret values
externalDataPath - relative JSON file used for ordinary captured values

public record CapturePrivacyPolicy(Set<String> sensitiveFieldNames, List<String> sensitiveSelectors, Set<String> sensitiveAttributeNames, Set<String> sensitiveUrlParameters, List<String> sensitiveValuePatterns, String externalDataPath) extends Record
Deterministic capture privacy configuration.
  • Constructor Details

    • CapturePrivacyPolicy

      public CapturePrivacyPolicy(Set<String> sensitiveFieldNames, List<String> sensitiveSelectors, Set<String> sensitiveAttributeNames, Set<String> sensitiveUrlParameters, List<String> sensitiveValuePatterns, String externalDataPath)
      Creates immutable normalized privacy rules.
  • Method Details

    • defaults

      public static CapturePrivacyPolicy defaults()
      Returns conservative browser-capture defaults.
      Returns:
      default privacy policy
    • 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.
    • sensitiveFieldNames

      public Set<String> sensitiveFieldNames()
      Returns the value of the sensitiveFieldNames record component.
      Returns:
      the value of the sensitiveFieldNames record component
    • sensitiveSelectors

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

      public Set<String> sensitiveAttributeNames()
      Returns the value of the sensitiveAttributeNames record component.
      Returns:
      the value of the sensitiveAttributeNames record component
    • sensitiveUrlParameters

      public Set<String> sensitiveUrlParameters()
      Returns the value of the sensitiveUrlParameters record component.
      Returns:
      the value of the sensitiveUrlParameters record component
    • sensitiveValuePatterns

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

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