[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services -
registration.py:1.15
Jim Fulton
jim at zope.com
Thu Feb 5 23:13:36 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/interfaces/services
In directory cvs.zope.org:/tmp/cvs-serv7633/src/zope/app/interfaces/services
Modified Files:
registration.py
Log Message:
Fixed the __parent__ constraint for IRegisterable. Registerables need
to be in registration management containers, not registration managers.
=== Zope3/src/zope/app/interfaces/services/registration.py 1.14 => 1.15 ===
--- Zope3/src/zope/app/interfaces/services/registration.py:1.14 Thu Dec 18 04:57:12 2003
+++ Zope3/src/zope/app/interfaces/services/registration.py Thu Feb 5 23:13:36 2004
@@ -366,62 +366,6 @@
def __setitem__(name, object):
"""Add to object"""
-class IRegisterable(IAnnotatable, IContained):
- """A marker interface."""
-
- __parent__ = Field(
- constraint = ContainerTypesConstraint(IRegistrationManager))
-
-IRegistrationManager['__setitem__'].setTaggedValue(
- 'precondition', ItemTypePrecondition(IRegisterable))
-
-
-class IRegistered(Interface):
- """An object that can keep track of its configured uses.
-
- The object need not implement this functionality itself, but must at
- least support doing so via an adapter.
- """
-
- def addUsage(location):
- """Add a usage by location.
-
- The location is the physical path to the registration object that
- configures the usage.
- """
- def removeUsage(location):
- """Remove a usage by location.
-
- The location is the physical path to the registration object that
- configures the usage.
- """
- def usages():
- """Return a sequence of locations.
-
- A location is a physical path to a registration object that
- configures a usage.
- """
-
- def registrations():
- """Return a sequence of registration objects for this object."""
-
-class IAttributeRegisterable(IAttributeAnnotatable, IRegisterable):
- """A marker interface."""
-
-class INoRegistrationManagerError(Interface):
- """No registration manager error
- """
-
-class NoRegistrationManagerError(Exception):
- """No registration manager
-
- There is no registration manager in a site-management folder, or
- an operation would result in no registration manager in a
- site-management folder.
-
- """
- implements(INoRegistrationManagerError)
-
class IRegistrationManagerContainer(IContainer):
"""Containers with registration managers
@@ -478,6 +422,62 @@
name.
"""
+
+class IRegisterable(IAnnotatable, IContained):
+ """A marker interface."""
+
+ __parent__ = Field(
+ constraint = ContainerTypesConstraint(IRegistrationManagerContainer))
+
+IRegistrationManager['__setitem__'].setTaggedValue(
+ 'precondition', ItemTypePrecondition(IRegisterable))
+
+
+class IRegistered(Interface):
+ """An object that can keep track of its configured uses.
+
+ The object need not implement this functionality itself, but must at
+ least support doing so via an adapter.
+ """
+
+ def addUsage(location):
+ """Add a usage by location.
+
+ The location is the physical path to the registration object that
+ configures the usage.
+ """
+ def removeUsage(location):
+ """Remove a usage by location.
+
+ The location is the physical path to the registration object that
+ configures the usage.
+ """
+ def usages():
+ """Return a sequence of locations.
+
+ A location is a physical path to a registration object that
+ configures a usage.
+ """
+
+ def registrations():
+ """Return a sequence of registration objects for this object."""
+
+class IAttributeRegisterable(IAttributeAnnotatable, IRegisterable):
+ """A marker interface."""
+
+class INoRegistrationManagerError(Interface):
+ """No registration manager error
+ """
+
+class NoRegistrationManagerError(Exception):
+ """No registration manager
+
+ There is no registration manager in a site-management folder, or
+ an operation would result in no registration manager in a
+ site-management folder.
+
+ """
+ implements(INoRegistrationManagerError)
More information about the Zope3-Checkins
mailing list