Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.0/Cloud)

85567: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
      85475: MNT-12398 : FeedNotifier - Users mixed up, fail to send notification email
      Fixed formatting.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94504 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 09:31:48 +00:00
parent 9c0e08b45d
commit 33cb8d37d6

View File

@@ -272,16 +272,16 @@ public class FeedNotifierImpl implements FeedNotifier, ApplicationContextAware
try try
{ {
if (! feedEmailTemplateLocation.getQueryLanguage().equals(SearchService.LANGUAGE_XPATH)) if (!feedEmailTemplateLocation.getQueryLanguage().equals(SearchService.LANGUAGE_XPATH))
{ {
logger.error("Cannot find the activities email template - repository location query language is not 'xpath': "+feedEmailTemplateLocation.getQueryLanguage()); logger.error("Cannot find the activities email template - repository location query language is not 'xpath': " + feedEmailTemplateLocation.getQueryLanguage());
return null; return null;
} }
List<NodeRef> nodeRefs = searchService.selectNodes(nodeService.getRootNode(store), xpath, null, namespaceService, false); List<NodeRef> nodeRefs = searchService.selectNodes(nodeService.getRootNode(store), xpath, null, namespaceService, false);
if (nodeRefs.size() != 1) if (nodeRefs.size() != 1)
{ {
logger.error("Cannot find the activities email template: "+xpath); logger.error("Cannot find the activities email template: " + xpath);
return null; return null;
} }
@@ -300,7 +300,7 @@ public class FeedNotifierImpl implements FeedNotifier, ApplicationContextAware
} }
else else
{ {
logger.error("Unsupported location type: "+locationType); logger.error("Unsupported location type: " + locationType);
return null; return null;
} }
} }
@@ -388,7 +388,7 @@ public class FeedNotifierImpl implements FeedNotifier, ApplicationContextAware
int entryCnt = result.getFirst(); int entryCnt = result.getFirst();
final long maxFeedId = result.getSecond(); final long maxFeedId = result.getSecond();
Long currentMaxFeedId = (Long)nodeService.getProperty(personNodeRef, ContentModel.PROP_EMAIL_FEED_ID); Long currentMaxFeedId = (Long) nodeService.getProperty(personNodeRef, ContentModel.PROP_EMAIL_FEED_ID);
if ((currentMaxFeedId == null) || (currentMaxFeedId < maxFeedId)) if ((currentMaxFeedId == null) || (currentMaxFeedId < maxFeedId))
{ {
nodeService.setProperty(personNodeRef, ContentModel.PROP_EMAIL_FEED_ID, maxFeedId); nodeService.setProperty(personNodeRef, ContentModel.PROP_EMAIL_FEED_ID, maxFeedId);
@@ -401,7 +401,7 @@ public class FeedNotifierImpl implements FeedNotifier, ApplicationContextAware
catch (InvalidNodeRefException inre) catch (InvalidNodeRefException inre)
{ {
// skip this person - eg. no longer exists ? // skip this person - eg. no longer exists ?
logger.warn("Skip feed notification for user ("+personNodeRef+"): " + inre.getMessage()); logger.warn("Skip feed notification for user (" + personNodeRef + "): " + inre.getMessage());
} }
} }
}; };