public class CmsXmlVfsImageValue extends CmsXmlVfsFileValue
This type allows links to internal VFS images only.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NODE_SCALE
Node name for the scale element.
|
static java.lang.String |
PARAM_DESCRIPTION
Request parameter name for the description parameter.
|
static java.lang.String |
PARAM_FORMAT
Request parameter name for the format parameter.
|
static java.lang.String |
TYPE_NAME_IMAGE
The name of this type as used in the XML schema.
|
NO_LINK, TYPE_NAME, TYPE_VFS_LINKm_defaultValue, m_document, m_element, m_locale, m_maxOccurs, m_minOccurs, m_nameXSI_NAMESPACE, XSI_NAMESPACE_ATTRIBUTE_NO_SCHEMA_LOCATION| Constructor and Description |
|---|
CmsXmlVfsImageValue()
Creates a new, empty schema type descriptor of type "OpenCmsVfsImage".
|
CmsXmlVfsImageValue(I_CmsXmlDocument document,
org.dom4j.Element element,
java.util.Locale locale,
I_CmsXmlSchemaType type)
Creates a new XML content value of type "OpenCmsVfsImage".
|
CmsXmlVfsImageValue(java.lang.String name,
java.lang.String minOccurs,
java.lang.String maxOccurs)
Creates a new schema type descriptor for the type "OpenCmsVfsImage".
|
| Modifier and Type | Method and 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 |
getDescription(CmsObject cms)
Returns the description of the image.
|
java.lang.String |
getFormat(CmsObject cms)
Returns the format information of the image.
|
java.lang.String |
getRequestLink(CmsObject cms)
Returns the link without parameters from the string value.
|
java.lang.String |
getScaleOptions(CmsObject cms)
Returns the scale options of the image.
|
java.lang.String |
getSchemaDefinition()
Returns a String representation of the XML definition for this schema type.
|
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 |
setDescription(CmsObject cms,
java.lang.String description)
Sets the description of the image.
|
void |
setFormat(CmsObject cms,
java.lang.String format)
Sets the format information of the image.
|
void |
setScaleOptions(CmsObject cms,
java.lang.String scaleOptions)
Sets the scale options of the image.
|
void |
setStringValue(CmsObject cms,
java.lang.String value)
Sets the provided String as value of this XML content node.
|
fillEntry, generateXml, getLink, getPlainText, getStringValue, isSearchable, setIdValueappendXmlSchema, compareTo, equals, getChoiceMaxOccurs, getContentDefinition, getDefault, getDefault, getDocument, getElement, getId, getIndex, getKey, getLocale, getMaxIndex, getMaxOccurs, getMinOccurs, getName, getPath, getRelationType, getXmlIndex, hasError, hashCode, isChoiceOption, isChoiceType, isSimpleType, moveDown, moveUp, moveValue, readSchemaDefinition, setContentDefinition, setDefault, setKeyPrefix, toString, validateValuepublic static final java.lang.String NODE_SCALE
public static final java.lang.String PARAM_DESCRIPTION
public static final java.lang.String PARAM_FORMAT
public static final java.lang.String TYPE_NAME_IMAGE
public CmsXmlVfsImageValue()
public CmsXmlVfsImageValue(I_CmsXmlDocument document, org.dom4j.Element element, java.util.Locale locale, I_CmsXmlSchemaType type)
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 forpublic CmsXmlVfsImageValue(java.lang.String name, java.lang.String minOccurs, java.lang.String maxOccurs)
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 schemapublic I_CmsXmlContentValue createValue(I_CmsXmlDocument document, org.dom4j.Element element, java.util.Locale locale)
I_CmsXmlSchemaTypecreateValue in interface I_CmsXmlSchemaTypecreateValue in class CmsXmlVfsFileValuedocument - the XML content instance this value belongs toelement - the XML element to create the value fromlocale - the locale to create the value forI_CmsXmlSchemaType.createValue(I_CmsXmlDocument, org.dom4j.Element, Locale)public java.lang.String getDescription(CmsObject cms)
cms - the current users contextpublic java.lang.String getFormat(CmsObject cms)
cms - the current users contextpublic java.lang.String getRequestLink(CmsObject cms)
cms - the current users contextpublic java.lang.String getScaleOptions(CmsObject cms)
cms - the current users contextpublic java.lang.String getSchemaDefinition()
I_CmsXmlSchemaTypegetSchemaDefinition in interface I_CmsXmlSchemaTypegetSchemaDefinition in class CmsXmlVfsFileValueI_CmsXmlSchemaType.getSchemaDefinition()public java.lang.String getTypeName()
I_CmsXmlSchemaType
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.
getTypeName in interface I_CmsXmlSchemaTypegetTypeName in class CmsXmlVfsFileValueI_CmsXmlSchemaType.getTypeName()public I_CmsXmlSchemaType newInstance(java.lang.String name, java.lang.String minOccurs, java.lang.String maxOccurs)
I_CmsXmlSchemaTypenewInstance in interface I_CmsXmlSchemaTypenewInstance in class CmsXmlVfsFileValuename - the name to use in the xml documentminOccurs - minimum number of occurrencesmaxOccurs - maximum number of occurrencesI_CmsXmlSchemaType.newInstance(java.lang.String, java.lang.String, java.lang.String)public void setDescription(CmsObject cms, java.lang.String description)
cms - the current users contextdescription - the description of the imagepublic void setFormat(CmsObject cms, java.lang.String format)
cms - the current users contextsformat - the format information of the imagepublic void setScaleOptions(CmsObject cms, java.lang.String scaleOptions)
cms - the current users contextscaleOptions - the scale options of the imagepublic void setStringValue(CmsObject cms, java.lang.String value) throws CmsIllegalArgumentException
I_CmsXmlContentValueThis 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.
setStringValue in interface I_CmsWidgetParametersetStringValue in interface I_CmsXmlContentValuesetStringValue in class CmsXmlVfsFileValuecms - an initialized instance of a CmsObjectvalue - the value to setCmsIllegalArgumentExceptionI_CmsXmlContentValue.setStringValue(org.opencms.file.CmsObject, java.lang.String)