Package org.opencms.xml.types
Class CmsXmlDisplayFormatterValue
- java.lang.Object
-
- org.opencms.xml.types.A_CmsXmlContentValue
-
- org.opencms.xml.types.A_CmsXmlValueTextBase
-
- org.opencms.xml.types.CmsXmlDisplayFormatterValue
-
- All Implemented Interfaces:
java.lang.Comparable<I_CmsXmlSchemaType>
,I_CmsWidgetParameter
,I_CmsXmlContentValue
,I_CmsXmlSchemaType
public class CmsXmlDisplayFormatterValue extends A_CmsXmlValueTextBase
XML value type for display formatters.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opencms.xml.types.I_CmsXmlContentValue
I_CmsXmlContentValue.SearchContentType
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SEPARATOR
The value separator string.-
Fields inherited from class org.opencms.xml.types.A_CmsXmlValueTextBase
m_stringValue
-
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
Constructors Constructor Description CmsXmlDisplayFormatterValue()
Creates a new, empty schema type descriptor of type "OpenCmsDisplayFormatter".CmsXmlDisplayFormatterValue(java.lang.String name, java.lang.String minOccurs, java.lang.String maxOccurs)
Creates a new schema type descriptor for the type "OpenCmsDisplayFormatter".CmsXmlDisplayFormatterValue(I_CmsXmlDocument document, org.dom4j.Element element, java.util.Locale locale, I_CmsXmlSchemaType type)
Creates a new XML content value of type "OpenCmsDisplayFormatter".
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description I_CmsXmlContentValue
createValue(I_CmsXmlDocument document, org.dom4j.Element element, java.util.Locale locale)
Creates a XML content value object for this type.java.lang.String
getDisplayType()
Returns the display resource type name.java.lang.String
getFormatterId()
Returns the formatter config id.java.lang.String
getSchemaDefinition()
Returns a String representation of the XML definition for this schema type.java.lang.String
getStringValue(CmsObject cms)
Returns the value of this XML content node as a String.java.lang.String
getTypeName()
Returns the schema type name.I_CmsXmlSchemaType
newInstance(java.lang.String name, java.lang.String minOccurs, java.lang.String maxOccurs)
Creates a new instance of this XML schema type initialized with the given values.void
setStringValue(CmsObject cms, java.lang.String value)
Sets the provided String as value of this XML content node.-
Methods inherited from class org.opencms.xml.types.A_CmsXmlValueTextBase
getPlainText
-
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
-
-
-
-
Field Detail
-
SEPARATOR
public static final java.lang.String SEPARATOR
The value separator string.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsXmlDisplayFormatterValue
public CmsXmlDisplayFormatterValue()
Creates a new, empty schema type descriptor of type "OpenCmsDisplayFormatter".
-
CmsXmlDisplayFormatterValue
public CmsXmlDisplayFormatterValue(I_CmsXmlDocument document, org.dom4j.Element element, java.util.Locale locale, I_CmsXmlSchemaType type)
Creates a new XML content value of type "OpenCmsDisplayFormatter".- 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
-
CmsXmlDisplayFormatterValue
public CmsXmlDisplayFormatterValue(java.lang.String name, java.lang.String minOccurs, java.lang.String maxOccurs)
Creates a new schema type descriptor for the type "OpenCmsDisplayFormatter".- 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 Detail
-
createValue
public I_CmsXmlContentValue createValue(I_CmsXmlDocument document, org.dom4j.Element element, java.util.Locale locale)
Description copied from interface:I_CmsXmlSchemaType
Creates a XML content value object for this type.- Parameters:
document
- the XML content instance this value belongs toelement
- the XML element to create the value fromlocale
- the locale to create the value for- Returns:
- the created XML content value object
- See Also:
I_CmsXmlSchemaType.createValue(org.opencms.xml.I_CmsXmlDocument, org.dom4j.Element, java.util.Locale)
-
getDisplayType
public java.lang.String getDisplayType()
Returns the display resource type name.- Returns:
- the display resource type
-
getFormatterId
public java.lang.String getFormatterId()
Returns the formatter config id.- Returns:
- the formatter config id
-
getSchemaDefinition
public java.lang.String getSchemaDefinition()
Description copied from interface:I_CmsXmlSchemaType
Returns a String representation of the XML definition for this schema type.- Returns:
- a String representation of the XML definition for this schema type
- See Also:
I_CmsXmlSchemaType.getSchemaDefinition()
-
getStringValue
public java.lang.String getStringValue(CmsObject cms) throws CmsRuntimeException
Description copied from interface:I_CmsXmlContentValue
Returns the value of this XML content node as a String.- Specified by:
getStringValue
in interfaceI_CmsWidgetParameter
- Specified by:
getStringValue
in interfaceI_CmsXmlContentValue
- Overrides:
getStringValue
in classA_CmsXmlValueTextBase
- Parameters:
cms
- an initialized instance of a CmsObject- Returns:
- the value of this XML content node as a String
- Throws:
CmsRuntimeException
- See Also:
A_CmsXmlValueTextBase.getStringValue(org.opencms.file.CmsObject)
-
getTypeName
public java.lang.String getTypeName()
Description copied from interface:I_CmsXmlSchemaType
Returns the schema type name.By convention, a XML schema type name has the form
"OpenCms + ${name}"
. Examples are"OpenCmsString"
or"OpenCmsBoolean"
.The schema type name is fixed by the implementation.
- Returns:
- the schema type name
- See Also:
I_CmsXmlSchemaType.getTypeName()
-
newInstance
public I_CmsXmlSchemaType newInstance(java.lang.String name, java.lang.String minOccurs, java.lang.String maxOccurs)
Description copied from interface:I_CmsXmlSchemaType
Creates a new instance of this XML schema type initialized with the given values.- Parameters:
name
- the name to use in the xml documentminOccurs
- minimum number of occurrencesmaxOccurs
- maximum number of occurrences- Returns:
- a new instance of this XML content type initialized with the given values
- See Also:
I_CmsXmlSchemaType.newInstance(java.lang.String, java.lang.String, java.lang.String)
-
setStringValue
public void setStringValue(CmsObject cms, java.lang.String value)
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.
- Specified by:
setStringValue
in interfaceI_CmsWidgetParameter
- Specified by:
setStringValue
in interfaceI_CmsXmlContentValue
- Overrides:
setStringValue
in classA_CmsXmlValueTextBase
- Parameters:
cms
- an initialized instance of a CmsObjectvalue
- the value to set- See Also:
A_CmsXmlValueTextBase.setStringValue(org.opencms.file.CmsObject, java.lang.String)
-
-