[xwiki-devs] [Proposal] Filtering of events fired by hidden documents in the activity stream
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 ? 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.
Hi On Wed, May 16, 2012 at 11:39 AM, Jean-Vincent Drean <[email protected]> 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. 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jérôme Velociter Winesquare http://www.winesquare.net/
On Wed, May 16, 2012 at 11:45 AM, Jerome Velociter <[email protected]> wrote:
Hi
On Wed, May 16, 2012 at 11:39 AM, Jean-Vincent Drean <[email protected]> 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jérôme Velociter Winesquare http://www.winesquare.net/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean-Vincent Drean, XWiki.
On 05/16/2012 05:39 AM, Jean-Vincent Drean 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 ?
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.
Sounds good, +1. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Thanks, committing it. On Wed, May 16, 2012 at 4:05 PM, Sergiu Dumitriu <[email protected]> wrote:
On 05/16/2012 05:39 AM, Jean-Vincent Drean 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 ?
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.
Sounds good, +1.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean-Vincent Drean, XWiki.
Hi JV, On May 16, 2012, at 11:39 AM, Jean-Vincent Drean 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 ?
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.
Sounds ok in general (note that I don't know anything about the implementation code for the Activity Stream). One thing I'd like to ensure is independence from the User Profile module as much as possible, i.e. Activity Stream should work even if the User Profile application is not installed (in this case we can decide that all documents are shown by default for example - or vice versa). Thanks -Vincent
participants (4)
-
Jean-Vincent Drean -
Jerome Velociter -
Sergiu Dumitriu -
Vincent Massol