[Commits] (morgen) Added an "active" attribute to Share, as well as a syncAll( ) method

commits at osafoundation.org commits at osafoundation.org
Tue Feb 1 10:43:14 PST 2005


Commit by: morgen
Modified files:
chandler/parcels/osaf/framework/sharing/Sharing.py 1.50 1.51
chandler/parcels/osaf/framework/sharing/parcel.xml 1.12 1.13

Log message:
Added an "active" attribute to Share, as well as a syncAll( ) method


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/sharing/Sharing.py.diff?r1=text&tr1=1.50&r2=text&tr2=1.51
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/sharing/parcel.xml.diff?r1=text&tr1=1.12&r2=text&tr2=1.13

Index: chandler/parcels/osaf/framework/sharing/Sharing.py
diff -u chandler/parcels/osaf/framework/sharing/Sharing.py:1.50 chandler/parcels/osaf/framework/sharing/Sharing.py:1.51
--- chandler/parcels/osaf/framework/sharing/Sharing.py:1.50	Mon Jan 31 17:10:33 2005
+++ chandler/parcels/osaf/framework/sharing/Sharing.py	Tue Feb  1 10:43:12 2005
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.50 $"
-__date__ = "$Date: 2005/02/01 01:10:33 $"
+__version__ = "$Revision: 1.51 $"
+__date__ = "$Date: 2005/02/01 18:43:12 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -1426,3 +1426,17 @@
 
     account = getWebDAVAccount(view)
     return account is not None
+
+
+def syncAll(view):
+    """ Synchronize all active shares.
+
+    @param view: The repository view object
+    @type view: L{repository.persistence.RepositoryView}
+    """
+
+    shareKind = view.findPath("//parcels/osaf/framework/sharing/Share")
+    for share in KindQuery().run([shareKind]):
+        if share.active:
+            share.sync()
+

Index: chandler/parcels/osaf/framework/sharing/parcel.xml
diff -u chandler/parcels/osaf/framework/sharing/parcel.xml:1.12 chandler/parcels/osaf/framework/sharing/parcel.xml:1.13
--- chandler/parcels/osaf/framework/sharing/parcel.xml:1.12	Mon Jan 31 17:10:33 2005
+++ chandler/parcels/osaf/framework/sharing/parcel.xml	Tue Feb  1 10:43:12 2005
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 
-<!-- $Revision: 1.12 $ -->
-<!-- $Date: 2005/02/01 01:10:33 $ -->
+<!-- $Revision: 1.13 $ -->
+<!-- $Date: 2005/02/01 18:43:12 $ -->
 <!-- Copyright (c) 2003-2004 Open Source Applications Foundation -->
 <!-- License: http://osafoundation.org/Chandler_0.1_license_terms.htm -->
 
@@ -60,6 +60,13 @@
             <initialValue type="Boolean" value="False"/>
         </Attribute>
 
+        <Attribute itsName="active">
+            <description value="This attribute indicates whether this share should be synced during a 'sync all' operation." />
+            <type itemref="Boolean"/>
+            <cardinality value="single"/>
+            <initialValue type="Boolean" value="True"/>
+        </Attribute>
+
         <Attribute itsName="contents">
             <type itemref="cm:ItemCollection"/>
             <inverseAttribute itemref="cm:ItemCollection/shares"/>



More information about the Commits mailing list