Properly hooked up the on close callback for output streams to AVM Nodes.

Got rid of a now superfluous setContentData() call, and now treat files
with no content url (yet) as having length 0.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3660 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-09-02 21:47:09 +00:00
parent 820da6ecab
commit be987843f5
4 changed files with 24 additions and 6 deletions

View File

@@ -1037,18 +1037,26 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
// Invoke policy behaviors.
invokeBeforeUpdateNode(nodeRef);
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
if ((Integer)avmVersionPath[0] >= 0)
{
throw new InvalidNodeRefException("Read only store.", nodeRef);
}
// TODO Just until we can set built in properties on AVM Nodes.
if (isBuiltInProperty(qname))
{
if (qname.equals(ContentModel.PROP_CONTENT))
{
try
{
fAVMService.setContentData((String)avmVersionPath[1], (ContentData)value);
}
catch (ClassCastException e)
{
throw new AVMException("Invalid ContentData.");
}
}
return;
}
if ((Integer)avmVersionPath[0] >= 0)
{
throw new InvalidNodeRefException("Read only store.", nodeRef);
}
try
{
fAVMService.setNodeProperty((String)avmVersionPath[1], qname, new PropertyValue(null, value));