Package org.opencms.xml.types
Class A_CmsXmlValueCdataBase
java.lang.Object
org.opencms.xml.types.A_CmsXmlContentValue
org.opencms.xml.types.A_CmsXmlValueCdataBase
- All Implemented Interfaces:
Comparable<I_CmsXmlSchemaType>
,I_CmsWidgetParameter
,I_CmsXmlContentValue
,I_CmsXmlSchemaType
- Direct Known Subclasses:
CmsXmlPlainTextStringValue
,CmsXmlStringValue
Base class for XML content value implementations that require only a simple XML cdata text node.
- Since:
- 6.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencms.xml.types.I_CmsXmlContentValue
I_CmsXmlContentValue.SearchContentType
-
Field Summary
Fields inherited from class org.opencms.xml.types.A_CmsXmlContentValue
m_defaultValue, m_document, m_element, m_locale, m_maxOccurs, m_minOccurs, m_name
Fields inherited from interface org.opencms.xml.types.I_CmsXmlSchemaType
XSI_NAMESPACE, XSI_NAMESPACE_ATTRIBUTE_NO_SCHEMA_LOCATION
-
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor for a xml content type that initializes some internal values.protected
A_CmsXmlValueCdataBase
(String name, String minOccurs, String maxOccurs) Initializes the schema type descriptor values for this type descriptor.protected
A_CmsXmlValueCdataBase
(I_CmsXmlDocument document, org.dom4j.Element element, Locale locale, I_CmsXmlSchemaType type) Initializes the required members for this XML content value. -
Method Summary
Modifier and TypeMethodDescriptiongetPlainText
(CmsObject cms) Returns the value of this XML content node as a plain text String.getStringValue
(CmsObject cms) Returns the value of this XML content node as a String.void
setStringValue
(CmsObject cms, String value) Sets the provided String as value of this XML content node.Methods inherited from class org.opencms.xml.types.A_CmsXmlContentValue
appendXmlSchema, compareTo, equals, generateXml, getChoiceMaxOccurs, getContentDefinition, getDefault, getDefault, getDocument, getElement, getId, getIndex, getKey, getLocale, getMaxIndex, getMaxOccurs, getMinOccurs, getName, getPath, getRelationType, getXmlIndex, hasError, hashCode, isChoiceOption, isChoiceType, isSearchable, isSimpleType, moveDown, moveUp, moveValue, readSchemaDefinition, setContentDefinition, setDefault, setKeyPrefix, toString, validateValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opencms.xml.types.I_CmsXmlContentValue
getSearchContentType
Methods inherited from interface org.opencms.xml.types.I_CmsXmlSchemaType
createValue, getSchemaDefinition, getTypeName, newInstance
-
Field Details
-
m_stringValue
The String value of the element node.
-
-
Constructor Details
-
A_CmsXmlValueCdataBase
protected A_CmsXmlValueCdataBase()Default constructor for a xml content type that initializes some internal values. -
A_CmsXmlValueCdataBase
protected A_CmsXmlValueCdataBase(I_CmsXmlDocument document, org.dom4j.Element element, Locale locale, I_CmsXmlSchemaType type) Initializes the required members for this XML content value.- Parameters:
document
- the XML content instance this value belongs toelement
- the XML element that contains this valuelocale
- the locale this value is created fortype
- the type instance to create the value for
-
A_CmsXmlValueCdataBase
Initializes the schema type descriptor values for this type descriptor.- Parameters:
name
- the name of the XML node containing the value according to the XML schemaminOccurs
- minimum number of occurrences of this type according to the XML schemamaxOccurs
- maximum number of occurrences of this type according to the XML schema
-
-
Method Details
-
getPlainText
Description copied from interface:I_CmsXmlContentValue
Returns the value of this XML content node as a plain text String.Plain text in this context means a pure textual representation of the content (i.e. without html tags). The plain text may be
null
, too, if there is no sound or useful textual representation (i.e. color values).- Specified by:
getPlainText
in interfaceI_CmsXmlContentValue
- Overrides:
getPlainText
in classA_CmsXmlContentValue
- Parameters:
cms
- an initialized instance of a CmsObject- Returns:
- the value of this XML content node as a plain text String
- See Also:
-
getStringValue
Description copied from interface:I_CmsXmlContentValue
Returns the value of this XML content node as a String.- Parameters:
cms
- an initialized instance of a CmsObject- Returns:
- the value of this XML content node as a String
- Throws:
CmsRuntimeException
- See Also:
-
setStringValue
Description copied from interface:I_CmsXmlContentValue
Sets the provided String as value of this XML content node.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 a CmsObjectvalue
- the value to set- Throws:
CmsIllegalArgumentException
- See Also:
-