Class WidgetRegistry
java.lang.Object
org.opencms.ade.contenteditor.widgetregistry.client.WidgetRegistry
The widget registry.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRenderer
(I_CmsEntityRenderer renderer) Adds a renderer which should be used by the Acacia editor.static WidgetRegistry
Returns the widget registry instance.Returns the registered renderers.Returns the registered widget factories.void
registerExternalWidgets
(List<org.opencms.ade.contenteditor.shared.CmsExternalWidgetConfiguration> externalWidgetConfigurations, com.google.gwt.user.client.Command callback) Registers external widgets.void
registerWidgetFactory
(String widgetName, I_CmsWidgetFactory widgetFactory) Registers a widget.protected void
Logs an error.protected void
showInitCallError
(Set<String> initCalls) Logs an error for missing init calls.protected boolean
tryInitCall
(String initCall) Tries to initializes a widget with the given initialization call.
-
Field Details
-
REGISTER_WIDGET_FACTORY_FUNCTION
The register widget function name.- See Also:
-
-
Method Details
-
getInstance
Returns the widget registry instance.- Returns:
- the widget registry instance
-
addRenderer
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 configurationscallback
- the callback to execute when done
-
registerWidgetFactory
Registers a widget.- Parameters:
widgetName
- the widget namewidgetFactory
- the widget
-
showError
Logs an error.- Parameters:
error
- the error to log
-
showInitCallError
Logs an error for missing init calls.- Parameters:
initCalls
- the set of missing init calls
-
tryInitCall
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
-