[Zope3-checkins] CVS: Zope3/src/zope/app/utility - interfaces.py:1.3
Jim Fulton
jim at zope.com
Thu Apr 15 11:29:43 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/utility
In directory cvs.zope.org:/tmp/cvs-serv692/src/zope/app/utility
Modified Files:
interfaces.py
Log Message:
Removed some method from the API.
(Replaced getRegisteredMatching with registration, inherited
from IComponentRegistry.)
=== Zope3/src/zope/app/utility/interfaces.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/utility/interfaces.py:1.2 Sat Mar 13 13:01:23 2004
+++ Zope3/src/zope/app/utility/interfaces.py Thu Apr 15 11:29:42 2004
@@ -20,9 +20,16 @@
from zope.app.registration.interfaces import IComponentRegistration
from zope.app.registration.interfaces import IRegisterable
from zope.app.registration.interfaces import ComponentPath
-from zope.component.interfaces import IUtilityService
+import zope.component.interfaces
from zope.schema import TextLine
+class ILocalUtilityService(
+ zope.component.interfaces.IUtilityService,
+ zope.component.interfaces.IComponentRegistry,
+ ):
+ """Local Utility Service
+ """
+
class IUtilityRegistration(IComponentRegistration):
"""Utility registration object.
@@ -52,8 +59,6 @@
readonly=True,
)
-
-
class ILocalUtility(IRegisterable):
"""Local utility marker.
@@ -65,41 +70,3 @@
IRegistered can be used; otherwise, they must provide
another way to be adaptable to IRegistered.
"""
-
-
-class ILocalUtilityService(IUtilityService):
- """Local utility service interface.
-
- 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.
-
- The return value is an iterable object for which each item
- is a three-element tuple:
-
- - provided interface
-
- - name
-
- - registration stack
-
- One item is present for each registration.
-
- If interface is None, all registered registrations are returned.
- Otherwise, only registrations that provide the given interface
- are returned.
-
- Also, if name is provided and is contained in the name of the
- registered utility, we use that to filter the returned values.
- """
More information about the Zope3-Checkins
mailing list