8.2.14.4 The Version Interface

A Version object provides an interface for an nt:version node. It provides convenient access to version information.

javax.jcr.version.
Version extends Node

VersionHistory

getContainingHistory()

Returns the VersionHistory that contains this Version.

Calendar

getCreated()

Returns the date this version was created. This corresponds to the value of the jcr:created property in the nt:version node that represents this version.

A RepositoryException is thrown if an error occurs.

Version[]

getSuccessors()

Returns the successor versions of this version. This corresponds to returning all the nt:version nodes referenced by the jcr:successors multi-value property in the nt:version node that represents this version.

A RepositoryException is thrown if an error occurs.

Version[]

getPredecessors()

Returns the predecessor versions of this version. This corresponds to returning all the nt:version nodes whose jcr:successors property includes a reference to the nt:version node that represents this version.

A RepositoryException is thrown if an error occurs.