Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-2366

Custom Velocity Uberspector that allows chaining several uberspectors

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3 RC1
    • Fix Version/s: 1.5 M1
    • Component/s: Velocity, {Unused} Core
    • Labels:
      None
    • Tests:
      Unit
    • Similar issues:

      Description

      Velocity has two components that are used for executing real Java methods, an introspector and an uberspector. The introspector is doing the low-level job of finding a method to call, given its name and a list of parameters. The uberspector has the extra job to find also getters, setters and iterators, wrap all of these into Velocity helper classes, and also do some nice logging.

      By default, Velocity provides two uberspector/introspector pairs, a simple one, and a secure one that restricts calls to dangerous classes.

      Given that we already found two uses for custom introspectors (XWIKI-2181 and XWIKI-2169), it would be nice to have just one uberspector (as required by the Velocity engine 1.5) and initialize it with a configurable list of uberspectors, using the Decorator pattern. Thus, we can define simple uberspectors that handle specific details of the script execution.

      Note that chaining uberspectors is not the same as chaining introspectors...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sdumitriu Sergiu Dumitriu
              Reporter:
              sdumitriu Sergiu Dumitriu
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: