Merged V2.2 to HEAD

7575: Permission changes for AVM.
   7577: Incorporated most of the feedback provided by Kevin C earlier today
   7578: Removed directory not removed by patch
   7579: EmailServer bug fixes
         AR-1902:  Double posts when emailing to a document
         AR-1904:  Attachments via email should be allowed on forum posts
         AR-1903:  (Partial Fix) Text attachments should be treated the same way as other attachments 
   7583: Fixed WCM-961 & WCM-962: Added confirm dialog for 'Delete All Deployment Reports' and 'Release Server' actions


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8434 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-03-06 14:43:55 +00:00
parent a9fac10b45
commit a49bfd311d
89 changed files with 21301 additions and 11139 deletions

View File

@@ -51,7 +51,7 @@ public class DocumentEmailMessageHandler extends AbstractForumEmailMessageHandle
{
private static final String forumNodeName = "EmailForum";
public void processMessage(NodeRef nodeRef, EmailMessage message)
public void processMessage(NodeRef contentNodeRef, EmailMessage message)
{
String messageSubject;
@@ -64,27 +64,34 @@ public class DocumentEmailMessageHandler extends AbstractForumEmailMessageHandle
messageSubject = "EMPTY_SUBJECT_" + System.currentTimeMillis();
}
QName nodeTypeQName = getNodeService().getType(nodeRef);
QName nodeTypeQName = getNodeService().getType(contentNodeRef);
DictionaryService dictionaryService = getDictionaryService();
if (dictionaryService.isSubClass(nodeTypeQName, ContentModel.TYPE_CONTENT))
{
NodeRef forumNode = getForumNode(nodeRef);
// Find where the content resides
NodeRef spaceNodeRef = getNodeService().getPrimaryParent(contentNodeRef).getParentRef();
NodeRef forumNode = getForumNode(contentNodeRef);
if (forumNode == null)
{
forumNode = addForumNode(nodeRef);
forumNode = addForumNode(contentNodeRef);
}
// Try to find existed node
NodeRef topicNode = getTopicNode(forumNode, messageSubject);
NodeRef topicNodeRef = getTopicNode(forumNode, messageSubject);
if (topicNode == null)
if (topicNodeRef == null)
{
topicNode = addTopicNode(forumNode, messageSubject);
topicNodeRef = addTopicNode(forumNode, messageSubject);
}
addPostNode(topicNode, message);
// Create the post
NodeRef postNodeRef = addPostNode(topicNodeRef, message);
// Add attachments
addAttachments(spaceNodeRef, postNodeRef, message);
}
else
{