Fix for AR-1413 and AR-1532 (handling of missing nodes in FileFolderService, affecting CIFS, WebDav, FTP and web-client)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6060 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-06-21 19:53:52 +00:00
parent 8172e5b73f
commit 228f72296c
2 changed files with 81 additions and 63 deletions

View File

@@ -24,12 +24,14 @@
*/
package org.alfresco.web.bean.repository;
import java.io.Serializable;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
/**
* Lighweight client side representation of a node held in the repository, which
@@ -70,6 +72,25 @@ public class MapNode extends Node implements Map<String, Object>
}
}
/**
* Constructor
*
* @param nodeRef The NodeRef this Node wrapper represents
* @param nodeService The node service to use to retrieve data for this node
* @param props The properties of the node, already retrieved from NodeService
*/
public MapNode(NodeRef nodeRef, NodeService nodeService, Map<QName, Serializable> props)
{
super(nodeRef);
for (QName qname: props.keySet())
{
Serializable propValue = props.get(qname);
this.properties.put(qname.toString(), propValue);
}
this.propsRetrieved = true;
}
// ------------------------------------------------------------------------------
// Map implementation - allows the Node bean to be accessed using JSF expression syntax