mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
78500: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 76815: Merged V4.2.3 (4.2.3) to V4.2-BUG-FIX (4.2.4) 76612: Merged DEV to V4.2.3 (4.2.3) 73832: MNT-11695 : Site cannot be deleted if copy/move outbound rule exists Added a test to simulate the issue. 73871: MNT-11695 : Site cannot be deleted if copy/move outbound rule exists Added a check for the destination not to be in a pending delete list for copy action executer. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82572 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -22,7 +22,9 @@
|
||||
package org.alfresco.repo.action.executer;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
@@ -36,6 +38,7 @@ import org.alfresco.service.cmr.repository.CopyService.CopyInfo;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.rule.RuleServiceException;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Copy action executor.
|
||||
@@ -98,13 +101,21 @@ public class CopyActionExecuter extends ActionExecuterAbstractBase
|
||||
public void executeImpl(Action ruleAction, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (!nodeService.exists(actionedUponNodeRef))
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
NodeRef destinationParent = (NodeRef)ruleAction.getParameterValue(PARAM_DESTINATION_FOLDER);
|
||||
|
||||
// Get the deep copy value
|
||||
boolean deepCopy = false;
|
||||
}
|
||||
NodeRef destinationParent = (NodeRef) ruleAction.getParameterValue(PARAM_DESTINATION_FOLDER);
|
||||
|
||||
// Check the destination not to be in a pending delete list
|
||||
// MNT-11695
|
||||
Set<QName> destinationAspects = nodeService.getAspects(destinationParent);
|
||||
if (destinationAspects.contains(ContentModel.ASPECT_PENDING_DELETE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the deep copy value
|
||||
boolean deepCopy = false;
|
||||
Boolean deepCopyValue = (Boolean)ruleAction.getParameterValue(PARAM_DEEP_COPY);
|
||||
if (deepCopyValue != null)
|
||||
{
|
||||
@@ -165,5 +176,5 @@ public class CopyActionExecuter extends ActionExecuterAbstractBase
|
||||
originalAssoc.getQName(),
|
||||
deepCopy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user