[Zope-CVS] CVS: Products/AdaptableStorage - Zope2FS.py:1.16 Zope2Mapper.py:1.3 Zope2SQL.py:1.7 doc.txt:1.4

Shane Hathaway shane@zope.com
Fri, 3 Jan 2003 17:04:49 -0500


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

Modified Files:
	Zope2FS.py Zope2Mapper.py Zope2SQL.py doc.txt 
Log Message:
Added PropertyManager support.


=== Products/AdaptableStorage/Zope2FS.py 1.15 => 1.16 ===
--- Products/AdaptableStorage/Zope2FS.py:1.15	Tue Dec 31 16:47:44 2002
+++ Products/AdaptableStorage/Zope2FS.py	Fri Jan  3 17:04:14 2003
@@ -20,7 +20,7 @@
 from mapper.public import ObjectGateway
 from mapper_std.public import PathKeychainGenerator
 from gateway_fs.public import FSConnection, FSDirectoryItems, FSAutoId, \
-     FSSectionData, FSClassificationSection, FSFileData
+     FSSectionData, FSClassificationSection, FSFileData, FSProperties
 
 from Zope2Mapper import createZope2Mapper
 
@@ -37,9 +37,12 @@
     root_mapper.getClassifier().setGateway(FSClassificationSection(conn))
     root_mapper.setKeychainGenerator(PathKeychainGenerator())
 
+    properties_gw = FSProperties(conn)
+
     # folder gateway
     g = ObjectGateway()
     g.addGateway('items', FSDirectoryItems(conn))
+    g.addGateway('properties', properties_gw)
     g.addGateway('id', FSAutoId())
     g.addGateway('remainder', FSSectionData(conn, 'remainder'))
     root_mapper.getSubMapper('OFS.Folder.Folder').setGateway(g)
@@ -47,6 +50,7 @@
     # page template gateway
     g = ObjectGateway()
     g.addGateway('text', FSFileData(conn))
+    g.addGateway('properties', properties_gw)
     g.addGateway('id', FSAutoId())
     g.addGateway('remainder', FSSectionData(conn, 'remainder'))
     root_mapper.getSubMapper('ZopePageTemplate').setGateway(g)
@@ -54,6 +58,7 @@
     # file gateway
     g = ObjectGateway()
     g.addGateway('data', FSFileData(conn))
+    g.addGateway('properties', properties_gw)
     g.addGateway('id', FSAutoId())
     g.addGateway('remainder', FSSectionData(conn, 'remainder'))
     root_mapper.getSubMapper('OFS.Image.File').setGateway(g)
@@ -64,6 +69,7 @@
     # anyfolder object gateway
     g = ObjectGateway()
     g.addGateway('items', FSDirectoryItems(conn))
+    g.addGateway('properties', properties_gw)
     g.addGateway('id', FSAutoId())
     g.addGateway('remainder', FSSectionData(conn, 'remainder'))
     root_mapper.getSubMapper('anyfolder').setGateway(g)
@@ -76,6 +82,7 @@
 
     # application gateway
     g = ObjectGateway()
+    g.addGateway('properties', properties_gw)
     g.addGateway('items', FSDirectoryItems(conn))
     g.addGateway('remainder', FSSectionData(conn, 'remainder'))
     root_mapper.getSubMapper('OFS.Application.Application').setGateway(g)


=== Products/AdaptableStorage/Zope2Mapper.py 1.2 => 1.3 ===
--- Products/AdaptableStorage/Zope2Mapper.py:1.2	Tue Dec 31 16:47:44 2002
+++ Products/AdaptableStorage/Zope2Mapper.py	Fri Jan  3 17:04:14 2003
@@ -24,7 +24,7 @@
      AnyObjectSerializer, StringDataAttribute
 from serial_ofs.public \
      import FolderItems, FolderItemsByKeychain, MetaTypeClassifier, \
-     IdAttribute, FilePData
+     IdAttribute, FilePData, OFSProperties
 from zodb.public import RemainingState
 
 
@@ -48,11 +48,14 @@
     else:
         folder_items_aspect = FolderItems()
 
+    properties_aspect = OFSProperties()
+
     # folder mapper
     m = root_mapper.addSubMapper('OFS.Folder.Folder')
     s = ObjectSerializer('OFS.Folder', 'Folder')
     m.setSerializer(s)
     s.addAspect('items', folder_items_aspect)
+    s.addAspect('properties', properties_aspect)
     s.addAspect('id', IdAttribute())
     s.addAspect('remainder', RemainingState())
     classifier.registerDefaultLoader('Folder', 'OFS.Folder.Folder', 1)
@@ -62,6 +65,7 @@
     s = ObjectSerializer('OFS.Image', 'File')
     m.setSerializer(s)
     s.addAspect('id', IdAttribute())
+    s.addAspect('properties', properties_aspect)
     s.addAspect('data', FilePData())
     s.addAspect('remainder', RemainingState())
     classifier.registerDefaultLoader('File', 'OFS.Image.File', 0)
@@ -71,6 +75,7 @@
     s = ObjectSerializer('OFS.Image', 'Image')
     m.setSerializer(s)
     s.addAspect('id', IdAttribute())
