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

Make easier to get the right UI extensions from Java

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 14.0-rc-1
    • 12.10
    • UI Extension
    • None
    • Unit
    • Unknown

    Description

      Right now the UIX SS does:

          public List<UIExtension> getExtensions(String extensionPointId)
          {
              UIExtensionManager manager = this.uiExtensionManager;
      
              ComponentManager componentManager = contextComponentManagerProvider.get();
              if (componentManager.hasComponent(UIExtensionManager.class, extensionPointId)) {
                  try {
                      // Look for a specific UI extension manager for the given extension point
                      manager = componentManager.getInstance(UIExtensionManager.class, extensionPointId);
                  } catch (ComponentLookupException e) {
                      this.logger.error("Failed to initialize UI extension manager", e);
                  }
              }
      
              return manager.get(extensionPointId);
          }
      

      We should refactor it and add a UIExtensionManagerProvider#get(String uixId component so that the code can be reused also from java code needing to get a list of UIX components.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: