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

@@ -537,6 +537,40 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
}
}
/**
* 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.LAYERED_DIRECTORY,
attrs.getCreator(),
attrs.getOwner(),
attrs.getLastModifier(),
attrs.getCreateDate(),
attrs.getModDate(),
attrs.getAccessDate(),
getId(),
getVersionID(),
getUnderlying(lPath),
fPrimaryIndirection,
fLayerID,
-1);
}
/**
* Get the descriptor for this node.
* @param The Lookup.
@@ -545,7 +579,10 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
public AVMNodeDescriptor getDescriptor(Lookup lPath)
{
BasicAttributes attrs = getBasicAttributes();
return new AVMNodeDescriptor(lPath.getRepresentedPath(),
String path = lPath.getRepresentedPath();
String name = path.substring(path.lastIndexOf("/") + 1);
return new AVMNodeDescriptor(path,
name,
AVMNodeType.LAYERED_DIRECTORY,
attrs.getCreator(),
attrs.getOwner(),
@@ -583,6 +620,7 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
parentIndirection + "/" + name;
}
return new AVMNodeDescriptor(path,
name,
AVMNodeType.LAYERED_DIRECTORY,
attrs.getCreator(),
attrs.getOwner(),