+    s.addAspect('properties', properties_aspect)
     s.addAspect('data', FilePData())
     s.addAspect('remainder', RemainingState())
     classifier.register('Image', 'OFS.Image.Image', (
@@ -82,6 +87,7 @@
                          'ZopePageTemplate')
     m.setSerializer(s)
     s.addAspect('text', StringDataAttribute('_text'))
+    s.addAspect('properties', properties_aspect)
     s.addAspect('id', IdAttribute())
     s.addAspect('remainder', RemainingState())
     classifier.register('Page Template', 'ZopePageTemplate', (
@@ -92,6 +98,7 @@
     s = AnyObjectSerializer()
     m.setSerializer(s)
     s.addAspect('items', folder_items_aspect)
+    s.addAspect('properties', properties_aspect)
     s.addAspect('id', IdAttribute())
     s.addAspect('remainder', RemainingState())
     classifier.registerDefaultStorage('(folderish object)', 'anyfolder', 1)
@@ -108,6 +115,7 @@
     m = root_mapper.addSubMapper('OFS.Application.Application')
     s = ObjectSerializer('OFS.Application', 'Application')
     m.setSerializer(s)
+    s.addAspect('properties', properties_aspect)
     s.addAspect('items', folder_items_aspect)
     s.addAspect('remainder', RemainingState())
     classifier.registerKey(


=== Products/AdaptableStorage/Zope2SQL.py 1.6 => 1.7 ===
--- Products/AdaptableStorage/Zope2SQL.py:1.6	Tue Dec 31 16:47:44 2002
+++ Products/AdaptableStorage/Zope2SQL.py	Fri Jan  3 17:04:14 2003
@@ -20,7 +20,7 @@
 from mapper.public import ObjectGateway
 from gateway_sql.public import PsycopgConnection, SQLClassification, \
      SQLFolderItems, SQLItemId, SQLKeychainGenerator, SQLObjectData, \
-     SQLRemainder
+     SQLProperties, SQLRemainder
 
 from Zope2Mapper import createZope2Mapper
 
@@ -37,14 +37,16 @@
     folder_items_gw = SQLFolderItems(conn)
     item_id_gw = SQLItemId(conn)
     remainder_gw = SQLRemainder(conn)
-    classification_gw = SQLClassification(conn)
     file_data_gw = SQLObjectData(conn)
+    properties_gw = SQLProperties(conn)
+    classification_gw = SQLClassification(conn)
     keychain_gen = SQLKeychainGenerator(conn)
     gws = (
         folder_items_gw,
         item_id_gw,
         remainder_gw,
         file_data_gw,
+        properties_gw,
         classification_gw,
         keychain_gen,
         )
@@ -52,6 +54,7 @@
     # folder gateway
     g = ObjectGateway()
     g.addGateway('items', folder_items_gw)
+    g.addGateway('properties', properties_gw)
     g.addGateway('id', item_id_gw)
     g.addGateway('remainder', remainder_gw)
     root_mapper.getSubMapper('OFS.Folder.Folder').setGateway(g)
@@ -59,6 +62,7 @@
     # page template gateway
     g = ObjectGateway()
     g.addGateway('text', file_data_gw)
+    g.addGateway('properties', properties_gw)
     g.addGateway('id', item_id_gw)
     g.addGateway('remainder', remainder_gw)
     root_mapper.getSubMapper('ZopePageTemplate').setGateway(g)
@@ -66,6 +70,7 @@
     # file gateway
     g = ObjectGateway()
     g.addGateway('data', file_data_gw)
+    g.addGateway('properties', properties_gw)
     g.addGateway('id', item_id_gw)
     g.addGateway('remainder', remainder_gw)
     root_mapper.getSubMapper('OFS.Image.File').setGateway(g)
@@ -76,6 +81,7 @@
     # anyfolder object gateway
     g = ObjectGateway()
     g.addGateway('items', folder_items_gw)
+    g.addGateway('properties', properties_gw)
     g.addGateway('id', item_id_gw)
     g.addGateway('remainder', remainder_gw)
     root_mapper.getSubMapper('anyfolder').setGateway(g)
@@ -89,6 +95,7 @@
     # application gateway
     g = ObjectGateway()
     g.addGateway('items', folder_items_gw)
+    g.addGateway('properties', properties_gw)
     g.addGateway('remainder', remainder_gw)
     root_mapper.getSubMapper('OFS.Application.Application').setGateway(g)
 


=== Products/AdaptableStorage/doc.txt 1.3 => 1.4 ===
--- Products/AdaptableStorage/doc.txt:1.3	Tue Dec 31 16:47:44 2002
+++ Products/AdaptableStorage/doc.txt	Fri Jan  3 17:04:14 2003
@@ -58,13 +58,13 @@
 dbtab.conf entries:
 
 
-[Storage: FS]
+[Storage: SQL]
 type=ASStorage
 factory=Products.AdaptableStorage.Zope2SQL.createMapper
 params=
 volatile=1
 
-[Database: FS]
+[Database: SQL]
 class=ASDB
 cache_size=4000
 mount_paths=/sql