[Zope3-checkins] CVS: Zope3/src/zope/app/tests - setup.py:1.5
Jim Fulton
jim@zope.com
Sat, 21 Jun 2003 17:22:46 -0400
Update of /cvs-repository/Zope3/src/zope/app/tests
In directory cvs.zope.org:/tmp/cvs-serv2745/src/zope/app/tests
Modified Files:
setup.py
Log Message:
Major refactoring to reflect change in terminology from
"configuration" to "registration" to refer to the configuration of how
objects are used (as opposed to their internal configuration).
=== Zope3/src/zope/app/tests/setup.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/tests/setup.py:1.4 Thu Jun 12 14:48:02 2003
+++ Zope3/src/zope/app/tests/setup.py Sat Jun 21 17:22:15 2003
@@ -72,14 +72,13 @@
SiteAbsoluteURL)
#------------------------------------------------------------------------
-# Use configuration
-from zope.app.interfaces.services.configuration \
- import IAttributeUseConfigurable
-from zope.app.interfaces.services.configuration import IUseConfiguration
-from zope.app.services.configuration import UseConfiguration
-def setUpUseConfiguration():
- provideAdapter(IAttributeUseConfigurable, IUseConfiguration,
- UseConfiguration)
+# Use registration
+from zope.app.interfaces.services.registration import IAttributeRegisterable
+from zope.app.interfaces.services.registration import IRegistered
+from zope.app.services.registration import Registered
+def setUpRegistered():
+ provideAdapter(IAttributeRegisterable, IRegistered,
+ Registered)
#------------------------------------------------------------------------
@@ -93,7 +92,7 @@
setUpAnnotations()
setUpDependable()
setUpTraversal()
- setUpUseConfiguration()
+ setUpRegistered()
if site:
site = RootFolder()
@@ -138,8 +137,8 @@
return zapi.traverse(folder, "++etc++site")
-from zope.app.services.service import ServiceConfiguration
-from zope.app.interfaces.services.configuration import Active
+from zope.app.services.service import ServiceRegistration
+from zope.app.interfaces.services.registration import ActiveStatus
def addService(servicemanager, name, service, suffix=''):
"""Add a service to a service manager
@@ -148,9 +147,9 @@
default = zapi.traverse(servicemanager, 'default')
default.setObject(name+suffix, service)
path = "%s/default/%s" % (zapi.getPath(servicemanager), name+suffix)
- configuration = ServiceConfiguration(name, path, servicemanager)
- key = default.getConfigurationManager().setObject("", configuration)
- zapi.traverse(default.getConfigurationManager(), key).status = Active
+ registration = ServiceRegistration(name, path, servicemanager)
+ key = default.getRegistrationManager().setObject("", registration)
+ zapi.traverse(default.getRegistrationManager(), key).status = ActiveStatus
return zapi.traverse(servicemanager, path)