Version Store Design and API

cancel
Showing results for 
Search instead for 
Did you mean: 

Version Store Design and API

resplin
Intermediate
0 0 1,321

Obsolete Pages{{Obsolete}}

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



Design DocumentVersioningObsolete Pages
Back to Main Page > Specification > Versioning

OBSOLETE PAGE


Description


The version store is responsible for the storage and retrieval of version information.

The API is internal and should be simple.  It must wrap the underlying version storage implementation to allow its subsitution without distruption to the rest of the system.


API


getVersionHistory


VersionHistory getVersionHistory(wsid, node);

Description:

Gets a node of type VersionHistory that contains the version tree for the node specified.

Parameters:


  • wsid - the workspace id
  • node_id - the node representing the current state of the object

Result:

Node of type VersionHistory containing the version tree for the node specified.

Exception cases:


  • There is no version tree for the node specified.






get


Node get(wsid, version_id);

Description:

Gets the node representing the state of the object associated with the version id specified.

Parameters:


  • wsid - the workspace id
  • version_id - the id of the version object

Result:

A node representing the state of the object associated with the version specified.

Exception cases:


  • Version does not exist in the version store.






put


Version put(wsid, node, description=null);

Version[] put(wsid, node_list, description=null);

Description:

Places a new version in the version store based on the state of the passed node(s).  The predessor node is implied by the node's current version and content is taken from the node.

Parameters:


  • wsid - the workspace id
  • node - node(s) representing the state of the object to be associated with the created node.
  • description - the description of the version.  An optional parameter with default value null

Result:

Node(s) of type Version representing the data relating to the newly created version.

Exception cases:


  • A version tree does not exist for the node passed, see createVersionHistory.






getInfo


Version getInfo(wsid, version_id);

Description:

Gets the information held about a version.  This is retrived a node of type Version that contains the version data.

Parameters:


  • wsid - the workspace id
  • version_id - the version id

Result:

A node of type Version that contains the data about this version.

Exception cases:


  • The version does not exist