Table of Contents

Interface IDataInventoryStore

Namespace
Excalibur.Compliance
Assembly
Excalibur.Compliance.Abstractions.dll

Storage abstraction for data inventory registrations.

public interface IDataInventoryStore

Remarks

The data inventory supports: - Automatic discovery from [PersonalData] attributed fields - Manual registration for custom data locations - Data mapping for GDPR RoPA (Records of Processing Activities)

Query operations (FindRegistrationsForDataSubject, GetDiscoveredLocations, GetDataMapEntries) are available via IDataInventoryQueryStore, accessed through GetService(Type).

Tenant confinement — contract, not yet a shipped guarantee. Every member here is specified to be confined to the ambient tenant established for this store instance, the same way as every other TenantOwnedAttribute-declaring contract: a confined read returns none of another tenant's registrations and every one of the caller's own, and a confined write can neither be overwritten by, nor overwrite, another tenant's record. GetAllRegistrationsAsync(CancellationToken) is confined by this same rule, not estate-wide — its name predates the framework's convention that an estate-wide operation says so explicitly, and it should not be read as an exception. As of this writing, no provider shipped with the framework attests either ITenantScopingCapability<TContract> or ITenantPartitionedCapability<TContract> for this contract, so no shipped implementation is confined by the framework yet; conformance against a real provider, once one exists, is what will bind an implementation to this specification.

Methods

GetAllRegistrationsAsync(CancellationToken)

Gets all registrations.

Task<IReadOnlyList<DataLocationRegistration>> GetAllRegistrationsAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IReadOnlyList<DataLocationRegistration>>

List of all registrations.

GetService(Type)

Gets a sub-interface or related service from this store implementation.

object? GetService(Type serviceType)

Parameters

serviceType Type

The type of service to retrieve (e.g. IDataInventoryQueryStore).

Returns

object

The service instance, or null if the store does not implement the requested type.

Remarks

This follows the IServiceProvider.GetService escape-hatch pattern from Microsoft design guidelines, allowing callers to discover optional sub-interfaces without widening the core interface.

RecordDiscoveredLocationAsync(DataLocation, string, CancellationToken)

Records a discovered data location for a data subject.

Task RecordDiscoveredLocationAsync(DataLocation location, string dataSubjectId, CancellationToken cancellationToken)

Parameters

location DataLocation

The discovered location.

dataSubjectId string

The data subject identifier.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

RemoveRegistrationAsync(string, string, CancellationToken)

Removes a data location registration.

Task<bool> RemoveRegistrationAsync(string tableName, string fieldName, CancellationToken cancellationToken)

Parameters

tableName string

The table name.

fieldName string

The field name.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<bool>

True if the registration was removed.

SaveRegistrationAsync(DataLocationRegistration, CancellationToken)

Saves a data location registration.

Task SaveRegistrationAsync(DataLocationRegistration registration, CancellationToken cancellationToken)

Parameters

registration DataLocationRegistration

The registration to save.

cancellationToken CancellationToken

Cancellation token.

Returns

Task