In certain circumstances update was not capturing aspects, properties, and

ACLs.  This fixes that.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3979 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-09-29 21:29:45 +00:00
parent 0b1accf9f9
commit 752e46e0f1
9 changed files with 99 additions and 9 deletions

View File

@@ -194,7 +194,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
// a LayeredDirectoryNode that gets its indirection from
// its parent.
{
newDir = new LayeredDirectoryNodeImpl((String)null, this);
newDir = new LayeredDirectoryNodeImpl((String)null, this, null);
((LayeredDirectoryNodeImpl)newDir).setPrimaryIndirection(false);
((LayeredDirectoryNodeImpl)newDir).setLayerID(lPath.getTopLayer().getLayerID());
}
@@ -227,7 +227,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
throw new AVMExistsException("Child exists: " + name);
}
LayeredDirectoryNode newDir =
new LayeredDirectoryNodeImpl(srcPath, this);
new LayeredDirectoryNodeImpl(srcPath, this, null);
if (lPath.isLayered())
{
// When a layered directory is made inside of a layered context,
@@ -1142,7 +1142,23 @@ public class AVMStoreImpl implements AVMStore, Serializable
}
((FileNode)node).setContentData(data);
}
/**
* Set meta data, aspects, properties, acls, from another node.
* @param path The path to the node to set metadata on.
* @param from The node to get the metadata from.
*/
public void setMetaDataFrom(String path, AVMNode from)
{
Lookup lPath = lookup(-1, path, true, false);
if (lPath == null)
{
throw new AVMNotFoundException("Path not found: " + path);
}
AVMNode node = lPath.getCurrentNode();
node.copyMetaDataFrom(from);
}
/**
* Add an aspect to a node.
* @param path The path to the node.