Interface ModelItemType

All Superinterfaces:
PluginAware
All Known Subinterfaces:
ComplexRepositoryElementType<T>, ElementType<T>, IndexableElementType<T>, IndexableModelItemType, ModelItemGroupType, RepositoryElementType<T>, RepositoryModelItemGroupType, RepositoryModelItemType, SortableIndexableElementType<T>, XMLElementType<T>, XSLElementType<T>
All Known Implementing Classes:
AbstractBinaryElementType, AbstractBooleanElementType, AbstractContentElementType, AbstractDateElementType, AbstractDateTimeElementType, AbstractDoubleElementType, AbstractElementType, AbstractFileElementType, AbstractGeocodeElementType, AbstractLongElementType, AbstractMatrixElementType, AbstractModelItemType, AbstractMultilingualStringElementType, AbstractReferenceElementType, AbstractResourceReferenceElementType, AbstractRichTextElementType, AbstractRuleElementType, AbstractStringElementType, AbstractUserElementType, BinaryIndexableElementType, BinaryRepositoryElementType, BooleanIndexableElementType, BooleanRepositoryElementType, BooleanXMLElementType, BooleanXSLElementType, CompositeRepositoryModelItemType, ContentContentElementType, ContentIndexableElementType, ContentRepositoryElementType, DateIndexableElementType, DateRepositoryElementType, DateTimeIndexableElementType, DateTimeRepositoryElementType, DateTimeXMLElementType, DateXMLElementType, DoubleIndexableElementType, DoubleRepositoryElementType, DoubleXMLElementType, DoubleXSLElementType, FileContentElementType, FileIndexableElementType, FileRepositoryElementType, GeocodeIndexableElementType, GeocodeRepositoryElementType, HTMLRichTextContentElementType, HTMLRichTextRepositoryElementType, LongIndexableElementType, LongRepositoryElementType, LongXMLElementType, LongXSLElementType, MatrixRepositoryElementType, MultilingualStringIndexableElementType, MultilingualStringRepositoryElementType, PasswordRepositoryElementType, PasswordXMLElementType, ReferenceContentElementType, ReferenceIndexableElementType, ReferenceRepositoryElementType, RepeaterRepositoryModelItemType, ResourceReferenceRepositoryElementType, RichTextContentElementType, RichTextIndexableElementType, RichTextRepositoryElementType, RuleRepositoryElementType, StringIndexableElementType, StringRepositoryElementType, StringXMLElementType, StringXSLElementType, UserIndexableElementType, UserRepositoryElementType

public interface ModelItemType extends PluginAware
Interface for model item types
  • 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
      Generates SAX events for the given value
      Parameters:
      contentHandler - the ContentHandler that will receive the SAX events
      tagName - the tag name of the SAX event to generate.
      value - the value to SAX
      context - The context of the data to SAX
      Throws:
      SAXException - if an error occurs during the SAX events generation
    • valueToSAXForEdition

      void valueToSAXForEdition(ContentHandler contentHandler, String tagName, Object value, Optional<ViewItem> viewItem, DataContext context) throws SAXException
      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 - the ContentHandler that will receive the SAX events
      tagName - the tag name of the SAX event to generate.
      value - the value to SAX
      viewItem - 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 generation
    • valueToSAX

      void valueToSAX(ContentHandler contentHandler, String tagName, Object value, Optional<ViewItem> viewItem, DataContext context) throws SAXException
      Generates SAX events for the given value
      Parameters:
      contentHandler - the ContentHandler that will receive the SAX events
      tagName - the tag name of the SAX event to generate.
      value - the value to SAX
      viewItem - 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 generation
    • valueToJSONForClient

      default Object valueToJSONForClient(Object value, DataContext context)
      Convert the value into a JSON object to use client side
      Parameters:
      value - the value to convert
      context - The context of the data to convert. Can not be null.
      Returns:
      The value as JSON
    • valueToJSONForEdition

      Convert the value into a JSON object to use in edition mode
      Parameters:
      value - the value to convert
      viewItem - The optional view item corresponding item that is currently converted. This view item gives context for the JSON conversion.
      context - The context of the data to convert. Can not be null.
      Returns:
      The value as JSON
    • valueToJSONForClient

      Convert the value into a JSON object to use client side
      Parameters:
      value - the value to convert
      viewItem - The optional view item corresponding item that is currently converted. This view item gives context for the JSON conversion.
      context - The context of the data to convert. Can not be null.
      Returns:
      The value as JSON