[Commits] (donn) Removed a repoistory bug workaround in Content Model

commits at osafoundation.org commits at osafoundation.org
Tue Oct 19 14:30:29 PDT 2004


Commit by: donn
Modified files:
chandler/parcels/osaf/contentmodel/ContentModel.py 1.38 1.39
chandler/parcels/osaf/contentmodel/calendar/Calendar.py 1.23 1.24
chandler/parcels/osaf/contentmodel/mail/Mail.py 1.39 1.40
chandler/parcels/osaf/contentmodel/tasks/Task.py 1.9 1.10

Log message:
Removed a repoistory bug workaround in Content Model
------------------------------------
* Crufty copyValue() method is now gone

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/contentmodel/ContentModel.py.diff?r1=text&tr1=1.38&r2=text&tr2=1.39
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/contentmodel/calendar/Calendar.py.diff?r1=text&tr1=1.23&r2=text&tr2=1.24
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/contentmodel/mail/Mail.py.diff?r1=text&tr1=1.39&r2=text&tr2=1.40
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/contentmodel/tasks/Task.py.diff?r1=text&tr1=1.9&r2=text&tr2=1.10

Index: chandler/parcels/osaf/contentmodel/ContentModel.py
diff -u chandler/parcels/osaf/contentmodel/ContentModel.py:1.38 chandler/parcels/osaf/contentmodel/ContentModel.py:1.39
--- chandler/parcels/osaf/contentmodel/ContentModel.py:1.38	Mon Oct 18 17:57:30 2004
+++ chandler/parcels/osaf/contentmodel/ContentModel.py	Tue Oct 19 14:30:26 2004
@@ -1,8 +1,8 @@
 """ Classes used for contentmodel parcel and kinds.
 """
 
-__revision__  = "$Revision: 1.38 $"
-__date__      = "$Date: 2004/10/19 00:57:30 $"
+__revision__  = "$Revision: 1.39 $"
+__date__      = "$Date: 2004/10/19 21:30:26 $"
 __copyright__ = "Copyright (c) 2003-2004 Open Source Applications Foundation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -243,38 +243,7 @@
                 except AttributeError:
                     pass
                 else:
-                    destItem.setAttributeValue (name, self.copyValue (value))
-
-    def copyValue (self, value):
-        # don't need to clone single items
-        # @@@DLD - find out if there's a better way to copy an attribute value
-        if not isinstance (value, RefList):
-            return value
-
-        # check the first item to see if it has an alias
-        try:
-            alias = value.getAlias(value[0])
-        except:
-            hasAlias = False
-        else:
-            hasAlias = alias is not None
-
-
-        # create the clone
-        if hasAlias:
-            clone = {}
-        else:
-            clone = []
-
-        # copy each item, using alias if available
-        for item in value:
-            if hasAlias:
-                alias = value.getAlias(item)
-                clone[alias] = item
-            else:
-                clone.append(item)
-        
-        return clone
+                    destItem.setAttributeValue (name, value)
 
     """
       STAMPING TARGET-KIND DETERMINATION

Index: chandler/parcels/osaf/contentmodel/calendar/Calendar.py
diff -u chandler/parcels/osaf/contentmodel/calendar/Calendar.py:1.23 chandler/parcels/osaf/contentmodel/calendar/Calendar.py:1.24
--- chandler/parcels/osaf/contentmodel/calendar/Calendar.py:1.23	Mon Oct  4 23:26:15 2004
+++ chandler/parcels/osaf/contentmodel/calendar/Calendar.py	Tue Oct 19 14:30:26 2004
@@ -1,8 +1,8 @@
 """ Classes used for Calendar parcel kinds
 """
 
-__revision__  = "$Revision: 1.23 $"
-__date__      = "$Date: 2004/10/05 06:26:15 $"
+__revision__  = "$Revision: 1.24 $"
+__date__      = "$Date: 2004/10/19 21:30:26 $"
 __copyright__ = "Copyright (c) 2003-2004 Open Source Applications Foundation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -143,7 +143,7 @@
         # set participants to any existing "who"
         try:
             # need to shallow copy the list
-            self.participants = self.copyValue (self.getAnyWho ())
+            self.participants = self.getAnyWho ()
         except AttributeError:
             pass # no participants yet
 

Index: chandler/parcels/osaf/contentmodel/mail/Mail.py
diff -u chandler/parcels/osaf/contentmodel/mail/Mail.py:1.39 chandler/parcels/osaf/contentmodel/mail/Mail.py:1.40
--- chandler/parcels/osaf/contentmodel/mail/Mail.py:1.39	Mon Oct 18 13:04:58 2004
+++ chandler/parcels/osaf/contentmodel/mail/Mail.py	Tue Oct 19 14:30:27 2004
@@ -1,8 +1,8 @@
 """ Classes used for Mail parcel kinds
 """
 
-__revision__  = "$Revision: 1.39 $"
-__date__      = "$Date: 2004/10/18 20:04:58 $"
+__revision__  = "$Revision: 1.40 $"
+__date__      = "$Date: 2004/10/19 21:30:27 $"
 __copyright__ = "Copyright (c) 2003-2004 Open Source Applications Foundation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -392,7 +392,7 @@
         # default the toAddress to any super class "who" definition
         try:
             # need to shallow copy the list
-            self.toAddress = self.copyValue (self.getAnyWho ())
+            self.toAddress = self.getAnyWho ()
         except AttributeError:
             pass
 

Index: chandler/parcels/osaf/contentmodel/tasks/Task.py
diff -u chandler/parcels/osaf/contentmodel/tasks/Task.py:1.9 chandler/parcels/osaf/contentmodel/tasks/Task.py:1.10
--- chandler/parcels/osaf/contentmodel/tasks/Task.py:1.9	Mon Oct  4 23:26:17 2004
+++ chandler/parcels/osaf/contentmodel/tasks/Task.py	Tue Oct 19 14:30:27 2004
@@ -2,8 +2,8 @@
 """ Class used for Items of Kind Task
 """
 
-__revision__  = "$Revision: 1.9 $"
-__date__      = "$Date: 2004/10/05 06:26:17 $"
+__revision__  = "$Revision: 1.10 $"
+__date__      = "$Date: 2004/10/19 21:30:27 $"
 __copyright__ = "Copyright (c) 2003-2004 Open Source Applications Foundation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -102,7 +102,7 @@
         # default the requestee to any super class "who" definition
         try:
             # shallow copy the list
-            self.requestee = self.copyValue (self.getAnyWho ())
+            self.requestee = self.getAnyWho ()
         except AttributeError:
             pass
 



More information about the Commits mailing list