[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - utility.py:1.10

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Aug 19 20:11:37 EDT 2003


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

Modified Files:
	utility.py 
Log Message:
Cleaned up the recent code significantly now that I understand the local
utility service better. Using registeredMatching() was just not the right
method to use. 

Added a new method called getLocalUtitliesFor() so that it is easier to 
grab the locally defined utilities only.


=== Zope3/src/zope/app/interfaces/services/utility.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/interfaces/services/utility.py:1.9	Thu Aug  7 20:14:41 2003
+++ Zope3/src/zope/app/interfaces/services/utility.py	Tue Aug 19 19:11:02 2003
@@ -73,6 +73,15 @@
     Methods which must be implemented by a local utility service to
     allow views to retrieve sufficient information from the service.
     """
+    
+    def getLocalUtilitiesFor(interface):
+        """Returns all active (registered is not enough) utilities that are
+        directly registered with this utility service.
+
+        An empty list is returned, if no local utilities for this interface
+        were found. If the interface is None, all utilities will be retruned.
+        """ 
+
     def getRegisteredMatching(interface=None, name=None):
         """Return the registered utilities.
 




More information about the Zope3-Checkins mailing list