[Commits] (pavlov) when getting itemcollections, make sure we sync all the items in the collection and don't just bail when the collection is up-to-date

commits at osafoundation.org commits at osafoundation.org
Wed Aug 25 17:09:55 PDT 2004


Commit by: pavlov
Modified files:
chandler/parcels/osaf/framework/webdav/Sync.py 1.16 1.17

Log message:
when getting itemcollections, make sure we sync all the items in the collection and don't just bail when the collection is up-to-date


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/webdav/Sync.py.diff?r1=text&tr1=1.16&r2=text&tr2=1.17

Index: chandler/parcels/osaf/framework/webdav/Sync.py
diff -u chandler/parcels/osaf/framework/webdav/Sync.py:1.16 chandler/parcels/osaf/framework/webdav/Sync.py:1.17
--- chandler/parcels/osaf/framework/webdav/Sync.py:1.16	Mon Aug 23 17:47:51 2004
+++ chandler/parcels/osaf/framework/webdav/Sync.py	Wed Aug 25 17:09:53 2004
@@ -302,6 +302,22 @@
         # toss this in to the itemMap so we can find it later
         sharing.itemMap[origUUID] = newItem.itsUUID
 
-    dav.sync(newItem)
+
+    if newItem.isItemOf(Globals.repository.findPath('//parcels/osaf/contentmodel/ItemCollection')):
+        contentItemKind = Globals.repository.findPath('//parcels/osaf/contentmodel/ContentItem')
+        for i in newItem:
+            clouds = i.itsKind.getClouds('default')
+            for cloud in clouds:
+                for k in cloud.getItems(i):
+                    # we only support publishing content items
+                    
+                    if not k.isItemOf(contentItemKind):
+                        print 'Skipping %s -- Not a ContentItem' % (str(k))
+                        continue
+                    if not k.hasAttributeValue('sharedURL'):
+                        continue
+                    Dav.DAV(k.sharedURL).sync(k)
+    else:
+        dav.sync(newItem)
 
     return newItem



More information about the Commits mailing list