Archives a single record:
ProtectedBuildBuilds the ArchiveDocument JSON structure from a record context.
The archive context
The timestamp for this version
A fully populated ArchiveDocument
ProtectedBuildBuilds a storage path for an archive document.
Format: {basePath}/{SanitizedEntityName}/{RecordID}/{VersionStamp}.json
The configured base path prefix
The entity name (will be sanitized)
The primary key value of the record
The timestamp for this archive version
The full storage path string
ProtectedExtractExtracts the values of fields configured for archiving from the record.
ProtectedExtractExtracts a full record snapshot if configured, otherwise returns null.
ProtectedExtractExtracts the primary key fields and values from a BaseEntity record.
ProtectedFormatFormats a Date as an ISO 8601 string safe for use in file paths. Colons are replaced with underscores.
Restores a previously archived record by reading the archive document from storage and setting the field values back on the source record.
ProtectedSanitizeSanitizes a string for use as a storage path segment by replacing spaces, colons, and other problematic characters with underscores.
Determines whether the record should be archived by checking if at least one of the configured fields (or SkipIfAllNullFields) has a non-null value. If no specific fields are configured but ArchiveFullRecord is true, always archives — the intent is a full record snapshot, not field stripping.
Default archive driver implementation. Archives configured field values to external storage, applies the appropriate post-archive action based on mode (StripFields, HardDelete, ArchiveOnly), and supports restoring the original values from the stored archive document.