On Sun, Dec 5, 2010 at 15:20, Jerome Velociter <jerome(a)xwiki.com> wrote:
Hi devs,
This is a buy one, get two proposal.
I propose that first we rename DocumentUpdateEvent and
DocumentSaveEvent to respectively DocumentUpdatedEvent and
DocumentCreatedEvent. Which would be both more clear and would comply
to the naming rules we've agreed on (see
http://xwiki.markmail.org/thread/frzfzookl2lstsfj ). By rename I don't
mean real rename, but deprecation of the old events and creation of
two new ones.
Then I propose we introduce two new events : DocumentCreatingEvent and
DocumentUpdatingEvent, that would be fired before the actual save.
This is a pretty common use case for code that needs to hook on save
to perform any kind of verification/pre-computation/etc. This is the
same idea as the "preverify" method of the legacy notification
mechanism. The events would actually be fired from the same place as
the preverify method in old XWiki.java.
WDYT ?
I'm +1 and if we agree I volunteer to make those changes on 3.0 branch
- and maybe the 2.7 too if we agree we want that too (I do).
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
-0 if you do only that ;)
If you start refactoring theses events it would be a good idea to also:
- move them to bridge module (we can't move them to model module since
theses events still send XWikiContext and XWikiDocument)
- refactor them to be based on references instead of strings
--
Thomas Mortagne