Added accessors for node history. Added those to console.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3135 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-06-18 15:32:45 +00:00
parent 6fff182633
commit c892c5a4b5
8 changed files with 180 additions and 16 deletions

View File

@@ -265,7 +265,7 @@ class RepositoryImpl implements Repository, Serializable
throw new AVMExistsException("Not a file: " + path + " r " + version);
}
FileNode file = (FileNode)node;
FileContent content = file.getContentForRead(this);
FileContent content = file.getContentForRead();
return content.getInputStream(fSuper);
}
@@ -328,10 +328,10 @@ class RepositoryImpl implements Repository, Serializable
throw new AVMException("Access denied: " + path);
}
Lookup lPath = lookup(version, path);
if (write)
{
// if (write)
// {
// lPath.acquireLocks();
}
// }
AVMNode node = lPath.getCurrentNode();
if (node.getType() != AVMNodeType.PLAIN_FILE &&
node.getType() != AVMNodeType.LAYERED_FILE)
@@ -347,7 +347,7 @@ class RepositoryImpl implements Repository, Serializable
}
else
{
content = file.getContentForRead(this);
content = file.getContentForRead();
}
return content.getRandomAccess(fSuper, access);
}
@@ -759,6 +759,10 @@ class RepositoryImpl implements Repository, Serializable
query.setInteger("version", version);
VersionRoot vRoot = (VersionRoot)query.uniqueResult();
AVMNode root = vRoot.getRoot();
if (root == null)
{
throw new AVMNotFoundException("Version not found.");
}
root.setIsRoot(false);
fSuper.getSession().delete(vRoot);
if (root.equals(fRoot))