On Tue, Apr 17, 2012 at 10:49 AM, Vincent Massol <[email protected]> wrote:

>
> On Apr 14, 2012, at 12:13 AM, Eduard Moraru wrote:
>
> > On Fri, Apr 13, 2012 at 6:47 PM, Paul Libbrecht <[email protected]>
> wrote:
> >
> >> Vincent,
> >>
> >> on IRC you had suggested me to use such an event.
> >> I couldn't find it.
> >> Is there an overview of such events?
> >>
> >
> > That would indeed be a valueable piece of lore, specially for (but not
> > limited to) newcomers.
>
> Eddy, there's an overview, it's at:
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module
>

Not talking about that.


>
> What's missing IMO is that each Module needs to document what Events it
> creates and thus what event can be consumed by others. It's up to each
> module to document that.
>
> For example the Model module should document all the model events
> (add/update/delete for all Entities). Right now we have 2 model modules:
> xwiki-platform-oldcore and xwiki-platform-model.
> Right now we have
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Model+Module and we
> could either add doc for the oldcore there too or (better) create an
> oldcore module on e.x.o.
>

This is what I was referring to (same as Paul), though it would be much
more valuable if we could come up with a documentation scheme that could
offer a single entry point for all the vents (somehow aggregated from all
the other modules).

I know that it`s each module's task to document events (and other API
items), but an aggregated events documentation (or at least list with
"event -> module" items where to go for more details) would be great. You
can not assume everybody knows the code by heart.

Thanks,
Eduard

>
> Thanks
> -Vincent
>
> > Thanks,
> > Eduard
> >
> >>
> >> thanks in advance
> >>
> >> Paul
> >>
> >>
> >> Le 13 avr. 2012 à 17:43, Vincent Massol a écrit :
> >>
> >>> Hi devs,
> >>>
> >>> We already have ApplicationStartedEvent and ApplicationReadyEvent (when
> >> DB is ready). We also need an event when the wiki is ready since in s a
> >> multiwiki environment when you create a new wiki for example, you might
> >> need to init some stuff (like initialize mandatory classes). It's also
> >> needed the first time a request comes in for a given wiki.
> >>>
> >>> Thus I  propose to add a WikiReadyEvent next to ApplicationStartedEvent
> >> and to send it in XWiki.updateDatabase():
> >>>
> >>> ...
> >>>           synchronized (wikiName) {
> >>>               if (!wikiList.contains(wikiName)) {
> >>>                   wikiList.add(wikiName);
> >>>
> >>>                   // Make sure these classes exists
> >>>                   if (initClasses) {
> >>>                       initializeMandatoryClasses(context);
> >>>                       getPluginManager().virtualInit(context);
> >>>                       getRenderingEngine().virtualInit(context);
> >>>                   }
> >>>
> >>> --> send WikiReadyEvent here
> >>>
> >>>               }
> >>>           }
> >>>
> >>> WDYT?
> >>>
> >>> Note that I was tempted to have a WikiCreatedEvent event sent when
> >> creating a wiki but that wouldn't fill the use case of initializing the
> >> wiki on the first request to it.
> >>>
> >>> Thanks
> >>> -Vincent
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to