[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/versioncontrol/nonversioned.py
Removed dead code.
Florent Guillaume
fg at nuxeo.com
Fri Jun 24 13:20:01 EDT 2005
Log message for revision 30911:
Removed dead code.
Changed:
U Zope3/trunk/src/zope/app/versioncontrol/nonversioned.py
-=-
Modified: Zope3/trunk/src/zope/app/versioncontrol/nonversioned.py
===================================================================
--- Zope3/trunk/src/zope/app/versioncontrol/nonversioned.py 2005-06-24 17:07:08 UTC (rev 30910)
+++ Zope3/trunk/src/zope/app/versioncontrol/nonversioned.py 2005-06-24 17:20:01 UTC (rev 30911)
@@ -84,49 +84,3 @@
for attr in self.attrs:
if data.has_key(attr):
setattr(self.obj, attr, data[attr])
-
-
-class ObjectManagerNonVersionedDataAdapter(StandardNonVersionedDataAdapter):
- """Non-versioned data adapter for object managers.
- """
- zope.interface.implements(INonVersionedData)
-
- def listNonVersionedObjects(self):
- contents = self.getNonVersionedData()['contents']
- return contents.values()
-
- def removeNonVersionedData(self):
- StandardNonVersionedDataAdapter.removeNonVersionedData(self)
- obj = self.obj
- removed = {}
- contents = self.getNonVersionedData()['contents']
- for name, value in contents.items():
- obj._delOb(name)
- removed[name] = 1
- if obj._objects:
- obj._objects = tuple([info for info in obj._objects
- if not removed.has_key(info['id'])])
-
- def getNonVersionedData(self):
- contents = {}
- attributes = StandardNonVersionedDataAdapter.getNonVersionedData(self)
- for name, value in self.obj.objectItems():
- if not isAVersionableResource(value):
- # This object should include the state of subobjects
- # that won't be versioned independently.
- continue
- if isProxyOrReference is not None:
- if isProxyOrReference(value):
- # This object should include the state of
- # subobjects that are references.
- continue
- contents[name] = value
- return {'contents': contents, 'attributes': attributes}
-
- def restoreNonVersionedData(self, data):
- StandardNonVersionedDataAdapter.restoreNonVersionedData(
- self, data['attributes'])
- # Restore the items of the container if not already present:
- for name, value in data['contents'].items():
- if name not in obj:
- obj[name] = value
More information about the Zope3-Checkins
mailing list