JSR-170 Versioning Notes

cancel
Showing results for 
Search instead for 
Did you mean: 

JSR-170 Versioning Notes

resplin
Intermediate
0 0 1,718

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



JSR-170Back to Versioning


Introduction


The purpose of these notes is to give a brief summary of the versioning section of the JSR-170 specification. 

Versioning is required for Level 2 compliance and is based on JSR-147 (Workspace versioning and configuration management).


Basic Structure


A versioning repository has a version storage area.  The version storage area contains the version histories of the versionable objects in the workspace.

Nodes in different workspaces share the same version history if and only if they have the same UUID.  A new version is created when an object is checked-in.

Version history and version are stored a nodes within a workspace and as such have node type nt:versionHistory and nt:version respectivly.

The children of the version history object are the version objects relating to that version tree.  These version objects are related using the successor relationship, this builds the version tree.


mix:versionable


To be versionable a node must have the mix-in mix:versionable.

Properties on mix:versionable include:


  • jcr:versionHistory - reference to the version history node that contains the version objects
  • jcr:baseVersion - reference to the version node that is the 'current' version
  • jcr:isCheckedOut - boolean indicating whether the object is currently checked out or not

All these properties are read-only.


jcr:versionStorage


The full set of version histories for versionable object in a workspace are shown in the node /jcr:versionStorage found at the root of every workspace.  This entire sub-tree is read-only.


nt:versionHistory


This node type has the following properties:


  • jcr:rootVersion - a reference to the root version of this object, this is start point of the version graph

The single dummy child is maintained (jcr:rootVersion) that serves as a start point for the version graph.


nt:version


Properties of this type include:


  • jcr:versionLabels - multi-value containing version labels
  • jcr:versionDate
  • jcr:successors - multi-value containing references to the succeeding versions

The version has a child which is the frozen state of the versioned node.