RM-880: Cannot upload file into RM site over FTP/NFS file protocols

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@56012 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2013-09-26 05:55:51 +00:00
parent 77a9b6b8d2
commit 5b709487c9

View File

@@ -362,7 +362,7 @@ public class RecordServiceImpl implements RecordService,
policyComponent.bindClassBehaviour(
NodeServicePolicies.OnRemoveAspectPolicy.QNAME,
ContentModel.ASPECT_NO_CONTENT,
new JavaBehaviour(this, "onRemoveAspect", NotificationFrequency.EVERY_EVENT));
new JavaBehaviour(this, "onRemoveAspect", NotificationFrequency.TRANSACTION_COMMIT));
}
/**
@@ -452,24 +452,32 @@ public class RecordServiceImpl implements RecordService,
@Override
public Void doWork() throws Exception
{
NodeRef nodeRef = childAssocRef.getChildRef();
if (nodeService.exists(nodeRef) == true &&
nodeService.hasAspect(nodeRef, ContentModel.ASPECT_TEMPORARY) == false &&
nodeService.getType(nodeRef).equals(TYPE_RECORD_FOLDER) == false &&
nodeService.getType(nodeRef).equals(TYPE_RECORD_CATEGORY) == false)
onCreateChildAssociation.disable();
try
{
if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_NO_CONTENT) == true)
NodeRef nodeRef = childAssocRef.getChildRef();
if (nodeService.exists(nodeRef) == true &&
nodeService.hasAspect(nodeRef, ContentModel.ASPECT_TEMPORARY) == false &&
nodeService.getType(nodeRef).equals(TYPE_RECORD_FOLDER) == false &&
nodeService.getType(nodeRef).equals(TYPE_RECORD_CATEGORY) == false)
{
// we need to postpone filling until the NO_CONTENT aspect is removed
Set<NodeRef> pendingFilling = TransactionalResourceHelper.getSet("pendingFilling");
pendingFilling.add(nodeRef);
}
else
{
// create and file the content as a record
file(nodeRef);
if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_NO_CONTENT) == true)
{
// we need to postpone filling until the NO_CONTENT aspect is removed
Set<NodeRef> pendingFilling = TransactionalResourceHelper.getSet("pendingFilling");
pendingFilling.add(nodeRef);
}
else
{
// create and file the content as a record
file(nodeRef);
}
}
}
finally
{
onCreateChildAssociation.enable();
}
return null;
}