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