mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-4352 : F99 alien invasion - node service call for selecting children where a property = value
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21855 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -218,8 +218,8 @@ public class AlienProcessorImpl implements AlienProcessor
|
||||
/**
|
||||
* Check the siblings of this node to see whether there are any other alien nodes for this invader.
|
||||
*/
|
||||
//TODO replace with a more efficient query
|
||||
List<ChildAssociationRef> refs = nodeService.getChildAssocs(parentNodeRef);
|
||||
//List<ChildAssociationRef> refs = nodeService.getChildAssocs(parentNodeRef);
|
||||
List<ChildAssociationRef> refs = nodeService.getChildAssocsByPropertyValue(parentNodeRef, TransferModel.PROP_INVADED_BY, exInvader);
|
||||
|
||||
for(ChildAssociationRef ref : refs)
|
||||
{
|
||||
@@ -431,7 +431,6 @@ public class AlienProcessorImpl implements AlienProcessor
|
||||
{
|
||||
log.debug("parent was not transferred or alien");
|
||||
|
||||
// TODO Need to remove the alien flags
|
||||
String parentRepoId = descriptorService.getCurrentRepositoryDescriptor().getId();
|
||||
retreatDownwards(childNodeRef, parentRepoId);
|
||||
|
||||
@@ -506,8 +505,8 @@ public class AlienProcessorImpl implements AlienProcessor
|
||||
getNodeService().setProperty(currentNodeRef, TransferModel.PROP_INVADED_BY, (Serializable)invadedBy);
|
||||
}
|
||||
|
||||
//TODO replace with a more efficient query
|
||||
List<ChildAssociationRef> refs = getNodeService().getChildAssocs(currentNodeRef);
|
||||
//List<ChildAssociationRef> refs = getNodeService().getChildAssocs(currentNodeRef);
|
||||
List<ChildAssociationRef> refs = nodeService.getChildAssocsByPropertyValue(currentNodeRef, TransferModel.PROP_INVADED_BY, fromRepositoryId);
|
||||
for(ChildAssociationRef ref : refs)
|
||||
{
|
||||
if(log.isDebugEnabled())
|
||||
@@ -568,9 +567,7 @@ public class AlienProcessorImpl implements AlienProcessor
|
||||
{
|
||||
log.debug("folder has multiple invaders");
|
||||
// multiple invasion - so it must be a folder
|
||||
|
||||
//TODO replace with a more efficient query
|
||||
List<ChildAssociationRef> refs = getNodeService().getChildAssocs(currentNodeRef);
|
||||
List<ChildAssociationRef> refs = nodeService.getChildAssocsByPropertyValue(currentNodeRef, TransferModel.PROP_INVADED_BY, fromRepositoryId);
|
||||
for(ChildAssociationRef ref : refs)
|
||||
{
|
||||
if(log.isDebugEnabled())
|
||||
|
Reference in New Issue
Block a user