[Zope-CMF] opaque items, events
Florent Guillaume
fg at nuxeo.com
Mon Dec 6 16:59:50 EST 2004
Hi Kapil,
On 6 Dec 2004, at 22:21, Kapil Thangavelu wrote:
> On Mon, 2004-12-06 at 18:16 +0100, Florent Guillaume wrote:
>> We really need to add events to Zope 2 or CMF. Zope 3 couldn't live
>> without them, CPS couldn't live without them. Many many ugliness, such
>> as this explicit manage_after* and business, goes away when they are
>> available.
>>
>> Currently CPS monkey-patches Zope and CMF to publish events on object
>> creation/destruction/clone. Could we add these simple hooks before the
>> rest of the framework is in place ?
>
> so there are two thingies needed. an event framework an integration of
> the event framework within objectmanager core and cmf tools.
>
> for event framework, tres suggested the interfaces and default
> implementation of the Event product in zc cvs. does that sound okay?
I think so, I haven't yet looked at them in detail but I trust Tres on
a sound framework.
> for the framework integration.. what sort of hooks do you need? do you
> have a url to cps monkeypatches ?
CPS's monkeypatches are in
http://cvs.nuxeo.org/cgi-bin/viewcvs.cgi/CPS3/CPSCore/
EventServicePatches.py?rev=HEAD&content-type=text/vnd.viewcvs-markup
The methods that need to send events are:
manage_afterAdd
manage_beforeDelete (both in various classes)
move_object_to_position (would be moveObjectsByDelta for straight
Zope)
manage_renameObject
manage_pasteObjects
manage_clone
We'll need to standardize the different kinds events that are sent,
that's actually the most subtle part of all this. You want an event
when a "zope" object is set in its container, but you also want an
event when it is fully CMFized.
Actually you want to refactor everything in terms of events once you
have them. manage_afterAdd & co should be called by a global event
listener. CMF cataloging, workflow insertion, etc, can all be
event-driven. Workflow transitions (scripts, security settings) too...
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope-CMF
mailing list