A new concurrency test. Fixed bug in the way that paths were being handed

back in AVMNodeDescriptors.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3255 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-06-27 17:39:27 +00:00
parent c6dfeb1c9d
commit 72f2ff989d
10 changed files with 561 additions and 19 deletions

View File

@@ -263,6 +263,40 @@ class PlainDirectoryNodeImpl extends DirectoryNodeImpl implements PlainDirectory
assert false : "Should never happen.";
}
/**
* Get the descriptor for this node.
* @param The Lookup.
* @return A descriptor.
*/
public AVMNodeDescriptor getDescriptor(Lookup lPath, String name)
{
BasicAttributes attrs = getBasicAttributes();
String path = lPath.getRepresentedPath();
if (path.endsWith("/"))
{
path = path + name;
}
else
{
path = path + "/" + name;
}
return new AVMNodeDescriptor(path,
name,
AVMNodeType.PLAIN_DIRECTORY,
attrs.getCreator(),
attrs.getOwner(),
attrs.getLastModifier(),
attrs.getCreateDate(),
attrs.getModDate(),
attrs.getAccessDate(),
getId(),
getVersionID(),
null,
false,
-1,
-1);
}
/**
* Get the descriptor for this node.
* @param The Lookup.
@@ -271,7 +305,9 @@ class PlainDirectoryNodeImpl extends DirectoryNodeImpl implements PlainDirectory
public AVMNodeDescriptor getDescriptor(Lookup lPath)
{
BasicAttributes attrs = getBasicAttributes();
return new AVMNodeDescriptor(lPath.getRepresentedPath(),
String path = lPath.getRepresentedPath();
return new AVMNodeDescriptor(path,
path.substring(path.lastIndexOf("/") + 1),
AVMNodeType.PLAIN_DIRECTORY,
attrs.getCreator(),
attrs.getOwner(),
@@ -299,6 +335,7 @@ class PlainDirectoryNodeImpl extends DirectoryNodeImpl implements PlainDirectory
BasicAttributes attrs = getBasicAttributes();
String path = parentPath.endsWith("/") ? parentPath + name : parentPath + "/" + name;
return new AVMNodeDescriptor(path,
name,
AVMNodeType.PLAIN_DIRECTORY,
attrs.getCreator(),
attrs.getOwner(),