org.priha.version
Class VersionManager

java.lang.Object
  extended by org.priha.version.VersionManager

public class VersionManager
extends java.lang.Object


Constructor Summary
VersionManager()
           
 
Method Summary
static void createVersionHistory(NodeImpl nd)
          Makes sure that a VersionHistory exists for a new, versionable Node.
static Path getVersionStoragePath(java.lang.String uuid)
          Returns the location where the version storage is for a given UUID.
static boolean isVersionHistoryPath(Path p)
          Returns true, if the path refers to a versioned object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionManager

public VersionManager()
Method Detail

isVersionHistoryPath

public static boolean isVersionHistoryPath(Path p)
Returns true, if the path refers to a versioned object.

Parameters:
p -
Returns:

getVersionStoragePath

public static Path getVersionStoragePath(java.lang.String uuid)
                                  throws javax.jcr.NamespaceException,
                                         javax.jcr.RepositoryException
Returns the location where the version storage is for a given UUID.

Parameters:
uuid -
Returns:
Throws:
javax.jcr.RepositoryException
javax.jcr.NamespaceException

createVersionHistory

public static void createVersionHistory(NodeImpl nd)
                                 throws javax.jcr.UnsupportedRepositoryOperationException,
                                        javax.jcr.RepositoryException
Makes sure that a VersionHistory exists for a new, versionable Node. Returns quietly, if the history already exists.

Parameters:
nd -
Throws:
javax.jcr.RepositoryException
javax.jcr.UnsupportedRepositoryOperationException