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
Interfaces for XML parameter types
-
Method Summary
Modifier and TypeMethodDescriptiondefault 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 handlerMethods inherited from interface org.ametys.runtime.model.type.ElementType
castValue, compareValues, fromJSONForClient, getManagedClass, getManagedClassArray, isCompatible, isSimple, parseConfiguration, toString, valueFromXML, valueToJSONForClient, valueToJSONForEdition
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 Details
-
read
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
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
-