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