[Zope3-checkins] CVS: Zope3/src/zope/app/services - adapter.py:1.5

Albertas Agejevas alga@codeworks.lt
Wed, 15 Jan 2003 11:24:33 -0500


Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv27247/zope/app/services

Modified Files:
	adapter.py 
Log Message:
Added named adapter support in AdapterService.


=== Zope3/src/zope/app/services/adapter.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/services/adapter.py:1.4	Wed Jan 15 10:15:19 2003
+++ Zope3/src/zope/app/services/adapter.py	Wed Jan 15 11:24:00 2003
@@ -50,16 +50,17 @@
         "See IConfigurable"
         # XXX Need to add named adapter support
         return self.queryConfigurations(
-            configuration.forInterface, configuration.providedInterface, '',
+            configuration.forInterface, configuration.providedInterface,
+            configuration.adapterName,
             default)
 
     queryConfigurationsFor = ContextMethod(queryConfigurationsFor)
 
     def queryConfigurations(self,
-                            forInterface, providedInterface, name,
+                            forInterface, providedInterface, adapterName,
                             default=None):
 
-        adapters = self._byName.get(name)
+        adapters = self._byName.get(adapterName)
         if adapters is None:
             return default
 
@@ -75,7 +76,8 @@
         "See IConfigurable"
         # XXX Need to add named adapter support
         return self.createConfigurations(
-            configuration.forInterface, configuration.providedInterface, '')
+            configuration.forInterface, configuration.providedInterface,
+            configuration.adapterName)
 
     createConfigurationsFor = ContextMethod(createConfigurationsFor)