Class VersionHistoryHelper
java.lang.Object
org.ametys.plugins.repositoryapp.jcr.VersionHistoryHelper
Helper to manipulate the JCR version history
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Result of a remove version history operation -
Method Summary
Modifier and TypeMethodDescriptionremoveUnusedHistory
(Map<String, javax.jcr.Session> sessions, javax.jcr.version.VersionHistory versionHistory, Logger logger) Remove the version history if it is unused (ie the versionable node does not exist anymore)
-
Method Details
-
removeUnusedHistory
public static VersionHistoryHelper.RemoveHistoryResult removeUnusedHistory(Map<String, javax.jcr.Session> sessions, javax.jcr.version.VersionHistory versionHistory, Logger logger) throws javax.jcr.RepositoryExceptionRemove the version history if it is unused (ie the versionable node does not exist anymore)- Parameters:
sessions
- the sessions used to determine if the versionable exist. Multiple session can be provided to search in multiple workspace for example.versionHistory
- the version history node to removelogger
- a logger to use to provide detailed information- Returns:
- the result of the operation
- Throws:
javax.jcr.RepositoryException
- if an error occurs
-