Tobias Strasser a �crit :
He may want to purge intermediate work versions of documents between
each release (VersionGistory.removeVersion() is perfect for that), but
also delete a document *and all its past revisions*, due to some legal
requirements. For this last point, it seems JCR lacks a few
functionnalities, as you also point out.
hi cederic,
since the creation of a VersionHistory is triggered by the creation of
a mix:versionable node, the removal should happen automatically, as
soon as no references to that version histroy exist anymore. this is
the case, when all mix:versionable nodes (in all workspaces) belonging
to that VH are deleted, and all the versions in the VH are removed
i.e. only the jcr:rootVersion is left. IMO, it is then safe to delete
the version history aswell.
i created a jira issue for this [JCR-134].
cheers, tobi
Hi Tobias,
You're right, this is a safe solution.
And what about a VersionManager.removeVersionHistory() or
VersionHistory.remove(), which would fail il any Node in any workspace
still references it.
It would allow to safely remove an unused VersionHistory, and all its
Version.
WDYT ?
Regards,
C�dric
--
C�dric Damioli
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com