Package org.opencms.widgets
Class CmsRemoveFormatterWidget
- java.lang.Object
-
- org.opencms.widgets.A_CmsWidget
-
- org.opencms.widgets.A_CmsSelectWidget
-
- org.opencms.widgets.CmsSelectWidget
-
- org.opencms.widgets.A_CmsFormatterWidget
-
- org.opencms.widgets.CmsRemoveFormatterWidget
-
- All Implemented Interfaces:
I_CmsADEWidget
,I_CmsWidget
public class CmsRemoveFormatterWidget extends A_CmsFormatterWidget
Widget used to select a formatter to remove.Please note that this widget assumes the resource being edited is a sitemap configuration, and will not work correctly in a different context.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.widgets.A_CmsFormatterWidget
A_CmsFormatterWidget.FormatterSelectComparator
-
Nested classes/interfaces inherited from class org.opencms.widgets.A_CmsWidget
A_CmsWidget.CmsDummyWidgetDialog
-
-
Field Summary
-
Fields inherited from class org.opencms.widgets.A_CmsFormatterWidget
LOG
-
Fields inherited from class org.opencms.widgets.A_CmsSelectWidget
CONFIGURATION_HEIGHT
-
Fields inherited from class org.opencms.widgets.A_CmsWidget
HELP_POSTFIX, LABEL_PREFIX
-
-
Constructor Summary
Constructors Constructor Description CmsRemoveFormatterWidget()
Default constructor.CmsRemoveFormatterWidget(java.lang.String config)
Constructor with a configuration parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getCssResourceLinks(CmsObject cms)
Returns a list of CSS resources required by the widget.protected java.util.List<CmsSelectWidgetOption>
getFormatterOptions(CmsObject cms, CmsADEConfigData config, java.lang.String rootPath, boolean allRemoved)
Gets the options corresponding to external (non-schema) formatters.java.lang.String
getInitCall()
Returns the java script initialization call.java.util.List<java.lang.String>
getJavaScriptResourceLinks(CmsObject cms)
Returns a list of java script resources required by the widget.protected 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 java.util.List<CmsSelectWidgetOption>
getTypeOptions(CmsObject cms, CmsADEConfigData adeConfig, boolean allRemoved)
Gets the options corresponding to the schemas which define formatters.boolean
isInternal()
Returns if this is an internal widget.I_CmsWidget
newInstance()
Creates a duplicate of this widget instance.-
Methods inherited from class org.opencms.widgets.A_CmsFormatterWidget
getConfiguration, getWidgetName, getWidgetOptionForFormatter, getWidgetOptionForType, parseSelectOptions, parseSelectOptions
-
Methods inherited from class org.opencms.widgets.CmsSelectWidget
getDialogWidget, getWidgetStringValue
-
Methods inherited from class org.opencms.widgets.A_CmsSelectWidget
addSelectOption, getConfiguration, getDefaultDisplayType, getHeight, getResourcePath, getSelectedValue, getSelectedValues, getSelectOptions, setConfiguration, setSelectOptions
-
Methods inherited from class org.opencms.widgets.A_CmsWidget
equals, getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpKey, getHelpText, getJsHelpMouseHandler, getJSIncludeFile, getLabelKey, hashCode, isCompactViewEnabled, setEditorValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opencms.widgets.I_CmsWidget
getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpText, isCompactViewEnabled, setEditorValue
-
-
-
-
Constructor Detail
-
CmsRemoveFormatterWidget
public CmsRemoveFormatterWidget()
Default constructor.
-
CmsRemoveFormatterWidget
public CmsRemoveFormatterWidget(java.lang.String config)
Constructor with a configuration parameter.- Parameters:
config
- the configuration string
-
-
Method Detail
-
getCssResourceLinks
public java.util.List<java.lang.String> getCssResourceLinks(CmsObject cms)
Description copied from class:A_CmsSelectWidget
Returns a list of CSS resources required by the widget.- Specified by:
getCssResourceLinks
in interfaceI_CmsADEWidget
- Overrides:
getCssResourceLinks
in classA_CmsSelectWidget
- Parameters:
cms
- the current OpenCms context- Returns:
- the required CSS resource links
- See Also:
I_CmsADEWidget.getCssResourceLinks(org.opencms.file.CmsObject)
-
getInitCall
public java.lang.String getInitCall()
Description copied from class:A_CmsSelectWidget
Returns the java script initialization call.- Specified by:
getInitCall
in interfaceI_CmsADEWidget
- Overrides:
getInitCall
in classA_CmsSelectWidget
- Returns:
- the java script initialization call
- See Also:
I_CmsADEWidget.getInitCall()
-
getJavaScriptResourceLinks
public java.util.List<java.lang.String> getJavaScriptResourceLinks(CmsObject cms)
Description copied from class:A_CmsSelectWidget
Returns a list of java script resources required by the widget.- Specified by:
getJavaScriptResourceLinks
in interfaceI_CmsADEWidget
- Overrides:
getJavaScriptResourceLinks
in classA_CmsSelectWidget
- Parameters:
cms
- the current OpenCms context- Returns:
- the required java script resource links
- See Also:
I_CmsADEWidget.getJavaScriptResourceLinks(org.opencms.file.CmsObject)
-
isInternal
public boolean isInternal()
Description copied from class:A_CmsSelectWidget
Returns if this is an internal widget.Only widgets belonging to the OpenCms core should be marked as internal.
- Specified by:
isInternal
in interfaceI_CmsADEWidget
- Overrides:
isInternal
in classA_CmsSelectWidget
- Returns:
true
if this is an internal widget- See Also:
I_CmsADEWidget.isInternal()
-
newInstance
public I_CmsWidget newInstance()
Description copied from interface:I_CmsWidget
Creates a duplicate of this widget instance.- Specified by:
newInstance
in interfaceI_CmsWidget
- Overrides:
newInstance
in classCmsSelectWidget
- Returns:
- a duplicate of this widget instance
- See Also:
CmsSelectWidget.newInstance()
-
getFormatterOptions
protected java.util.List<CmsSelectWidgetOption> getFormatterOptions(CmsObject cms, CmsADEConfigData config, java.lang.String rootPath, boolean allRemoved)
Description copied from class:A_CmsFormatterWidget
Gets the options corresponding to external (non-schema) formatters.- Specified by:
getFormatterOptions
in classA_CmsFormatterWidget
- Parameters:
cms
- the CMS contextconfig
- the ADE configurationrootPath
- the root path of the edited fileallRemoved
- flag, indicating if all inheritedly available formatters should be disabled- Returns:
- the select widget options for the external formatters
- See Also:
A_CmsFormatterWidget.getFormatterOptions(org.opencms.file.CmsObject, org.opencms.ade.configuration.CmsADEConfigData, java.lang.String, boolean)
-
getSelectedInFile
protected java.util.Set<java.lang.String> getSelectedInFile(CmsConfigurationReader reader, CmsXmlContent content)
Description copied from class:A_CmsFormatterWidget
Gets the values which have already been selected in the edited resource on the VFS.- Specified by:
getSelectedInFile
in classA_CmsFormatterWidget
- Parameters:
reader
- a sitemap configuration readercontent
- the unmarshalled content- Returns:
- the set of values which have already been selected
- See Also:
A_CmsFormatterWidget.getSelectedInFile(org.opencms.ade.configuration.CmsConfigurationReader, org.opencms.xml.content.CmsXmlContent)
-
getTypeOptions
protected java.util.List<CmsSelectWidgetOption> getTypeOptions(CmsObject cms, CmsADEConfigData adeConfig, boolean allRemoved)
Description copied from class:A_CmsFormatterWidget
Gets the options corresponding to the schemas which define formatters.- Specified by:
getTypeOptions
in classA_CmsFormatterWidget
- Parameters:
cms
- the current CMS contextadeConfig
- the ADE configurationallRemoved
- flag, indicating if all inheritedly available formatters should be disabled- Returns:
- the select widget options for the content types with formatters in the schema
- See Also:
A_CmsFormatterWidget.getTypeOptions(org.opencms.file.CmsObject, org.opencms.ade.configuration.CmsADEConfigData, boolean)
-
-