Hi,

Events for document creation and document update have been changed.

The event source used to be a Document, and should be a DocumentModel (for various reasons): please remember that when adding new events, and design new event listeners so that they can be switched easily to use a document model instead of a document.

As lots of event listeners are already implemented and wait for a Document instance, a compatibility mechanism has been put in place: the document model context data still holds the document in case existing listeners need it. When sending events to listeners, the event service checks if the source is a document model. If listener does not follow the DocumentModelEventListener interface, it tries to replace the source by the document, fetching it from the document model context data.

This is part of the well numbered http://jira.nuxeo.org/browse/NXP-666 issue: change events to manage DocumentModel instances instead of Document instances. If you'd like to switch an event or an event listener to deal with a document model, please follow instructions given in comments.

Regards,

--
Anahide Tchertchian, Nuxeo
Mail: [EMAIL PROTECTED] - Tel: +33 (0)1 40 33 79 87
http://www.nuxeo.com - http://www.nuxeo.org
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to