java.lang.Object
org.opencms.ade.contenteditor.widgetregistry.client.WidgetRegistry

public final class WidgetRegistry extends Object
The widget registry.

  • Field Details

  • Method Details

    • getInstance

      public static WidgetRegistry getInstance()
      Returns the widget registry instance.

      Returns:
      the widget registry instance
    • addRenderer

      public void addRenderer(I_CmsEntityRenderer renderer)
      Adds a renderer which should be used by the Acacia editor.

      Parameters:
      renderer - the renderer to add
    • getRenderers

      Returns the registered renderers.

      Returns:
      the renderers
    • getWidgetFactories

      Returns the registered widget factories.

      Returns:
      the registered widget factories
    • registerExternalWidgets

      public void registerExternalWidgets(List<org.opencms.ade.contenteditor.shared.CmsExternalWidgetConfiguration> externalWidgetConfigurations, com.google.gwt.user.client.Command callback)
      Registers external widgets.

      Parameters:
      externalWidgetConfigurations - the external widget configurations
      callback - the callback to execute when done
    • registerWidgetFactory

      public void registerWidgetFactory(String widgetName, I_CmsWidgetFactory widgetFactory)
      Registers a widget.

      Parameters:
      widgetName - the widget name
      widgetFactory - the widget
    • showError

      protected void showError(String error)
      Logs an error.

      Parameters:
      error - the error to log
    • showInitCallError

      protected void showInitCallError(Set<String> initCalls)
      Logs an error for missing init calls.

      Parameters:
      initCalls - the set of missing init calls
    • tryInitCall

      protected boolean tryInitCall(String initCall)
      Tries to initializes a widget with the given initialization call. Returns false if the init method was not available within the window context yet.

      Parameters:
      initCall - the initialization function name
      Returns:
      true if the initialization function was available and has been executed