mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged V3.1 to HEAD
13077: Abstracted ContentStore MBean operations 13099: Merge V3.0 to V3.1 13096 Merged V2.2 to V3.0 13071: Fix ETWOTWO-1058: Hibernate exception while concurrently submitting from and updating same user sandbox. 13079: Fix ETWOTWO-1117: Misleading exceptions reported during AVM flatten and update 13102: [no comment] 13112: Merged V3.0 to V3.1 13111: Merged V2.2 to V3.0 13110: Fix 2.1 -> 2.2 upgrade on Postgres 13114: Build/test fix (Enterprise Remote API project does not yet have any Java files to generate Javadoc) 13117: DM Index Check - unit test improvements 13123: *RECORD ONLY* Removed svn:mergeinfo fluff 13124: Used newer, more efficient NodeService.addProperties method instead of many NodeService.setProperty calls 13125: Added M2Binding for 'child-association': propagateTimestamps' 13126: WCM unit tests - reduce build/test time to check (async) submits 13127: Minor test fix - to allow it to run locally (on Mac OS X) 13130: Support for 'maxRetries' of zero or less 13131: Merged V3.0 to V3.1 13025 *RECORD-ONLY*: Removed unnecessary svn:mergeinfo 13026: Merged V2.2 to V3.0 12964: Fixed ETWOTWO-968: Space rules are not run when saving from MS Word 12993 *RECORD-ONLY*: added openoffice bootstrap context to sample-extensions 13009 *RECORD-ONLY*: Avoid default OOo config from causing problems on zip/gz installs 13132: Updated svn:mergeinfo 13134: ETHREEOH-1202 - initial fix and unit tests ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.0:r13005,13025-13026,13030,13039,13042,13050,13053,13096,13098,13111 Merged /alfresco/BRANCHES/V2.2:r12964,12993,13009,13071,13079,13110 Merged /alfresco/BRANCHES/V3.1:r13077,13099,13102,13112,13114,13117,13123-13127,13130-13132,13134 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13564 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -200,7 +200,7 @@ public class RoutingContentService implements ContentService, ApplicationContext
|
||||
Map<QName, Serializable> after)
|
||||
{
|
||||
boolean fire = false;
|
||||
boolean newContent = false;
|
||||
boolean isNewContent = false;
|
||||
// check if any of the content properties have changed
|
||||
for (QName propertyQName : after.keySet())
|
||||
{
|
||||
@@ -221,49 +221,39 @@ public class RoutingContentService implements ContentService, ApplicationContext
|
||||
{
|
||||
ContentData beforeValue = (ContentData) before.get(propertyQName);
|
||||
ContentData afterValue = (ContentData) after.get(propertyQName);
|
||||
if (afterValue != null && afterValue.getContentUrl() == null)
|
||||
boolean hasContentBefore = ContentData.hasContent(beforeValue);
|
||||
boolean hasContentAfter = ContentData.hasContent(afterValue);
|
||||
|
||||
// There are some shortcuts here
|
||||
if (!hasContentBefore && !hasContentAfter)
|
||||
{
|
||||
// no URL - ignore
|
||||
// Really, nothing happened
|
||||
continue;
|
||||
}
|
||||
else if (!EqualsHelper.nullSafeEquals(beforeValue, afterValue))
|
||||
else if (EqualsHelper.nullSafeEquals(beforeValue, afterValue))
|
||||
{
|
||||
// So debug ...
|
||||
if (logger.isDebugEnabled() == true)
|
||||
{
|
||||
String beforeString = "";
|
||||
if (beforeValue != null)
|
||||
{
|
||||
beforeString = beforeValue.toString();
|
||||
}
|
||||
String afterString = "";
|
||||
if (afterValue != null)
|
||||
{
|
||||
afterString = afterValue.toString();
|
||||
}
|
||||
logger.debug("onContentUpate: before = " + beforeString + "; after = " + afterString);
|
||||
}
|
||||
|
||||
// Figure out if the content is new or not
|
||||
String beforeContentUrl = null;
|
||||
if (beforeValue != null)
|
||||
{
|
||||
beforeContentUrl = beforeValue.getContentUrl();
|
||||
}
|
||||
String afterContentUrl = null;
|
||||
if (afterValue != null)
|
||||
{
|
||||
afterContentUrl = afterValue.getContentUrl();
|
||||
}
|
||||
if (beforeContentUrl == null && afterContentUrl != null)
|
||||
{
|
||||
newContent = true;
|
||||
}
|
||||
|
||||
// the content changed
|
||||
// at the moment, we are only interested in this one change
|
||||
fire = true;
|
||||
break;
|
||||
// Still, nothing happening
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check for new content
|
||||
isNewContent = !hasContentBefore && hasContentAfter;
|
||||
|
||||
// So debug ...
|
||||
if (logger.isDebugEnabled() == true)
|
||||
{
|
||||
String name = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
|
||||
logger.debug(
|
||||
"onContentUpdate will fire: \n" +
|
||||
" Name: " + name + "\n" +
|
||||
" Is new: " + isNewContent + "\n" +
|
||||
" Before: " + beforeValue + "\n" +
|
||||
" After: " + afterValue);
|
||||
}
|
||||
|
||||
// We are interested in any content change
|
||||
fire = true;
|
||||
break;
|
||||
}
|
||||
catch (ClassCastException e)
|
||||
{
|
||||
@@ -278,7 +268,7 @@ public class RoutingContentService implements ContentService, ApplicationContext
|
||||
Set<QName> types = new HashSet<QName>(this.nodeService.getAspects(nodeRef));
|
||||
types.add(this.nodeService.getType(nodeRef));
|
||||
OnContentUpdatePolicy policy = this.onContentUpdateDelegate.get(nodeRef, types);
|
||||
policy.onContentUpdate(nodeRef, newContent);
|
||||
policy.onContentUpdate(nodeRef, isNewContent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,10 +317,11 @@ public class RoutingContentService implements ContentService, ApplicationContext
|
||||
Serializable propValue = nodeService.getProperty(nodeRef, propertyQName);
|
||||
if (propValue instanceof Collection)
|
||||
{
|
||||
Collection colPropValue = (Collection)propValue;
|
||||
@SuppressWarnings("unchecked")
|
||||
Collection<Serializable> colPropValue = (Collection<Serializable>)propValue;
|
||||
if (colPropValue.size() > 0)
|
||||
{
|
||||
propValue = (Serializable)colPropValue.iterator().next();
|
||||
propValue = colPropValue.iterator().next();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user