Package org.opencms.widgets
Interface I_CmsWidgetParameter
- All Known Implementing Classes:
A_CmsXmlContentValue
,A_CmsXmlValueCdataBase
,A_CmsXmlValueTextBase
,CmsXmlAccessRestrictionValue
,CmsXmlBooleanValue
,CmsXmlCategoryValue
,CmsXmlColorValue
,CmsXmlDateTimeValue
,CmsXmlDisplayFormatterValue
,CmsXmlDynamicCategoryValue
,CmsXmlHtmlValue
,CmsXmlLocaleValue
,CmsXmlNestedContentDefinition
,CmsXmlPlainTextStringValue
,CmsXmlSerialDateValue
,CmsXmlStringValue
,CmsXmlVarLinkValue
,CmsXmlVfsFileValue
,CmsXmlVfsImageValue
public interface I_CmsWidgetParameter
Parameter value wrapper used by the OpenCms workplace widgets.
- Since:
- 6.0.0
-
Method Summary
Modifier and TypeMethodDescriptiongetDefault
(CmsObject cms) Returns the default value of this parameter.getId()
Returns the form id of this parameter.int
getIndex()
Returns the index of this widget parameter, starting with 0.getKey()
Returns the localized key identificator of this parameter.int
Returns the maximum occurences of this parameter.int
Returns the minimum occurences of this parameter.getName()
Returns the name of this parameter.getStringValue
(CmsObject cms) Returns the value of this parameter.boolean
hasError()
Returnstrue
if this widgets value contains an error.void
setKeyPrefix
(String prefix) Sets an optional localized key prefix identificator of this parameter.void
setStringValue
(CmsObject cms, String value) Sets the value of this parameter.
-
Method Details
-
getDefault
Returns the default value of this parameter.If no default value has been provided,
null
is returned.- Parameters:
cms
- an initialized instance of an OpenCms user context- Returns:
- the default value of this parameter
-
getId
Returns the form id of this parameter.- Returns:
- the form id of this parameter
-
getIndex
int getIndex()Returns the index of this widget parameter, starting with 0.This is usefull in case there are more then one parameters with the same name, for example when creating a list of parameters of the same type.
- Returns:
- the index of this widget parameter
-
getKey
Returns the localized key identificator of this parameter.- Returns:
- the localized key identificator of this parameter
-
getMaxOccurs
int getMaxOccurs()Returns the maximum occurences of this parameter.- Returns:
- the maximum occurences of this parameter
-
getMinOccurs
int getMinOccurs()Returns the minimum occurences of this parameter.- Returns:
- the minimum occurences of this parameter
-
getName
Returns the name of this parameter.- Returns:
- the name of this parameter
-
getStringValue
Returns the value of this parameter.- Parameters:
cms
- an initialized instance of an OpenCms user context- Returns:
- the value of this parameter
-
hasError
boolean hasError()Returnstrue
if this widgets value contains an error.- Returns:
true
if this widgets value contains an error
-
setKeyPrefix
Sets an optional localized key prefix identificator of this parameter.- Parameters:
prefix
- the optional localized key prefix identificator of this parameter
-
setStringValue
Sets the value of this parameter.This method does provide processing of the content based on the users current OpenCms context. This can be used e.g. for link extraction and replacement in the content.
- Parameters:
cms
- an initialized instance of an OpenCms user contextvalue
- the value to set
-