Introduce read/write API for archived content
StorageService always had an archive() method to create
a history trail for entities, e.g. projects, but there was
no way to retrieve archived content, or backup/restore
the archive via REST API.
This patch add a couple of new methods to StorageService:
* readFromArchive() retrieves the history of an entity and
passes it to a consumer function (StorageConsumer). This
allows the JPA implementation to make use of database
cursors for minimal memory consumption.
* writeToArchive() allows to push new entries to the
history bypassing the archive() function. This will be
used in a subsequent patch to implement a restore API.
All known implementations of StorageService are adapted
in this patch, and some more archiving tests have been
Signed-off-by: Michael Ochmann <firstname.lastname@example.org>
11 files changed