[Checkins] SVN: zopyx.versioning/trunk/zopyx/versioning/interfaces.py updated
Andreas Jung
andreas at andreas-jung.com
Sun Jun 27 05:49:17 EDT 2010
Log message for revision 113916:
updated
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-06-27 09:43:14 UTC (rev 113915)
+++ zopyx.versioning/trunk/zopyx/versioning/interfaces.py 2010-06-27 09:49:17 UTC (rev 113916)
@@ -1,3 +1,8 @@
+"""
+Interfaces related to the versioning API
+"""
+
+
from zope.interface import Interface
@@ -2,13 +7,22 @@
class IVersionSupport(Interface):
+ """ API for retrieving data to be versioned from an object
+ and restoring a previous state of an object.
+ The data format is JSON.
+ Objects must provide their unique ID through the 'id' field.
+
+ This API applies to single objects only
+ (no support for object collections).
+ """
+
def getVersionableData():
- """ Return versionable data """
+ """ Return versionable data (in JSON format) """
def restoreFromVersion(version_data):
- """ Restore object based on 'version_data' """
+ """ Restore object based on 'version_data' (JSON format) """
class IVersionStorage(Interface):
- def store(id, version_data):
+ def store(id, version_data, creator_id, comment):
""" Store 'version_data' for a given 'id'.
@@ -20,7 +34,16 @@
def retrieve(id, revision):
""" Return 'version_data' for a given 'id' and 'revision' """
- def list_versions(id):
- """ Return all versions stored for a particular
+ def has_revision(id, revision):
+ """ Check if there is a revison 'revision' for a given object 'id' """
+
+ def remove_revision(id, revision):
+ """ Remove a particular 'revision' for a given object 'id' """
+
+ def remove_all(id):
+ """ Remove all revisions for a given object 'id' """
+
+ def list_revisions(id):
+ """ Return all revisions stored for a particular
content piece by its 'id'.
"""
More information about the checkins
mailing list