I remember that one reason to create BeginFoldEvent/EndFoldEvent was that
it depends on the context either or not it should be ignored. Said
differently, an event is not "ignorable" by nature.

In your case, maybe you should send a more specific event, like
"BeginSpamCleaning".

My 2 cents,

2016-02-04 15:36 GMT+01:00 vinc...@massol.net <vinc...@massol.net>:

>
> On 4 Feb 2016 at 15:27:18, Thomas Mortagne (thomas.morta...@xwiki.com
> (mailto:thomas.morta...@xwiki.com)) wrote:
>
> > The problem is that "ignore" seems to be more obvious for you that it
> > is in reality. What you call "completely ignore" is actually ignore it
> > in things like auto watchlist and activity stream but you certainly
> > don't want solr, clustering or right system to ignore those.
>
> That would work. If some listener doesn’t want to ignore some events
> (because it *has* to support them for things to work fine) then it would
> not ignore them. But the semantics would remain that they should be ignored
> *whenever* possible.
>
> Note that there are probably not that many use cases where we really want
> to ignore some events (since after all in a wiki everything should be
> tracked) but I think those use cases exist. It could be argued that even in
> the case of Spam cleaning we would want an entry in the AS that would say
> “Spam cleaning executed”. However when the AS implements the ability to see
> nested events, they should not be shown in this case (they should be
> ignored).
>
> Thanks
> -Vincent
>
>
> > On Thu, Feb 4, 2016 at 3:18 PM, vinc...@massol.net wrote:
> > > Hi devs,
> > >
> > > I’m not sure if we are all on the same page on the topic of ignoring
> and folding events so I’m making this proposal to try to clarify things.
> > >
> > > Needs:
> > > * Use case 1: Ability to ignore events. For example when cleaning
> spam, since we’re removing pages with spam in the title we may not want to
> have those pages appear in the Activity Stream, so the cleaning tool should
> be able to ignore events.
> > > * Use case 2: Grouping of Events. For example when we import a XAR we
> don’t want that each page in the XAR appear as a change in the Activity
> Stream since that would flood the stream. Instead we want to have a single
> entry that says “XAR xxx has been imported” (and ideally have the ability
> to click on a details link to unfold the full list of nested events.
> > >
> > > Current situation:
> > >
> > > * We currently have a Begin/EndFoldEvent which correspond to use case
> 2. The javadoc for Being says: "Implemented by event indicating a task
> which generates other events during its process is starting. This generated
> events could be seen as children of this task, that you can fold. This
> interface should only be used when there is a corresponding {@link
> EndFoldEvent}.”.
> > > * We don’t have any specific Event to say that we want to ignore all
> the events that come after it.
> > > * A lot of Event Listeners are currently excluding Begin/EndFoldEvent.
> > > ** For example the AS completely ignores any BeginFoldEvent sent to it
> (which is not correct, it should at least log one line).
> > >
> > > Proposal:
> > > * Keep Begin/EndFoldEvent with the current meaning, i.e. that it means
> that nested events are sent between the Begin/End.
> > > * Introduce 2 new classes: BeginIgnoreEvent/EndIgnoreEvent for the use
> case 1 (i.e. when some code needs to completely have the following events
> ignored). Those classes would implement BeginFoldEvent and EndFoldEvent.
> > >
> > > WDYT?
> > >
> > > Thanks
> > > -Vincent
> _______________________________________________
> devs mailing list
> devs@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Guillaume Delhumeau (guillaume.delhum...@xwiki.com)
Research & Development Engineer at XWiki SAS
Committer on the XWiki.org project
_______________________________________________
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to