[Checkins] SVN: zopyx.versioning/trunk/zopyx/versioning/interfaces.py extended store() API for collections
Andreas Jung
andreas at andreas-jung.com
Mon Jul 5 04:49:27 EDT 2010
Log message for revision 114193:
extended store() API for collections
Changed:
U zopyx.versioning/trunk/zopyx/versioning/interfaces.py
-=-
Modified: zopyx.versioning/trunk/zopyx/versioning/interfaces.py
===================================================================
--- zopyx.versioning/trunk/zopyx/versioning/interfaces.py 2010-07-05 06:45:26 UTC (rev 114192)
+++ zopyx.versioning/trunk/zopyx/versioning/interfaces.py 2010-07-05 08:49:27 UTC (rev 114193)
@@ -5,7 +5,7 @@
################################################################
-"""
+"""
Interfaces related to the versioning API
"""
@@ -47,22 +47,27 @@
"""
class IVersionID(Interface):
-
+
def getID():
""" Return a unique and stable ID for the object to be versioned """
class IVersionStorage(Interface):
- def store(id, version_data, revision_metadata):
+ def store(id, version_data, revision_metadata, collection_content=[]):
""" Store 'version_data' for a given 'id'. 'version_data' holds the
data to be versioned (JSON format). 'revision_metadata' holds
application-specific metadata for the particular version (e.g.
revision date, creator uid, "revision is a major/minor
revision) (JSON format).
+ If 'collection_content' is used then we assume that we version
+ a collection of objects where the versioned objects are given
+ as a list of tuples (object_id, object_revision).
+
Returns revision number.
"""
+
def retrieve(id, revision):
""" Return 'version_data' for a given 'id' and 'revision' """
@@ -83,10 +88,8 @@
a particular content piece by its 'id'.
"""
-
class IVersioning(Interface):
def getStorage(dsn):
""" Provide access to a version storage based on a DSN """
-
More information about the checkins
mailing list