use of org.xwiki.uiextension.UIExtensionManager in project xwiki-platform by xwiki.
the class UIExtensionScriptService method getExtensions.
/**
* Retrieves all the {@link UIExtension}s for a given Extension Point.
*
* @param extensionPointId The ID of the Extension Point to retrieve the {@link UIExtension}s for
* @return the list of {@link UIExtension} for the given Extension Point
*/
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);
}
Aggregations