BackupDeletionService
in package
FinalYes
Removes managed backup objects while retaining immutable operational metadata.
Table of Contents
Constants
- DELETE_OPERATION : mixed = ['intent_action' => 'delete_requested', 'failur...
- EXPIRE_OPERATION : mixed = ['intent_action' => 'expiration_requested', 'fa...
Properties
- $audit : PlatformAuditService
- $platform : Connection
Methods
- __construct() : mixed
- Constructor.
- deletePlatform() : void
- deleteTenant() : void
- expirePlatform() : void
- expireTenant() : void
- assertNoActiveTenantArchiveJob() : void
- Reject deletion while a restore or drill still references the archive.
- canonicalizeBackupId() : string
- Normalize UUID text used in persisted job parameters.
- delete() : void
- lockBackupArchive() : bool
- Hold an archive lock across state reservation, storage deletion, and finalization.
- performDelete() : void
- unlockBackupArchive() : void
- Release the session-level archive lock without masking the operation result.
Constants
DELETE_OPERATION
private
mixed
DELETE_OPERATION
= ['intent_action' => 'delete_requested', 'failure_action' => 'delete_failed', 'success_action' => 'deleted', 'final_status' => 'deleted', 'clear_error' => false, 'reservation_status' => 'deleting']
EXPIRE_OPERATION
private
mixed
EXPIRE_OPERATION
= ['intent_action' => 'expiration_requested', 'failure_action' => 'expiration_failed', 'success_action' => 'expired', 'final_status' => 'expired', 'clear_error' => true, 'reservation_status' => 'expiring']
Properties
$audit read-only
private
PlatformAuditService
$audit
$platform read-only
private
Connection
$platform
Methods
__construct()
Constructor.
public
__construct(Connection $platform, PlatformAuditService $audit) : mixed
Parameters
- $platform : Connection
- $audit : PlatformAuditService
deletePlatform()
public
deletePlatform(array<string, mixed> $backup, BackupArchiveStorageInterface $storage, string|null $platformUserId, string $reason[, array<string, mixed> $metadata = [] ][, array<string, mixed> $auditOptions = [] ]) : void
Parameters
- $backup : array<string, mixed>
- $storage : BackupArchiveStorageInterface
- $platformUserId : string|null
- $reason : string
- $metadata : array<string, mixed> = []
- $auditOptions : array<string, mixed> = []
deleteTenant()
public
deleteTenant(array<string, mixed> $backup, BackupArchiveStorageInterface $storage, string|null $platformUserId, string $reason[, array<string, mixed> $metadata = [] ][, array<string, mixed> $auditOptions = [] ]) : void
Parameters
- $backup : array<string, mixed>
- $storage : BackupArchiveStorageInterface
- $platformUserId : string|null
- $reason : string
- $metadata : array<string, mixed> = []
- $auditOptions : array<string, mixed> = []
expirePlatform()
public
expirePlatform(array<string, mixed> $backup, BackupArchiveStorageInterface $storage, string $reason[, array<string, mixed> $metadata = [] ][, array<string, mixed> $auditOptions = [] ]) : void
Parameters
- $backup : array<string, mixed>
- $storage : BackupArchiveStorageInterface
- $reason : string
- $metadata : array<string, mixed> = []
- $auditOptions : array<string, mixed> = []
expireTenant()
public
expireTenant(array<string, mixed> $backup, BackupArchiveStorageInterface $storage, string $reason[, array<string, mixed> $metadata = [] ][, array<string, mixed> $auditOptions = [] ]) : void
Parameters
- $backup : array<string, mixed>
- $storage : BackupArchiveStorageInterface
- $reason : string
- $metadata : array<string, mixed> = []
- $auditOptions : array<string, mixed> = []
assertNoActiveTenantArchiveJob()
Reject deletion while a restore or drill still references the archive.
private
assertNoActiveTenantArchiveJob(string $backupId) : void
Parameters
- $backupId : string
canonicalizeBackupId()
Normalize UUID text used in persisted job parameters.
private
canonicalizeBackupId(string $backupId) : string
Parameters
- $backupId : string
Return values
stringdelete()
private
delete(array<string, mixed> $backup, BackupArchiveStorageInterface $storage, string $table, string $auditScope, string $subjectType, string|null $tenantId, string|null $platformUserId, string $reason, array<string, mixed> $metadata, array<string, mixed> $auditOptions, array{intent_action: string, failure_action: string, success_action: string, final_status: string, clear_error: bool, reservation_status: string} $operation) : void
Parameters
- $backup : array<string, mixed>
- $storage : BackupArchiveStorageInterface
- $table : string
- $auditScope : string
- $subjectType : string
- $tenantId : string|null
- $platformUserId : string|null
- $reason : string
- $metadata : array<string, mixed>
- $auditOptions : array<string, mixed>
- $operation : array{intent_action: string, failure_action: string, success_action: string, final_status: string, clear_error: bool, reservation_status: string}
lockBackupArchive()
Hold an archive lock across state reservation, storage deletion, and finalization.
private
lockBackupArchive(string $backupId) : bool
Parameters
- $backupId : string
Return values
boolperformDelete()
private
performDelete(array<string, mixed> $backup, BackupArchiveStorageInterface $storage, string $table, string $auditScope, string $subjectType, string|null $tenantId, string|null $platformUserId, string $reason, array<string, mixed> $metadata, array<string, mixed> $auditOptions, array{intent_action: string, failure_action: string, success_action: string, final_status: string, clear_error: bool, reservation_status: string} $operation) : void
Parameters
- $backup : array<string, mixed>
- $storage : BackupArchiveStorageInterface
- $table : string
- $auditScope : string
- $subjectType : string
- $tenantId : string|null
- $platformUserId : string|null
- $reason : string
- $metadata : array<string, mixed>
- $auditOptions : array<string, mixed>
- $operation : array{intent_action: string, failure_action: string, success_action: string, final_status: string, clear_error: bool, reservation_status: string}
unlockBackupArchive()
Release the session-level archive lock without masking the operation result.
private
unlockBackupArchive(string $backupId) : void
Parameters
- $backupId : string