Log message for revision 67162: add adapter() declarations so that these are easier to register
Changed: U Zope/branches/philikon-local-components/lib/python/OFS/subscribers.py -=- Modified: Zope/branches/philikon-local-components/lib/python/OFS/subscribers.py =================================================================== --- Zope/branches/philikon-local-components/lib/python/OFS/subscribers.py 2006-04-19 17:51:30 UTC (rev 67161) +++ Zope/branches/philikon-local-components/lib/python/OFS/subscribers.py 2006-04-19 18:04:21 UTC (rev 67162) @@ -21,18 +21,18 @@ import sys from logging import getLogger +import OFS.interfaces from Acquisition import aq_base from App.config import getConfiguration from AccessControl import getSecurityManager from ZODB.POSException import ConflictError -import OFS.interfaces -from zope.interface import implements -from zope.component import adapts -from zope.location.interfaces import ISublocations +import zope.component +import zope.interface +import zope.location.interfaces from zope.app.container.contained import dispatchToSublocations +from zope.app.container.interfaces import IObjectMovedEvent - deprecatedManageAddDeleteClasses = [] LOG = getLogger('OFS.subscribers') @@ -79,8 +79,8 @@ class ObjectManagerSublocations(object): """Get the sublocations for an ObjectManager. """ - adapts(OFS.interfaces.IObjectManager) - implements(ISublocations) + zope.component.adapts(OFS.interfaces.IObjectManager) + zope.interface.implements(zope.location.interfaces.ISublocations) def __init__(self, container): self.container = container @@ -99,6 +99,8 @@ # could have a simple subscriber for IObjectManager that directly calls # dispatchToSublocations. [EMAIL PROTECTED](OFS.interfaces.IItem, + OFS.interfaces.IObjectWillBeMovedEvent) def dispatchObjectWillBeMovedEvent(ob, event): """Multi-subscriber for IItem + IObjectWillBeMovedEvent. """ @@ -108,6 +110,7 @@ # Next, do the manage_beforeDelete dance callManageBeforeDelete(ob, event.object, event.oldParent) [EMAIL PROTECTED](OFS.interfaces.IItem, IObjectMovedEvent) def dispatchObjectMovedEvent(ob, event): """Multi-subscriber for IItem + IObjectMovedEvent. """ @@ -117,6 +120,8 @@ if OFS.interfaces.IObjectManager.providedBy(ob): dispatchToSublocations(ob, event) [EMAIL PROTECTED](OFS.interfaces.IItem, + OFS.interfaces.IObjectClonedEvent) def dispatchObjectClonedEvent(ob, event): """Multi-subscriber for IItem + IObjectClonedEvent. """ _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins