[Zope3-checkins] CVS: Zope3/src/zope/app - copypastemove.py:1.2
Guido van Rossum
guido@python.org
Wed, 26 Feb 2003 11:12:05 -0500
Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv30716/src/zope/app
Modified Files:
copypastemove.py
Log Message:
Rename manage_afterAdd and manage_beforeDelete to afterAddHook and
beforeDeleteHook. Patch contributed by Christian Heimes.
=== Zope3/src/zope/app/copypastemove.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/copypastemove.py:1.1 Mon Feb 17 10:10:38 2003
+++ Zope3/src/zope/app/copypastemove.py Wed Feb 26 11:11:35 2003
@@ -62,22 +62,22 @@
source_path = physicalsource.getPhysicalPath()
if queryAdapter(obj, IMoveNotifiable):
- getAdapter(obj, IMoveNotifiable).manage_beforeDelete(obj, container, \
+ getAdapter(obj, IMoveNotifiable).beforeDeleteHook(obj, container, \
movingTo=target_path)
elif queryAdapter(obj, IDeleteNotifiable):
- getAdapter(obj, IDeleteNotifiable).manage_beforeDelete(obj, container)
+ getAdapter(obj, IDeleteNotifiable).beforeDeleteHook(obj, container)
new_obj = movesource.removeObject(orig_name, target)
pastetarget = getAdapter(target, IPasteTarget)
# publish an ObjectCreatedEvent (perhaps...?)
new_name = pastetarget.pasteObject(name,new_obj)
- # call manage_afterAdd hook
+ # call afterAddHook
if queryAdapter(new_obj, IMoveNotifiable):
- getAdapter(new_obj, IMoveNotifiable).manage_afterAdd(new_obj, container, \
+ getAdapter(new_obj, IMoveNotifiable).afterAddHook(new_obj, container, \
movedFrom=source_path)
elif queryAdapter(new_obj, IAddNotifiable):
- getAdapter(new_obj, IAddNotifiable).manage_afterAdd(new_obj, container)
+ getAdapter(new_obj, IAddNotifiable).afterAddHook(new_obj, container)
# publish ObjectMovedEvent
publish(container, ObjectMovedEvent(container, source_path, target_path))
@@ -136,12 +136,12 @@
# publish an ObjectCreatedEvent (perhaps...?)
new_name = pastetarget.pasteObject(name, obj)
- # call manage_afterAdd hook
+ # call afterAddHook
if queryAdapter(obj, ICopyNotifiable):
- getAdapter(obj, ICopyNotifiable).manage_afterAdd(obj, container, \
+ getAdapter(obj, ICopyNotifiable).afterAddHook(obj, container, \
copiedFrom=source_path)
elif queryAdapter(obj, IAddNotifiable):
- getAdapter(obj, IAddNotifiable).manage_afterAdd(obj, container)
+ getAdapter(obj, IAddNotifiable).afterAddHook(obj, container)
# publish ObjectCopiedEvent
publish(container, ObjectCopiedEvent(container, source_path, target_path))