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:
@@ -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(),
|
||||
|
Reference in New Issue
Block a user