Record Class EvidenceItem
java.lang.Object
java.lang.Record
com.shaft.doctor.model.EvidenceItem
- Record Components:
id- stable content-derived identifiercategory- evidence categorymediaType- normalized media typerelativePath- optional path inside the evidence bundlesha256- checksum of sanitized retained contentsizeBytes- retained byte countcontent- optional UTF-8 textual contentredacted- whether sensitive content was removedtruncated- whether an artifact size limit was appliedattributes- safe normalized metadataprovenance- source provenance
public record EvidenceItem(String id, EvidenceCategory category, String mediaType, String relativePath, String sha256, long sizeBytes, String content, boolean redacted, boolean truncated, Map<String,String> attributes, EvidenceProvenance provenance)
extends Record
One sanitized, bounded, portable evidence item.
-
Constructor Summary
ConstructorsConstructorDescriptionEvidenceItem(String id, EvidenceCategory category, String mediaType, String relativePath, String sha256, long sizeBytes, String content, boolean redacted, boolean truncated, Map<String, String> attributes, EvidenceProvenance provenance) Creates validated immutable evidence. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.category()Returns the value of thecategoryrecord component.content()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of themediaTyperecord component.Returns the value of theprovenancerecord component.booleanredacted()Returns the value of theredactedrecord component.Returns the value of therelativePathrecord component.sha256()Returns the value of thesha256record component.longReturns the value of thesizeBytesrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thetruncatedrecord component.
-
Constructor Details
-
EvidenceItem
public EvidenceItem(String id, EvidenceCategory category, String mediaType, String relativePath, String sha256, long sizeBytes, String content, boolean redacted, boolean truncated, Map<String, String> attributes, EvidenceProvenance provenance) Creates validated immutable evidence.
-
-
Method Details
-
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. -
id
-
category
-
mediaType
-
relativePath
Returns the value of therelativePathrecord component.- Returns:
- the value of the
relativePathrecord component
-
sha256
-
sizeBytes
-
content
-
redacted
-
truncated
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
provenance
Returns the value of theprovenancerecord component.- Returns:
- the value of the
provenancerecord component
-