[Zope-Checkins] CVS: Zope3/lib/python/Zope/ComponentArchitecture - GlobalAdapterService.py:1.4.8.1
Sushant Kumar Rath
srath@zeomega.com
Fri, 1 Nov 2002 05:53:10 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/ComponentArchitecture
In directory cvs.zope.org:/tmp/cvs-serv10865
Modified Files:
Tag: Zope3-Bangalore-TTW-Branch
GlobalAdapterService.py
Log Message:
getRegisteredMatching is added to get all the globally registered adapters.
=== Zope3/lib/python/Zope/ComponentArchitecture/GlobalAdapterService.py 1.4 => 1.4.8.1 ===
--- Zope3/lib/python/Zope/ComponentArchitecture/GlobalAdapterService.py:1.4 Thu Aug 1 14:42:17 2002
+++ Zope3/lib/python/Zope/ComponentArchitecture/GlobalAdapterService.py Fri Nov 1 05:53:10 2002
@@ -34,6 +34,9 @@
maker -- a callable object that gets an adapter component for
a context component.
+ """
+ def getRegisteredMatching(for_interface=None, provide_interface=None):
+ """To get all the globally registered adapters.
"""
class GlobalAdapterService:
@@ -63,8 +66,9 @@
if result is None:
raise ComponentLookupError(object, interface)
- return result
-
+ return result
+
+
def queryAdapter(self, object, interface, default=None):
"""see IAdapterService interface"""
if interface.isImplementedBy(object):
@@ -79,7 +83,17 @@
for maker in makers:
result = maker(result)
- return result
+ return result
+
+ def getRegisteredMatching(self, for_interface=None,
+ provide_interface=None):
+
+ return self.__adapters.getRegisteredMatching(for_interface,
+ provide_interface)
+
+
+
+
_clear = __init__