AudioVideoService¶
AudioVideoService is the concrete implementation of IAudioVideoService and the orchestration entry point for this library; it composes IUnitOfWork, IEnvironmentService, IImportStatusManager, IRecordingSystem, and IConsoleLogService to implement every operation in Operations and processes.
Purpose¶
- Implements recording import (validation, backup, conversion, verification, CallRex deletion), status retrieval, invalidation/cancellation, and claim-media-presence checks.
- Supports a reduced "disabled services" construction mode (
_enableServicesFlag == false) in which onlyHasMediais usable (BR-AV-19).
Context¶
- Namespace:
SAIF.Services.Utilities.AudioVideo - Assembly/package:
SAIF.Application.Services.AudioVideo.32 - Implements:
IAudioVideoService,IDisposable
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| AudioVideoService(...) | AudioVideoService(IUnitOfWork uow, IEnvironmentService environmentService, IImportStatusManager importStatusManager, IRecordingSystem recordingSystem, IConsoleLogService logService) |
Full constructor enabling all operations. |
| AudioVideoService(IUnitOfWork uow) | AudioVideoService(IUnitOfWork uow) |
Reduced constructor; disables all operations except HasMedia (BR-AV-19). |
| ImportRecording | void ImportRecording(ImportAudioRequest request) |
Validates and imports a call recording; see Import call recording. |
| MarkImportStatusErrored | void MarkImportStatusErrored(Guid recordingId, string reason) |
Sets the import status of a recording to Errored with the given reason.* |
| InvalidateRecording | void InvalidateRecording(Guid callRecordingId) |
Marks a recording invalid and clears its import status; see Invalidate or cancel a recording. |
| CancelImport | void CancelImport(Guid callRecordingId) |
Clears a recording's import status without invalidating it in CallRex. |
| GetRecordingInfo(Guid) | RecordingInfo GetRecordingInfo(Guid recordingId) |
Retrieves a RecordingInfo projection for a persisted recording; see Retrieve recording status. |
| HasMedia | bool HasMedia(string claimId) |
Reports whether any recordings exist for the given claim; usable even in reduced-services mode. |
| Dispose | void Dispose() |
Releases the underlying IUnitOfWork/IRecordingSystem resources. |
| VENDOR_INPUT_AUDIO_FILE_EXTENSION | const string VENDOR_INPUT_AUDIO_FILE_EXTENSION |
The file extension of the source recording as received from CallRex (.mp3). |
| DESTINATION_AUDIO_FILE_EXTENSION | const string DESTINATION_AUDIO_FILE_EXTENSION |
The file extension of the converted recording (.wma). |
Behavioral notes¶
ImportRecordingfollows the nine-step sequence documented in Import call recording: validate, look up/create theRecordingrow, back up and MD5-verify the source file (BR-AV-11), convert to WMA (BR-AV-12), verify the converted file (BR-AV-13–BR-AV-15), clean up and mark errored on any failure (BR-AV-16), and require successful CallRex-side deletion before marking the import complete (BR-AV-17).CreateRecording(private) computesPurgeDate/RecordingSystemCodefrom the request'sRecordingSystemTypes(BR-AV-06–BR-AV-08) and calls CallRecordingExtensions for description/discoverability (BR-AV-09, BR-AV-10).- All members except
HasMediathrowNotImplementedException("Function not valid in this instance")when constructed via the reduced constructor (BR-AV-19).
Constraints and usage notes¶
- Callers must
Dispose()instances to release the underlyingIUnitOfWorkandIRecordingSystemresources.
Sources¶
Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoService.cs