mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.4-BUG-FIX to HEAD
30744: ALF-9524: WCM: Defining a complex type with 'abstract' attribute to true does not allow other complex types to define elements with the same name - Fix by Pavel 30804: ALF-9524: Fix to NPE by Pavel 30812: ALF-718: Rules Fire Emails before Transaction Commit/Rollback Added tests and moved email sending into a post commit callback. 30820: Fix for ALF-10516 - 'My Sites' dashlet should indicate it is loading rather than say 'No sites' 30824: Fixed ALF-10470: DeclaritiveRegistry is looping continuously and re-initializing - Only replicate removals for the cache. The reset always does a remove first. <cache name="org.alfresco.cache.webScriptsRegistryCache" ... replicateUpdates = false, ... </cache> 30827: ALF-10513 60k Site Performance: Unable to delete user + request not acknowledged for 2 minutes Now about 3 to 4 seconds 30828: Andy H recommended change to lucene indexer values 30831: ALF-718: Fix for InvitationServiceImplTest Fixes behaviour broken by original fix for ALF-718: the send-after-commit does NOT work for the invitation service, so it was necessary to change the code to only send-after-commit in the context of a rule. 30843: Fixed ALF-7698 "Defects in tags picker in SHARE." according to feedback provided in ALF-9953 "Decide order where new items shall appear in the object finder." 30844: ALF-9544 - Inbound email restricts file name to 86 characters or less. used QName.createQNameWithValidLocalName() as suggested. added new EmailServiceImplTest 30849: Fixed ALF-8776 "Rule details dialog handling of apostrophes" 30862: Merged DEV/TEMPORARY to V3.4-BUG-FIX (with improvements) 30856: ALF-10288: Regression of ALF-1997: non domain users cannot bypass SSO in Share using /share/page?pt=login In SSOAuthenticationFilter.doFilter() method added check (PAGE_SERVLET_PATH.equals(req.getServletPath()) && LOGIN_PATH_INFORMATION.equals(req.getPathInfo()). 30864: SMTP Server, To and From address format. - Out standards for from and to address were stuck in the 1980s! 30867: ALF-10517 - 'My Content' slow - performance improvements by reworking Lucene queries used to retrieve recently modified and recently created content for a user - converted queries to fts-alfresco - improvements from 3.5sec per page render down to 1.1 secs 30874: MERGE DEV to V3.4-BUG-FIX 30851 : ALF-9558 - Unchecked Return Value 30882: - ScriptGroup.isRootGroup() now stops if it finds a single parent rather than doing a size on all parent groups. Not sure the logic (not changed by me) is correct as it includes parents that are site groups. - SiteServiceImpl now only gets the specified number of sites. Sometimes it would have return more if AuthorityDAOImpl switched approach used to get containing authorities. - Overloaded getContainingAuthorities to take a size parameter, deprecated other and switched calling code Done for isRootGroup activity. 30910: - Fix build error - Found a better way to use filter in AuthorityDAOImpl.getContainingAuthoritiesInZone so that we don't need to reset the filter, by using the +ve hits from first approach if we switch to second approach. 30925: - ALF-10501 60k Site Performance: Searching for a group to add to a site with a value that matches a few sites takes 2 minutes ALF-10502 60k Site Performance: Admin Console | Groups: search with a value that matches a few sites takes 70 seconds ALF-10504 60k Site Performance: Admin Console | Groups | Browse Groups page appears corrupt as it never finishes loading - All the above were slow as a result of ScriptGroup.isRootGroup() - ScriptGroup.isRootGroup() and ScriptGroup.isAdminGroup() removed - Checked with KevinR that these are not needed any more. - Removed code added on 30 Sep 11 to support isRootGroup (the size parameter to AuthorityDAO.getContainingAuthorities) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30935 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,8 @@ import java.util.Set;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.action.ActionModel;
|
||||
import org.alfresco.repo.action.RuntimeActionService;
|
||||
import org.alfresco.repo.action.executer.CompositeActionExecuter;
|
||||
import org.alfresco.repo.action.executer.MailActionExecuter;
|
||||
import org.alfresco.repo.cache.NullCache;
|
||||
import org.alfresco.repo.cache.SimpleCache;
|
||||
import org.alfresco.repo.node.NodeServicePolicies;
|
||||
@@ -41,6 +43,7 @@ import org.alfresco.repo.transaction.TransactionListener;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ActionService;
|
||||
import org.alfresco.service.cmr.action.ActionServiceException;
|
||||
import org.alfresco.service.cmr.action.CompositeAction;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.CopyService;
|
||||
@@ -86,6 +89,13 @@ public class RuleServiceImpl
|
||||
private String ASSOC_NAME_RULES_PREFIX = "rules";
|
||||
private RegexQNamePattern ASSOC_NAME_RULES_REGEX = new RegexQNamePattern(RuleModel.RULE_MODEL_URI, "^" + ASSOC_NAME_RULES_PREFIX + ".*");
|
||||
|
||||
private static final Set<QName> IGNORE_PARENT_ASSOC_TYPES = new HashSet<QName>(7);
|
||||
static
|
||||
{
|
||||
IGNORE_PARENT_ASSOC_TYPES.add(ContentModel.ASSOC_MEMBER);
|
||||
IGNORE_PARENT_ASSOC_TYPES.add(ContentModel.ASSOC_IN_ZONE);
|
||||
}
|
||||
|
||||
private static Log logger = LogFactory.getLog(RuleServiceImpl.class);
|
||||
|
||||
private NodeService nodeService;
|
||||
@@ -611,6 +621,12 @@ public class RuleServiceImpl
|
||||
List<ChildAssociationRef> parents = this.runtimeNodeService.getParentAssocs(nodeRef);
|
||||
for (ChildAssociationRef parent : parents)
|
||||
{
|
||||
// We are not interested in following potentially massive person group membership trees!
|
||||
if (IGNORE_PARENT_ASSOC_TYPES.contains(parent.getTypeQName()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add the inherited rule first
|
||||
for (Rule rule : getInheritedRules(parent.getParentRef(), ruleTypeName, visitedNodeRefs))
|
||||
{
|
||||
@@ -1167,9 +1183,37 @@ public class RuleServiceImpl
|
||||
|
||||
// Execute the rule
|
||||
boolean executeAsync = rule.getExecuteAsynchronously();
|
||||
this.actionService.executeAction(action, actionedUponNodeRef, true, executeAsync);
|
||||
// ALF-718: Treats email actions as a special case where they may be performed after the
|
||||
// current transaction is committed. This only deals with the bug fix and a more thorough approach
|
||||
// (but one with potentially wide ranging consequences) is to replace the boolean executeAsynchronously
|
||||
// property on Rules and Actions with an ExecutionTime property - which would
|
||||
// be an enumerated type with members SYNCHRONOUSLY, SYNCRHONOUSLY_AFTER_COMMIT and ASYNCHRONOUSLY.
|
||||
//
|
||||
// NOTE: this code is not at the Action level (i.e. ActionService) since the logic of sending after
|
||||
// successful commit works in the context of a Rule but not for the InvitationService.
|
||||
if (action.getActionDefinitionName().equals(CompositeActionExecuter.NAME))
|
||||
{
|
||||
for (Action subAction : ((CompositeAction)action).getActions())
|
||||
{
|
||||
if (subAction.getActionDefinitionName().equals(MailActionExecuter.NAME))
|
||||
{
|
||||
subAction.setParameterValue(MailActionExecuter.PARAM_SEND_AFTER_COMMIT, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (action.getActionDefinitionName().equals(MailActionExecuter.NAME))
|
||||
{
|
||||
action.setParameterValue(MailActionExecuter.PARAM_SEND_AFTER_COMMIT, true);
|
||||
}
|
||||
|
||||
executeAction(action, actionedUponNodeRef, executeAsync);
|
||||
}
|
||||
}
|
||||
|
||||
private void executeAction(Action action, NodeRef actionedUponNodeRef, boolean executeAsynchronously)
|
||||
{
|
||||
this.actionService.executeAction(action, actionedUponNodeRef, true, executeAsynchronously);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the rule can be executed
|
||||
|
Reference in New Issue
Block a user