Class ReadWriteVersionManager

    • Constructor Detail

      • ReadWriteVersionManager

        public ReadWriteVersionManager​(NodeBuilder versionStorageNode,
                                       NodeBuilder workspaceRoot)
    • Method Detail

      • getOrCreateVersionHistory

        public @NotNull NodeBuilder getOrCreateVersionHistory​(@NotNull
                                                              @NotNull NodeBuilder versionable,
                                                              @NotNull Map<String,​Object> infoMap)
        Gets or creates the version history for the given versionable node.
        versionable - the versionable node.
        infoMap - The additional information as provided by CommitInfo.getInfo()
        the version history node.
        IllegalArgumentException - if the given node does not have a jcr:uuid property.
      • checkout

        public void checkout​(NodeBuilder versionable)
      • removeVersionLabel

        public void removeVersionLabel​(@NotNull
                                       @NotNull String historyRelPath,
                                       @NotNull String label)
                                throws CommitFailedException
        Removes a version label from the jcr:versionLabels node of the referenced version history.
        historyRelPath - relative path from the jcr:versionStorage node to the version history node.
        label - the version label.
        CommitFailedException - if there is no such version history or if there is no label with the given name.