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