Add functionality to delete old versions of documents

This commit introduces a feature that automatically deletes old versions of StoredObjects in the Chill application. A cron job, "RemoveOldVersionCronJob", has been implemented to delete versions older than 90 days. A message handler, "RemoveOldVersionMessageHandler", has been added to handle deletion requests. Furthermore, unit tests for the new functionality have been provided.
This commit is contained in:
2024-07-15 15:54:26 +02:00
parent 67d24cb951
commit c38f7c1179
10 changed files with 476 additions and 0 deletions

View File

@@ -51,6 +51,11 @@ interface StoredObjectManagerInterface
*/
public function write(StoredObject $document, string $clearContent, ?string $contentType = null): StoredObjectVersion;
/**
* @throws StoredObjectManagerException
*/
public function delete(StoredObjectVersion $storedObjectVersion): void;
/**
* return or compute the etag for the document.
*