Interface IVersionHistoryService


public interface IVersionHistoryService
Versioning information for a node
  • Method Details

    • GetVersionHistory

      VersionHistory GetVersionHistory(NodeRef nodeRef)
      Parameters:
      nodeRef - The node for which the versionhistory is requested.
      Returns:
      The versionhistory of the given node.
    • ensureVersioningEnabled

      void ensureVersioningEnabled(NodeRef nodeRef, Map<QName,Serializable> versionProperties)
      Make sure versioning is enabled for the specified nodeRef.
      Parameters:
      nodeRef - the nodeRef for which we want to enable versioning.
      versionProperties - the VersionProperties that will be set when ensuring versioning is enabled.
    • createVersion

      void createVersion(NodeRef nodeRef, Map<String,Serializable> versionProperties)
      Create a new version for the specified nodeRef.
      Parameters:
      nodeRef - the node for which a new version will be created.
      versionProperties - Properties for the new version.
    • deleteVersionHistory

      void deleteVersionHistory(NodeRef nodeRef)
      Delete the version history for the specified nodeRef.
      Parameters:
      nodeRef - the node for which to delete the version history.
    • deleteVersion

      void deleteVersion(NodeRef nodeRef, String versionLabel)
      Delete a specific version associated with a node reference.

      This operation is permanent, the specific version in the version history is deleted and cannot be retrieved.

      If this is the last version, then the current version label for the node reference is reset and any subsequent versions of the node will result in a new version history being created.

      Parameters:
      nodeRef - the node reference.
      versionLabel - the label of the version to delete.
    • getRootVersion

      Version getRootVersion(NodeRef nodeRef)
      Parameters:
      nodeRef - the node for which the root version is requested.
      Returns:
      The root version of the given node.
    • getHeadVersion

      Version getHeadVersion(NodeRef nodeRef)
      Parameters:
      nodeRef - the node for which the head version is requested.
      Returns:
      The head version of the given node.
    • revert

      void revert(NodeRef nodeRef, String versionLabel)
      Revert given node to the version specified by tag.
      Parameters:
      nodeRef - the node for which the version will be reverted.
      versionLabel - the version to which the node will be reverted to.