public abstract class A_CmsFormatterWidget extends CmsSelectWidget
| Modifier and Type | Class and Description |
|---|---|
static class |
A_CmsFormatterWidget.FormatterSelectComparator
Comparator used to sort formatter beans in the order in which they should be displayed in the selection.
|
A_CmsWidget.CmsDummyWidgetDialog| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
LOG
The logger instance for this class.
|
CONFIGURATION_HEIGHTHELP_POSTFIX, LABEL_PREFIX| Constructor and Description |
|---|
A_CmsFormatterWidget() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getConfiguration(CmsObject cms,
A_CmsXmlContentValue schemaType,
CmsMessages messages,
CmsResource resource,
java.util.Locale contentLocale)
Returns the configuration string for the ADE content editor widget.
|
protected abstract java.util.List<CmsSelectWidgetOption> |
getFormatterOptions(CmsObject cms,
CmsADEConfigData config,
java.lang.String rootPath,
boolean allRemoved)
Gets the options corresponding to external (non-schema) formatters.
|
protected abstract java.util.Set<java.lang.String> |
getSelectedInFile(CmsConfigurationReader reader,
CmsXmlContent content)
Gets the values which have already been selected in the edited resource on the VFS.
|
protected abstract java.util.List<CmsSelectWidgetOption> |
getTypeOptions(CmsObject cms,
CmsADEConfigData config,
boolean allRemoved)
Gets the options corresponding to the schemas which define formatters.
|
java.lang.String |
getWidgetName()
Returns the class name of the widget.
|
static CmsSelectWidgetOption |
getWidgetOptionForFormatter(CmsObject cms,
I_CmsFormatterBean formatter)
Creates a widget option corresponding to a formatter bean for an external formatter.
|
static CmsSelectWidgetOption |
getWidgetOptionForType(CmsObject cms,
java.lang.String typeName)
Creates a widget option for a resource type.
|
protected java.util.List<CmsSelectWidgetOption> |
parseSelectOptions(CmsObject cms,
I_CmsWidgetDialog widgetDialog,
I_CmsWidgetParameter param)
Returns the list of configured select options, parsing the configuration String if required.
|
protected java.util.List<CmsSelectWidgetOption> |
parseSelectOptions(CmsObject cms,
I_CmsWidgetDialog widgetDialog,
I_CmsWidgetParameter param,
boolean allRemoved)
Returns the list of configured select options, parsing the configuration String if required.
|
getDialogWidget, getWidgetStringValue, newInstanceaddSelectOption, getConfiguration, getCssResourceLinks, getDefaultDisplayType, getHeight, getInitCall, getJavaScriptResourceLinks, getResourcePath, getSelectedValue, getSelectedValues, getSelectOptions, isInternal, setConfiguration, setSelectOptionsequals, getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpKey, getHelpText, getJsHelpMouseHandler, getJSIncludeFile, getLabelKey, hashCode, isCompactViewEnabled, setEditorValueclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpText, isCompactViewEnabled, setEditorValueprotected static final org.apache.commons.logging.Log LOG
public A_CmsFormatterWidget()
public static CmsSelectWidgetOption getWidgetOptionForFormatter(CmsObject cms, I_CmsFormatterBean formatter) throws java.lang.Exception
cms - the current CMS contextformatter - the formatter beanjava.lang.Exception - in case reading the formatter configuration file failspublic static CmsSelectWidgetOption getWidgetOptionForType(CmsObject cms, java.lang.String typeName)
cms - the current CMS contexttypeName - the type for which we want a widget optionpublic java.lang.String getConfiguration(CmsObject cms, A_CmsXmlContentValue schemaType, CmsMessages messages, CmsResource resource, java.util.Locale contentLocale)
I_CmsADEWidgetgetConfiguration in interface I_CmsADEWidgetgetConfiguration in class A_CmsSelectWidgetcms - the OpenCms contextschemaType - the schema typemessages - the messagesresource - the edited resourcecontentLocale - the content localeI_CmsADEWidget.getConfiguration(org.opencms.file.CmsObject, org.opencms.xml.types.A_CmsXmlContentValue, org.opencms.i18n.CmsMessages, org.opencms.file.CmsResource, java.util.Locale)public java.lang.String getWidgetName()
I_CmsADEWidgetgetWidgetName in interface I_CmsADEWidgetgetWidgetName in class CmsSelectWidgetI_CmsADEWidget.getWidgetName()protected abstract java.util.List<CmsSelectWidgetOption> getFormatterOptions(CmsObject cms, CmsADEConfigData config, java.lang.String rootPath, boolean allRemoved)
cms - the CMS contextconfig - the ADE configurationrootPath - the root path of the edited fileallRemoved - flag, indicating if all inheritedly available formatters should be disabledprotected abstract java.util.Set<java.lang.String> getSelectedInFile(CmsConfigurationReader reader, CmsXmlContent content)
reader - a sitemap configuration readercontent - the unmarshalled contentprotected abstract java.util.List<CmsSelectWidgetOption> getTypeOptions(CmsObject cms, CmsADEConfigData config, boolean allRemoved)
cms - the current CMS contextconfig - the ADE configurationallRemoved - flag, indicating if all inheritedly available formatters should be disabledprotected java.util.List<CmsSelectWidgetOption> parseSelectOptions(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
A_CmsSelectWidget
The list elements are of type .
The configuration String is parsed only once and then stored internally.CmsSelectWidgetOption
parseSelectOptions in class A_CmsSelectWidgetcms - the current users OpenCms contextwidgetDialog - the dialog of this widgetparam - the widget parameter of this dialogA_CmsSelectWidget.parseSelectOptions(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter)protected java.util.List<CmsSelectWidgetOption> parseSelectOptions(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param, boolean allRemoved)
The list elements are of type .
The configuration String is parsed only once and then stored internally.CmsSelectWidgetOption
cms - the current users OpenCms contextwidgetDialog - the dialog of this widgetparam - the widget parameter of this dialogallRemoved - flag, indicating if all inheritedly available formatters should be disabledCmsSelectWidgetOption