[Zope-CVS] CVS: Products/AdaptableStorage - Zope2FS.py:1.8

Shane Hathaway shane@zope.com
Mon, 9 Dec 2002 13:25:58 -0500


Update of /cvs-repository/Products/AdaptableStorage
In directory cvs.zope.org:/tmp/cvs-serv24698

Modified Files:
	Zope2FS.py 
Log Message:
More sanitization and documentation:

- Renamed RecordSchema to FieldSchema and made the simpler schema classes
  usable.  This removed the need to always work with record sets when all
  that is needed is a single value.

- Finally successfully abstracted away keychain generation.  Now gateways
  and serializers don't have to duplicate logic.

- Renamed IEventBase to IMapperEvent, created a derivative IAspectEvent, and
  moved some of the methods of IMapperEvent to IAspectEvent.
  ISerializationEvent and IDeserializationEvent now derive from IAspectEvent.

- Changed IGateways to expect IMapperEvents instead of a (mapper, keychain)
  pair.



=== Products/AdaptableStorage/Zope2FS.py 1.7 => 1.8 ===
--- Products/AdaptableStorage/Zope2FS.py:1.7	Mon Dec  9 10:57:23 2002
+++ Products/AdaptableStorage/Zope2FS.py	Mon Dec  9 13:25:27 2002
@@ -21,7 +21,7 @@
      import ObjectSerializer, ObjectGateway, ObjectMapper
 from serial_std.public \
      import RollCall, FixedPersistentMapping, IgnoredAttribute, \
-     RemainingState
+     RemainingState, PathKeychainGenerator
 from serial_ofs.public import FolderItems, MetaTypeClassifier, IdAttribute
 from gateway_fs.public import FSConnection, FSDirectoryItems, FSAutoId, \
      FSSectionData, FSClassificationSection
@@ -86,7 +86,9 @@
     classifier = MetaTypeClassifier(FSClassificationSection(fs_conn))
     classifier.registerDefaultLoader('Folder', 'OFS/Folder', 1)
     classifier.registerKey('Application', 'OFS/Application', '/')
-    rm = ObjectMapper(None, root_serializer, root_gateway, classifier)
+    keychain_gen = PathKeychainGenerator()
+    rm = ObjectMapper(
+        None, root_serializer, root_gateway, classifier, keychain_gen)
     for name in s_keys:
         mapper = ObjectMapper(rm, object_serializers[name],
                               object_gateways[name], volatile=volatile)