On 05/18/2017 10:18 AM, Guillaume Delhumeau wrote:
Hi Clément
2017-05-17 23:29 GMT+02:00 Clément Aubin <clement.aubin(a)xwiki.com>om>:
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)
What does it mean? If the ID is unique, it must be computed every time an
event is created and it's not the job of the event descriptor to generate
this.
This event ID is used to uniquely identify an event type (I should maybe
rename it to eventTypeID in order to avoid some confusion), but the idea
of generating this ID automatically is very interesting !
- 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
Thanks
--
Clément Aubin
Web Developer Intern @XWiki SAS
clement.aubin(a)xwiki.com
More about us at
http://www.xwiki.com