public interface I_CmsWidget
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getConfiguration()
Returns the configuration string.
|
java.lang.String |
getDialogHtmlEnd(CmsObject cms,
I_CmsWidgetDialog widgetDialog,
I_CmsWidgetParameter param)
Generates the html to include at the end of the dialog for this widget.
|
java.lang.String |
getDialogIncludes(CmsObject cms,
I_CmsWidgetDialog widgetDialog)
Generates the necessary JavaScript inclusion code for this widget.
|
java.lang.String |
getDialogInitCall(CmsObject cms,
I_CmsWidgetDialog widgetDialog)
Generates the initialisation method JavaScript code for this widget.
|
java.lang.String |
getDialogInitMethod(CmsObject cms,
I_CmsWidgetDialog widgetDialog)
Generates the initialization method JavaScript code for this widget.
|
java.lang.String |
getDialogWidget(CmsObject cms,
I_CmsWidgetDialog widgetDialog,
I_CmsWidgetParameter param)
Generates the widget HTML for the provided widget parameter.
|
java.lang.String |
getHelpBubble(CmsObject cms,
I_CmsWidgetDialog widgetDialog,
I_CmsWidgetParameter param)
Creates the HTML code for the help bubble for this widget.
|
java.lang.String |
getHelpText(I_CmsWidgetDialog widgetDialog,
I_CmsWidgetParameter value)
Creates a HTML <div> containing the help text for this widget.
|
java.lang.String |
getWidgetStringValue(CmsObject cms,
I_CmsWidgetDialog widgetDialog,
I_CmsWidgetParameter param)
Returns the
processed according to the output rules of this widget and the given widget dialog. |
boolean |
isCompactViewEnabled()
Returns if the widget is compact view enabled.
|
I_CmsWidget |
newInstance()
Creates a duplicate of this widget instance.
|
void |
setConfiguration(java.lang.String configuration)
Sets the configuration of this widget.
|
void |
setEditorValue(CmsObject cms,
java.util.Map<java.lang.String,java.lang.String[]> formParameters,
I_CmsWidgetDialog widgetDialog,
I_CmsWidgetParameter param)
Sets the value of in the given widget parameter by reading the "right"
value from the offered map of parameters.
|
java.lang.String getConfiguration()
This can be used to enable / disable certain widget features that should not always be available, or to pass specific initialization information to the widget. It depends on the widget implementation on how this information is used.
java.lang.String getDialogHtmlEnd(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
The "help bubble" text div's are added using this method.
cms
- the current users OpenCms contextwidgetDialog
- the dialog where the widget is used onparam
- the widget parameter to generate the widget forjava.lang.String getDialogIncludes(CmsObject cms, I_CmsWidgetDialog widgetDialog)
cms
- the current users OpenCms contextwidgetDialog
- the dialog where the widget is used onjava.lang.String getDialogInitCall(CmsObject cms, I_CmsWidgetDialog widgetDialog)
cms
- the current users OpenCms contextwidgetDialog
- the dialog where the widget is used onjava.lang.String getDialogInitMethod(CmsObject cms, I_CmsWidgetDialog widgetDialog)
cms
- an initialized instance of a CmsObjectwidgetDialog
- the dialog where the widget is used onjava.lang.String getDialogWidget(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
cms
- an initialized instance of a CmsObjectwidgetDialog
- the dialog where the widget is used onparam
- the widget parameter to generate the widget forjava.lang.String getHelpBubble(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
cms
- the current users OpenCms contextwidgetDialog
- the dialog where the widget is used onparam
- the widget parameter to generate the widget forjava.lang.String getHelpText(I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter value)
widgetDialog
- the dialog where the widget is used onvalue
- the value to create the help bubble forjava.lang.String getWidgetStringValue(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
I_CmsWidgetParameter.getStringValue(CmsObject)
processed according to the output rules of this widget and the given widget dialog.cms
- the current users OpenCms contextwidgetDialog
- the dialog where the widget is used onparam
- the widget parameter to generate the widget forI_CmsWidgetParameter.getStringValue(CmsObject)
processed according to the output rules of this widgetI_CmsWidgetParameter.getStringValue(CmsObject)
,
I_CmsXmlContentValue.getStringValue(CmsObject)
boolean isCompactViewEnabled()
true
if the widget is compact view enabledI_CmsWidget newInstance()
void setConfiguration(java.lang.String configuration)
This can be used to enable / disable certain widget features that should not always be available, or to pass specific initialization information to the widget. It depends on the widget implementation on how this information is used.
configuration
- the configuration to setvoid setEditorValue(CmsObject cms, java.util.Map<java.lang.String,java.lang.String[]> formParameters, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
cms
- the current users OpenCms contextformParameters
- the map of parameters to get the value fromwidgetDialog
- the dialog where the widget is used onparam
- the widget parameter to generate the widget for