I'm not sure I understand the goal here.
For me what we need to do is provide a wiki version of
org.xwiki.eventstream.RecordableEventDescriptor and then send events
of that type using the script service but here you seems to be
designing a way to send events trough xobject creating which does not
make sense to me.
On Wed, May 17, 2017 at 11:29 PM, Clément Aubin <clement.aubin(a)xwiki.com> wrote:
Hi everyone,
I’m currently working on a feature that should allow users to define
custom notification types in XWiki only through the definition of an
XObject (link to the issue :
https://jira.xwiki.org/browse/XWIKI-14119).
In this context, I wanted to know your thoughts about what properties
should be proposed by this XObject.
Currently, here is my proposition :
- The application name (applicationName) : the event application name
- A unique ID for the event (eventId)
- An event «pretty» name / description (eventPrettyName)
- An event icon, mainly displayed in the user notification preferences
pane (eventIcon)
- An event type (eventType) : the name of the event that should trigger
the notification (such as org.xwiki.bridge.event.DocumentUpdatedEvent)
- An object type (objectType) : an XObject that _has_ to be associated
with the document triggering the event in order to trigger the custom
notification
- A validation expression (validationExpression) : a script that will be
parsed in the event context in order to filter certain event kinds.
- A notification template (notificationTemplate) : the template that
should be used for rendering the notification in the notification center
To summarize, a custom notification is triggered if the following
expression is fully satisfied :
«The (eventType) has been triggered on a document having (objectType) in
his XObjects and the (validationExpression) is true in the current context».
What do you think ?
Thanks,
-- Clément Aubin Web Developer Intern @XWiki SAS clement.aubin(a)xwiki.com
More about us at
http://www.xwiki.com
--
Thomas Mortagne