Commit bd5d46bb authored by Jim Fulton's avatar Jim Fulton

Removed ZODB's setClassFactory method. Rather set the classFactory

attribute on databases.
parent dc669148
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
############################################################################## ##############################################################################
"""Available ZODB class factories. """Available ZODB class factories.
$Id: ClassFactories.py,v 1.1 2003/07/20 02:55:58 chrism Exp $""" $Id: ClassFactories.py,v 1.2 2004/03/04 22:43:06 jim Exp $"""
import OFS.Uninstalled import OFS.Uninstalled
...@@ -78,7 +78,7 @@ def autoClassFactory(jar, module, name): ...@@ -78,7 +78,7 @@ def autoClassFactory(jar, module, name):
root_conn = getattr(jar, '_root_connection', None) root_conn = getattr(jar, '_root_connection', None)
root_db = getattr(root_conn, '_db', None) root_db = getattr(root_conn, '_db', None)
if root_db is not None: if root_db is not None:
return root_db._classFactory(root_conn, module, name) return root_db.classFactory(root_conn, module, name)
else: else:
return zopeClassFactory(jar, module, name) return zopeClassFactory(jar, module, name)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
############################################################################## ##############################################################################
"""DBTab mount point (stored in ZODB). """DBTab mount point (stored in ZODB).
$Id: MountedObject.py,v 1.3 2004/02/25 18:29:58 jeremy Exp $ $Id: MountedObject.py,v 1.4 2004/03/04 22:43:06 jim Exp $
""" """
import os import os
...@@ -98,7 +98,7 @@ class CustomTrailblazer (SimpleTrailblazer): ...@@ -98,7 +98,7 @@ class CustomTrailblazer (SimpleTrailblazer):
def _construct(self, context, id): def _construct(self, context, id):
"""Creates and returns the named object.""" """Creates and returns the named object."""
jar = self.base._p_jar jar = self.base._p_jar
klass = jar.db()._classFactory(jar, self.module_name, self.class_name) klass = jar.db().classFactory(jar, self.module_name, self.class_name)
obj = klass(id) obj = klass(id)
obj._setId(id) obj._setId(id)
context._setObject(id, obj) context._setObject(id, obj)
......
...@@ -76,7 +76,7 @@ def startup(): ...@@ -76,7 +76,7 @@ def startup():
Globals.opened.append(DB) Globals.opened.append(DB)
import ClassFactory import ClassFactory
DB.setClassFactory(ClassFactory.ClassFactory) DB.classFactory = ClassFactory.ClassFactory
# "Log on" as system user # "Log on" as system user
newSecurityManager(None, AccessControl.User.system) newSecurityManager(None, AccessControl.User.system)
......
...@@ -174,7 +174,7 @@ class ZopeDatabase(ZODBDatabase): ...@@ -174,7 +174,7 @@ class ZopeDatabase(ZODBDatabase):
# set the connection class # set the connection class
DB.klass = self.config.connection_class DB.klass = self.config.connection_class
if self.config.class_factory is not None: if self.config.class_factory is not None:
DB.setClassFactory(self.config.class_factory) DB.classFactory = self.config.class_factory
from ZODB.ActivityMonitor import ActivityMonitor from ZODB.ActivityMonitor import ActivityMonitor
DB.setActivityMonitor(ActivityMonitor()) DB.setActivityMonitor(ActivityMonitor())
return DB return DB
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment