Class VersionCopier


  • public class VersionCopier
    extends java.lang.Object
    This class allows to copy the version history, optionally filtering it with a given date.
    • Constructor Detail

      • VersionCopier

        public VersionCopier​(NodeBuilder targetRoot,
                             NodeState sourceVersionStorage,
                             NodeBuilder targetVersionStorage,
                             java.util.function.Consumer<java.lang.String> consumer)
    • Method Detail

      • copyVersionHistory

        public boolean copyVersionHistory​(java.lang.String versionableUuid,
                                          java.util.Calendar minDate,
                                          boolean preserveOnTarget)
        Copy history filtering versions using passed date and returns true if the history has been copied. If preserveOnTarget is true then only copies non-conflicting versions.
        Parameters:
        versionableUuid - Name of the version history node
        minDate - Only versions older than this date will be copied
        preserveOnTarget - Preserve version not present on target
        Returns:
        true if at least one version has been copied