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

Make Component Manager accessible as a Component Script Service

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1-milestone-1
    • Fix Version/s: 4.1-milestone-2
    • Component/s: Component
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Currently users have to do this:

      {{groovy}}
      import com.xpn.xwiki.web.Utils
      def converter =  Utils.getComponent(Converter.class);
      {{/groovy}}
      

      When this is implemented they'll be able to do:

      {{groovy}}
      def converter =  services.component.componentManager.getInstance(Converter.class)
      {{/groovy}}
      

      This has 3 advantages:

      • Uses the new way, i.e. Script Services accessible through the "services" variable
      • No need for import
      • Don't use old API's in the com.xpn package

        Attachments

          Activity

            People

            • Assignee:
              vmassol Vincent Massol
              Reporter:
              vmassol Vincent Massol
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: