mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user