Framework/Another Lore2009. 4. 24. 05:28


Versioning enables a user to record the state of a node and its subgraph and restore that state at a later time.


Check-In

When node is checked-in, a new version of that node is created which contains a (typically partial) copy of its subgraph. The part of a node’s subgraph that is to be copied to a version is referred to as its versionable
subgraph and constitutes its versionable state. 
A new version of a versionable node is created using
    Version node.checkIn()
This method require exsting node in repository. Created Node but not Saved Node(only exists in memory) may throw a RepositoryException.


Version History

Once created, a version is stored in a version history
The method
    VersionHistory node.getVersionHistory()


Check-Out

Once checked-in, a node and its versionable subgraph become readonly. To alter a checked-in node or its versionable subgraph, the node must first be checked-out. It can then be changed and checked-in again, creating a new version.
The method
    version.checkOut()


Base Version Reference

Each versionable node has a base version within its version history. When a new version of a node is created, it is placed in that node’s version history as a direct successor of the base version. That version itself then becomes the new base version
The method
    Node versionHistory.getRecentNode()


Version Extends Node
The Version interface extends Node.



<interface Version extends Node, Comparable<Version>>
 public Calendar getCreated();
 public void checkOut() throws RepositoryException;
 public Node getRecentNode()throws RepositoryException;
 public GenericIterator<Property> getProperties() throws RepositoryException;
 public Property getProperty(IDString propId) throws RepositoryException;


<interface VersionHistory extends Publishable, IConstant>
 public GenericIterator<Version> getAllVersions();
 public Version getVersion(int versionIndex);
 public Node getRecentNode();

'Framework > Another Lore' 카테고리의 다른 글

AL : Link  (0) 2009.04.24
AL : Observation  (0) 2009.04.24
AL : Versioning Model  (0) 2009.04.24
AL : Workspace  (0) 2009.04.23
AL : Node  (0) 2009.04.23
AL : Property  (0) 2009.04.23
Posted by bleujin

댓글을 달아 주세요