[Commits] (bkirsch) added a getMailMessage method

commits at osafoundation.org commits at osafoundation.org
Mon Aug 30 12:35:34 PDT 2004


Commit by: bkirsch
Modified files:
chandler/parcels/osaf/mail/message.py 1.17 1.18

Log message:
added a getMailMessage method

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/mail/message.py.diff?r1=text&tr1=1.17&r2=text&tr2=1.18

Index: chandler/parcels/osaf/mail/message.py
diff -u chandler/parcels/osaf/mail/message.py:1.17 chandler/parcels/osaf/mail/message.py:1.18
--- chandler/parcels/osaf/mail/message.py:1.17	Sun Aug 29 02:08:43 2004
+++ chandler/parcels/osaf/mail/message.py	Mon Aug 30 12:35:32 2004
@@ -1,9 +1,10 @@
-__revision__  = "$Revision: 1.17 $"
-__date__      = "$Date: 2004/08/29 09:08:43 $"
+__revision__  = "$Revision: 1.18 $"
+__date__      = "$Date: 2004/08/30 19:35:32 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
 import osaf.contentmodel.mail.Mail as Mail
+import repository.util.UUID as UUID
 import repository.persistence.XMLRepositoryView as XMLRepositoryView
 import mx.DateTime as DateTime
 import email as email
@@ -347,6 +348,13 @@
 
     return string
 
+def getMailMessage(UUID):
+    if not isinstance(UUID, UUID.UUID):
+        return None
+
+    mailMessageKind = Mail.MailParcel.getMailMessageKind()
+    return Mail.mailMessageKind.findUUID(UUID)
+
 
 def __populateParam(messageObject, param, var, type='String'):
 
@@ -377,7 +385,7 @@
             keyArgs = {}
             if hasValue(addr[0]):
                 keyArgs['fullName'] = addr[0]
-                
+
             ea = Mail.EmailAddress.getEmailAddress(addr[1], **keyArgs)
 
             setattr(kindVar, attr, ea)
@@ -405,3 +413,4 @@
         return True
 
     return False
+



More information about the Commits mailing list