8.2.2.3 nt:versionHistory

The nt:versionHistory node type has the following definition (repeated from 6.7.22.13 nt:versionHistory):

NodeTypeName

nt:versionHistory

Supertypes

nt:base

mix:referenceable

IsMixin

false

HasOrderableChildNodes

false

PrimaryItemName

null

PropertyDefinition

Name jcr:versionableUuid

RequiredType STRING

ValueConstraints []

DefaultValues null

AutoCreated true

Mandatory true

OnParentVersion ABORT

Protected true

Multiple false

ChildNodeDefinition

Name jcr:rootVersion

RequiredPrimaryTypes [nt:version]

DefaultPrimaryType nt:version

AutoCreated true

Mandatory true

OnParentVersion ABORT

Protected true

SameNameSiblings false

ChildNodeDefinition

Name jcr:versionLabels

RequiredPrimaryTypes [nt:versionLabels]

DefaultPrimaryType nt:versionLabels

AutoCreated true

Mandatory true

OnParentVersion ABORT

Protected true

SameNameSiblings false

ChildNodeDefinition

Name *

RequiredPrimaryTypes [nt:version]

DefaultPrimaryType nt:version

AutoCreated false

Mandatory false

OnParentVersion ABORT

Protected true

SameNameSiblings false



nt:versionHistory, like all node types, is a subtype of nt:base, so it inherits the jcr:primaryType and jcr:mixinTypes properties.

Additionally, all nt:versionHistory nodes must also have mixin type mix:referenceable, which means that they have the property jcr:uuid.

This node type defines a STRING property called jcr:versionableUuid that stores the UUID of the versionable node whose version history this is.

It type also mandates a single auto-created subnode called jcr:rootVersion. This is a version that serves as the starting point for the version graph; it does not hold any state information (see 8.2.4, Initializing the Version History, below).

Every nt:versionHistory node also has an auto-created child node called jcr:versionLabels of node type nt:versionLabels. This node holds a set of reference properties that record all labels that have been assigned to the versions within this version history. Each label is represented by a single reference property which uses the label itself as its name and which refers to that version within this version history to which the label applies.

All additional versions are added as needed by the versioning system as nt:version child nodes. These children are defined by the second ChildNodeDefinition, with name attribute of "*" (i.e., making this a residual definition, see 6.7.15, Residual Definitions, above). The names of the nt:version nodes are left up to the implementation.