Package org.ametys.runtime.model.type
Interface ModelItemType
- All Superinterfaces:
PluginAware
- All Known Subinterfaces:
ComplexRepositoryElementType<T>
,ElementType<T>
,ModelItemGroupType
,RepositoryElementType<T>
,RepositoryModelItemGroupType
,RepositoryModelItemType
,XMLElementType<T>
,XSLElementType<T>
- All Known Implementing Classes:
AbstractBinaryElementType
,AbstractBooleanElementType
,AbstractContentElementType
,AbstractDateElementType
,AbstractDateTimeElementType
,AbstractDoubleElementType
,AbstractElementType
,AbstractFileElementType
,AbstractGeocodeElementType
,AbstractLongElementType
,AbstractModelItemType
,AbstractMultilingualStringElementType
,AbstractReferenceElementType
,AbstractRichTextElementType
,AbstractStringElementType
,AbstractUserElementType
,BinaryRepositoryElementType
,BooleanRepositoryElementType
,BooleanXMLElementType
,BooleanXSLElementType
,CompositeRepositoryModelItemType
,ContentContentElementType
,ContentRepositoryElementType
,DateRepositoryElementType
,DateTimeRepositoryElementType
,DateTimeXMLElementType
,DateXMLElementType
,DoubleRepositoryElementType
,DoubleXMLElementType
,DoubleXSLElementType
,FileContentElementType
,FileRepositoryElementType
,GeocodeRepositoryElementType
,HTMLRichTextContentElementType
,HTMLRichTextRepositoryElementType
,LongRepositoryElementType
,LongXMLElementType
,LongXSLElementType
,MultilingualStringRepositoryElementType
,PasswordRepositoryElementType
,PasswordXMLElementType
,ReferenceContentElementType
,ReferenceRepositoryElementType
,RepeaterRepositoryModelItemType
,RichTextContentElementType
,RichTextRepositoryElementType
,StringRepositoryElementType
,StringXMLElementType
,StringXSLElementType
,UserRepositoryElementType
Interface for model item types
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
Retrieves the identifier of the parameter typevoid
valueToSAX
(ContentHandler contentHandler, String tagName, Object value, Optional<ViewItem> viewItem, DataContext context) Generates SAX events for the given valuedefault void
valueToSAX
(ContentHandler contentHandler, String tagName, Object value, DataContext context) Generates SAX events for the given valuevoid
valueToSAXForEdition
(ContentHandler contentHandler, String tagName, Object value, Optional<ViewItem> viewItem, DataContext context) Generates SAX events for the given value in edition mode.Methods inherited from interface org.ametys.runtime.plugin.component.PluginAware
setPluginInfo
-
Method Details
-
getId
Retrieves the identifier of the parameter type- Returns:
- the identifier of the parameter type
-
valueToSAX
default void valueToSAX(ContentHandler contentHandler, String tagName, Object value, DataContext context) throws SAXException, IOException Generates SAX events for the given value- Parameters:
contentHandler
- theContentHandler
that will receive the SAX eventstagName
- the tag name of the SAX event to generate.value
- the value to SAXcontext
- The context of the data to SAX- Throws:
SAXException
- if an error occurs during the SAX events generationIOException
- if an error occurs while reading a value using the I/O API
-
valueToSAXForEdition
void valueToSAXForEdition(ContentHandler contentHandler, String tagName, Object value, Optional<ViewItem> viewItem, DataContext context) throws SAXException, IOException Generates SAX events for the given value in edition mode. This method exist for legacy purposes because some types have to be saxed as JSON- Parameters:
contentHandler
- theContentHandler
that will receive the SAX eventstagName
- the tag name of the SAX event to generate.value
- the value to SAXviewItem
- The optional view item corresponding item that is currently saxed. This view item gives context for the SAX event that will be generated here.context
- The context of the data to SAX- Throws:
SAXException
- if an error occurs during the SAX events generationIOException
- if an error occurs while reading a value using the I/O API
-
valueToSAX
void valueToSAX(ContentHandler contentHandler, String tagName, Object value, Optional<ViewItem> viewItem, DataContext context) throws SAXException, IOException Generates SAX events for the given value- Parameters:
contentHandler
- theContentHandler
that will receive the SAX eventstagName
- the tag name of the SAX event to generate.value
- the value to SAXviewItem
- The optional view item corresponding item that is currently saxed. This view item gives context for the SAX event that will be generated here.context
- The context of the data to SAX- Throws:
SAXException
- if an error occurs during the SAX events generationIOException
- if an error occurs while reading a value using the I/O API
-