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

Make easier to get the right UI extensions from Java

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 12.10
    • Fix Version/s: 14.0-rc-1
    • Component/s: UI Extension
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Similar issues:

      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

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

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: