mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V4.0-BUG-FIX to HEAD
37502: Merged V3.4-BUG-FIX to V4.0-BUG-FIX (RECORD ONLY) 37159: ALF-12541: Fix EOL. 37172: Merged HEAD to V3.4-BUG-FIX: 33880: ALF-12777 / ALF-14259: MMT should not install AMPs which override pre-existing files in the war file, unless -force is provided. The MMT is moving toward more of a validation phase (checks things, calculate changes) then an execution phase (makes the changes). 37526: ALF-11027: update URLs to our Maven repos 37554: Follow-on fix to ALF-9661 - do not fire update rule (onDeleteAssociation) if node also no longer exists - will fail with concurrency/retry error (=> "Attempt to follow reference ... to deleted node") - fix targeted for 4.0.3 (requires merge from V4.0-BUG-FIX to V4.0) - required by CloudSync (ALF-13941) - eg. last target( SSMN) also deletes source (SSD) 37564: Pull out some bits to constants, so downstream classes can more easily configure themselves 37571: ALF-14055: Merged V3.4-BUG-FIX to V4.0-BUG-FIX 37570: ALF-13751: Catastrophic indexing performance when a repository containing 60,000 sites, all containing the admin user is synced with an LDAP server containing an admin user - made LDAP sync only apply incremental changes to zones (rather than removing all and adding all) and made it preserve the AUTH.ALF zone if it is already there, as that contains all the site group paths git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@37572 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
* Copyright (C) 2005-2012 Alfresco Software Limited.
|
||||||
*
|
*
|
||||||
* This file is part of Alfresco
|
* This file is part of Alfresco
|
||||||
*
|
*
|
||||||
@@ -64,6 +64,9 @@ public class SingleAssocRefPolicyRuleTrigger extends RuleTriggerAbstractBase
|
|||||||
public void policyBehaviour(AssociationRef assocRef)
|
public void policyBehaviour(AssociationRef assocRef)
|
||||||
{
|
{
|
||||||
NodeRef nodeRef = assocRef.getSourceRef();
|
NodeRef nodeRef = assocRef.getSourceRef();
|
||||||
|
|
||||||
|
if (nodeService.exists(nodeRef))
|
||||||
|
{
|
||||||
List<ChildAssociationRef> parentsAssocRefs = this.nodeService.getParentAssocs(nodeRef);
|
List<ChildAssociationRef> parentsAssocRefs = this.nodeService.getParentAssocs(nodeRef);
|
||||||
for (ChildAssociationRef parentAssocRef : parentsAssocRefs)
|
for (ChildAssociationRef parentAssocRef : parentsAssocRefs)
|
||||||
{
|
{
|
||||||
@@ -77,3 +80,4 @@ public class SingleAssocRefPolicyRuleTrigger extends RuleTriggerAbstractBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@@ -947,7 +947,7 @@ public class ADMLuceneIndexerImpl extends AbstractLuceneIndexerImpl<NodeRef> imp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only process 'containers' - not leaves
|
// Only process 'containers' - not leaves
|
||||||
if (getCachedChildren(childAssociationsSinceFlush, nodeRef).isEmpty())
|
if (getCachedChildren(childAssociationsSinceFlush, nodeRef, cascade).isEmpty())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -987,7 +987,7 @@ public class ADMLuceneIndexerImpl extends AbstractLuceneIndexerImpl<NodeRef> imp
|
|||||||
if (cascade)
|
if (cascade)
|
||||||
{
|
{
|
||||||
List<Path> childPaths = new LinkedList<Path>();
|
List<Path> childPaths = new LinkedList<Path>();
|
||||||
for (ChildAssociationRef childRef : getCachedChildren(childAssociationsSinceFlush, nodeRef))
|
for (ChildAssociationRef childRef : getCachedChildren(childAssociationsSinceFlush, nodeRef, cascade))
|
||||||
{
|
{
|
||||||
childPaths.add(new Path().append(path).append(new Path.ChildAssocElement(childRef)));
|
childPaths.add(new Path().append(path).append(new Path.ChildAssocElement(childRef)));
|
||||||
}
|
}
|
||||||
@@ -998,14 +998,14 @@ public class ADMLuceneIndexerImpl extends AbstractLuceneIndexerImpl<NodeRef> imp
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<ChildAssociationRef> getCachedChildren(
|
private List<ChildAssociationRef> getCachedChildren(
|
||||||
Map<NodeRef, List<ChildAssociationRef>> childAssociationsSinceFlush, NodeRef nodeRef)
|
Map<NodeRef, List<ChildAssociationRef>> childAssociationsSinceFlush, NodeRef nodeRef, boolean bulkLoad)
|
||||||
{
|
{
|
||||||
List <ChildAssociationRef> children = childAssociationsSinceFlush.get(nodeRef);
|
List <ChildAssociationRef> children = childAssociationsSinceFlush.get(nodeRef);
|
||||||
|
|
||||||
// Cache the children in case there are many paths to the same node
|
// Cache the children in case there are many paths to the same node
|
||||||
if (children == null)
|
if (children == null)
|
||||||
{
|
{
|
||||||
children = nodeService.getChildAssocs(nodeRef, RegexQNamePattern.MATCH_ALL, RegexQNamePattern.MATCH_ALL, false);
|
children = nodeService.getChildAssocs(nodeRef, RegexQNamePattern.MATCH_ALL, RegexQNamePattern.MATCH_ALL, bulkLoad);
|
||||||
for (ChildAssociationRef childRef : children)
|
for (ChildAssociationRef childRef : children)
|
||||||
{
|
{
|
||||||
// We don't want index numbers in generated paths
|
// We don't want index numbers in generated paths
|
||||||
|
@@ -1671,9 +1671,7 @@ public class ChainingUserRegistrySynchronizer extends AbstractLifecycleBean impl
|
|||||||
+ "'. This user will in future be assumed to originate from user registry '" + zone
|
+ "'. This user will in future be assumed to originate from user registry '" + zone
|
||||||
+ "'.");
|
+ "'.");
|
||||||
}
|
}
|
||||||
ChainingUserRegistrySynchronizer.this.authorityService.removeAuthorityFromZones(personName,
|
updateAuthorityZones(personName, zones, zoneSet);
|
||||||
zones);
|
|
||||||
ChainingUserRegistrySynchronizer.this.authorityService.addAuthorityToZones(personName, zoneSet);
|
|
||||||
ChainingUserRegistrySynchronizer.this.personService.setPersonProperties(personName,
|
ChainingUserRegistrySynchronizer.this.personService.setPersonProperties(personName,
|
||||||
personProperties, false);
|
personProperties, false);
|
||||||
}
|
}
|
||||||
@@ -1875,6 +1873,33 @@ public class ChainingUserRegistrySynchronizer extends AbstractLifecycleBean impl
|
|||||||
return zones;
|
return zones;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Modifies an authority's zone set from oldZones to newZones in the most efficient manner (avoiding unnecessary
|
||||||
|
* reindexing cost).
|
||||||
|
*
|
||||||
|
* @param authorityName
|
||||||
|
* @param oldZones
|
||||||
|
* @param newZones
|
||||||
|
*/
|
||||||
|
private void updateAuthorityZones(String authorityName, Set<String> oldZones, final Set<String> newZones)
|
||||||
|
{
|
||||||
|
Set<String> zonesToRemove = new HashSet<String>(oldZones);
|
||||||
|
zonesToRemove.removeAll(newZones);
|
||||||
|
// Let's keep the authority in the alfresco auth zone if it was already there. Otherwise we may have to
|
||||||
|
// regenerate all paths to this authority from site groups, which could be very expensive!
|
||||||
|
zonesToRemove.remove(AuthorityService.ZONE_AUTH_ALFRESCO);
|
||||||
|
if (!zonesToRemove.isEmpty())
|
||||||
|
{
|
||||||
|
this.authorityService.removeAuthorityFromZones(authorityName, zonesToRemove);
|
||||||
|
}
|
||||||
|
Set<String> zonesToAdd = new HashSet<String>(newZones);
|
||||||
|
zonesToAdd.removeAll(oldZones);
|
||||||
|
if (!zonesToAdd.isEmpty())
|
||||||
|
{
|
||||||
|
this.authorityService.addAuthorityToZones(authorityName, zonesToAdd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @seeorg.springframework.extensions.surf.util.AbstractLifecycleBean#onBootstrap(org.springframework.context.
|
* @seeorg.springframework.extensions.surf.util.AbstractLifecycleBean#onBootstrap(org.springframework.context.
|
||||||
|
Reference in New Issue
Block a user