Interface XMLElementType<T>
-
- Type Parameters:
T
- Type of the parameter value
- All Superinterfaces:
ElementType<T>
,ModelItemType
,PluginAware
- All Known Subinterfaces:
XSLElementType<T>
- All Known Implementing Classes:
BooleanXMLElementType
,BooleanXSLElementType
,DateTimeXMLElementType
,DateXMLElementType
,DoubleXMLElementType
,DoubleXSLElementType
,LongXMLElementType
,LongXSLElementType
,PasswordXMLElementType
,StringXMLElementType
,StringXSLElementType
public interface XMLElementType<T> extends ElementType<T>
Interfaces for XML parameter types
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Object
read(Configuration parentConfiguration, String name)
Read the value in the given XML configurationdefault Object
readValueFromNode(Configuration elementConfiguration)
Read the value in the given XML configuration (the node directly, not the parent configuration)default void
write(ContentHandler contentHandler, String name, Object value)
Write the value into the given content handler-
Methods inherited from interface org.ametys.runtime.model.type.ElementType
castValue, compareValues, fromJSONForClient, getManagedClass, getManagedClassArray, isCompatible, isSimple, parseConfiguration, toString, valueFromXML, valueToJSONForClient
-
Methods inherited from interface org.ametys.runtime.model.type.ModelItemType
getId, valueToSAX, valueToSAX, valueToSAXForEdition
-
Methods inherited from interface org.ametys.runtime.plugin.component.PluginAware
setPluginInfo
-
-
-
-
Method Detail
-
read
default Object read(Configuration parentConfiguration, String name) throws ConfigurationException
Read the value in the given XML configuration- Parameters:
parentConfiguration
- XML configuration containing the valuename
- the name of the element to read- Returns:
- the value
- Throws:
ConfigurationException
- if an error occurs while reading the given configuration
-
readValueFromNode
default Object readValueFromNode(Configuration elementConfiguration) throws ConfigurationException
Read the value in the given XML configuration (the node directly, not the parent configuration)- Parameters:
elementConfiguration
- XML configuration node containing the value- Returns:
- the value
- Throws:
ConfigurationException
- if an error occurs while reading the given configuration
-
write
default void write(ContentHandler contentHandler, String name, Object value) throws SAXException, BadItemTypeException
Write the value into the given content handler- Parameters:
contentHandler
- the content handler where to SAX into.name
- the name of the element to writevalue
- the value to write- Throws:
SAXException
- if an errors occurs during the value writingBadItemTypeException
- If the given value doesn't match this element type
-
-