mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -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))
|
||||
|
Reference in New Issue
Block a user