On Wed, May 16, 2012 at 11:45 AM, Jerome Velociter
<jerome(a)winesquare.net> wrote:
Hi
On Wed, May 16, 2012 at 11:39 AM, Jean-Vincent Drean <jv(a)xwiki.com> wrote:
Hi,
Following the "hiding technical content" it seems logical to hide
events fired by hidden documents in the activity stream.
Since the activity stream uses its own store for performance I don't
see any other solution than to duplicate the "hidden" information in
it.
I'd like to commit the following implementation:
- no change to the ActivityStream / ActivityEvent APIs
- additions of ActivityEventImpl#isHidden() and
ActivityEventImpl#setHidden(boolean)
- modification of ActivityStreamImpl#addDocumentActivityEvent() so
that it sets the event as hidden when it's been fired by a hidden doc
- modification of ActivityStreamImpl#searchEvents() so that it tweaks
the hibernate query when the user doesn't want hidden docs to be
displayed (same principle as in the query manager)
- addition of a ase_hidden column in the activity stream DB table
This way events can be filtered without any modification to the existing APIs.
WDYT ?
What implication does this have for the event stream module (which
current impl relies on the activity stream) ? In terms of default
behavior regarding the hidden property.
I haven't modified it, which means that
- EventStream#addEvent() will create events with hidden==false
- EventStream#searchEvents() will return any Event, hidden or not
Jerome
Note: naming this new property "hidden" and not something like
"hiddenpage" allow us to extend the concept in the future.
We could put the setHidden / isHidden methods at the API level and any
extension would be able to mark an event as hidden.
But it's not part of the current proposal.
Thanks,
JV.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Jérôme Velociter
Winesquare
http://www.winesquare.net/
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Jean-Vincent Drean,
XWiki.