[Zope3-checkins] CVS: Zope3/src/zope/app/registration -
interfaces.py:1.6
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sat Apr 17 10:33:27 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/registration
In directory cvs.zope.org:/tmp/cvs-serv16842/src/zope/app/registration
Modified Files:
interfaces.py
Log Message:
Expanded local registry registrations() to
registrations(localOnly=False). When localOnly is set to True, show only
registrations made in this service.
=== Zope3/src/zope/app/registration/interfaces.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/registration/interfaces.py:1.5 Thu Apr 8 17:02:39 2004
+++ Zope3/src/zope/app/registration/interfaces.py Sat Apr 17 10:33:26 2004
@@ -26,6 +26,7 @@
from zope.schema.interfaces import ITextLine
from zope.app.container.constraints import ItemTypePrecondition
from zope.app.container.constraints import ContainerTypesConstraint
+import zope.component.interfaces
UnregisteredStatus = _('Unregistered')
RegisteredStatus = _('Registered')
@@ -226,8 +227,18 @@
"""The registry is true iff it has no registrations."""
-class IRegistry(Interface):
+class IRegistry(zope.component.interfaces.IRegistry):
"""A component that can be configured using a registration manager."""
+
+ def registrations(localOnly=False):
+ """Returns a list of all registrations.
+
+ This method returns a complete list of Registration objects, which can
+ be used for 'queryRegistrationFor()', for example. Usually this method
+ will return registrations from all accessible registries of the same
+ kind, but if 'localOnly' is set to true only registrations defined in
+ this registry will be returned.
+ """
def queryRegistrationsFor(registration, default=None):
"""Return an IRegistrationStack for the registration.
More information about the Zope3-Checkins
mailing list