public class ExtendableWidgetFactory extends SimpleWidgetFactory
WidgetFactoryRegistry
to create widgets provided by plugins. The
factory uses the registry whenever a widget with a widget group which starts with
plugin/
should be created. If a group does not start with this prefix the widget
creation is delegated to the parent class. The bundle name of the plugin whose factory should be
used can be provided as part of the widget group or as a request parameter named
bundleName
. In case it is part of the widget group it is expected to follow the
plugin/
prefix. If there is no factory for the bundle the widget creation fails.Constructor and Description |
---|
ExtendableWidgetFactory() |
Modifier and Type | Method and Description |
---|---|
Widget |
createWidget(String widgetGroupName,
String widgetName,
Map<String,String[]> requestParameters)
Create a new widget instance that should handle the current widget request.
|
setWidgetPackagePrefix
public Widget createWidget(String widgetGroupName, String widgetName, Map<String,String[]> requestParameters) throws WidgetCreationException
WidgetFactory
createWidget
in interface WidgetFactory
createWidget
in class SimpleWidgetFactory
widgetGroupName
- the group of the widgetwidgetName
- the name of the widgetrequestParameters
- the request parameters of the current requestWidgetCreationException
- in case the widget cannot be createdCopyright © 2019 Communote team. All rights reserved.