in src/main/java/org/apache/jackrabbit/ocm/manager/impl/ObjectContentManagerImpl.java [706:727]
public Version getVersion(String path, String versionName) {
try {
Node node = (Node) session.getItem(path);
if (!node.isNodeType("mix:versionable")) {
throw new VersionException("The object " + path + "is not versionable");
}
VersionHistory history = getVersionManager().getVersionHistory(path);
return new Version(history.getVersion(versionName));
} catch (ClassCastException cce) {
throw new ObjectContentManagerException("Cannot retrieve an object from a property path " + path);
} catch (PathNotFoundException pnfe) {
throw new ObjectContentManagerException("Cannot retrieve an object at path " + path, pnfe);
} catch (javax.jcr.version.VersionException ve) {
throw new VersionException("The version name " + versionName + "does not exist", ve);
} catch (UnsupportedRepositoryOperationException uroe) {
throw new VersionException("Impossible to retrieve versions for path " + path, uroe);
} catch (javax.jcr.RepositoryException e) {
throw new org.apache.jackrabbit.ocm.exception.RepositoryException(e);
}
}