Class VersionHistoryHelper

java.lang.Object
org.ametys.plugins.repositoryapp.jcr.VersionHistoryHelper

public final class VersionHistoryHelper extends Object
Helper to manipulate the JCR version history
  • Method Details

    • removeUnusedHistory

      public static VersionHistoryHelper.RemoveHistoryResult removeUnusedHistory(Map<String,javax.jcr.Session> sessions, javax.jcr.version.VersionHistory versionHistory, Logger logger) throws javax.jcr.RepositoryException
      Remove 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 remove
      logger - a logger to use to provide detailed information
      Returns:
      the result of the operation
      Throws:
      javax.jcr.RepositoryException - if an error occurs