Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-260

Make it easier to add new events to the events listener

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 4.3
    • API

    Description

      Right now all the events are located in a single Listener interface so any addition to it would break all the parsers and renderers which is quite a pain...

      We need to refactor all this to be able to add new stuff without breaking anything.

      Some idea:

      • first thing to do is to cut this big listener in peaces: an idea any would be to use annotation instead of implementing an interface(s). It also allow anyone to add any event unknown by the core rendering API
      • in parser use a class proxy when sending events which test if the event is actually implemented send or skip it accordingly. That way a listener (like a renderer) just need to implement what it support. Add we can add new method in the proxy anytime without breaking anything since it's a class

      Attachments

        Activity

          People

            Unassigned Unassigned
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: