The DataFeedItemMapper allows you to define which data feed items map to which UI templates.
The DataFeedItemMapper allows you to define which data feed items map to which UI templates. It does this via the list <code>Mappings</code>, which take classes that extend [[Type:DataFeedItem|DataFeedItem]] and If they match a mapping in the list it Duplicates that item's template and adds it into the list.
For more info on data feeds, see [[Data Feed]]s
== Fields ==
== Fields ==
Line 17:
Line 19:
== ItemMapping ==
== ItemMapping ==
{{Table TypeFields
{{Table TypeFields
|ItemType|{{RootFieldType|SyncType}}|TypeAdv0=true| The type to map to a template. The type coming from a data feed usually is based on the class DataFeedItem.
|ItemType|{{RootFieldType|SyncType}}|TypeAdv0=true| The type to map to a template. The type coming from a data feed will extend the abstract class [[Type:DataFeedItem|DataFeedItem]].
|GenericReplacementTypes|{{RootFieldType|SyncTypeList}}|TypeAdv1=true| If <code>ItemType</code> is a type that has generic single letter arguments, the type won't be accepted if it's arguments in order don't match the arguments in this list in order.
|GenericReplacementTypes|{{RootFieldType|SyncTypeList}}|TypeAdv1=true| If <code>ItemType</code> is a type that has generic single letter arguments, the type won't be accepted if it's arguments in order don't match the arguments in this list in order.
|Template|'''[[Component:FeedItemInterface|FeedItemInterface]]'''|TypeAdv2=true| The template to duplicate when matched with this item mapping.
|Template|'''[[Component:FeedItemInterface|FeedItemInterface]]'''|TypeAdv2=true| The template to duplicate when matched with this item mapping.
Line 24:
Line 26:
== Usage ==
== Usage ==
This component will use the item mappings defined in the Mappings list to match specific [[Type:Type|Types]] of data feed items to corresponding feed item interface templates.
This component is to be put into a [[Component:SingleFeedView]] or similar so that the component it is specified inside of can use this component to map incoming feed items from the data feed to UI or object templates.
== Examples ==
== Examples ==
Revision as of 18:11, 12 January 2025
Component image
Data Feed Item Mapper component as seen in the Scene Inspector
The DataFeedItemMapper allows you to define which data feed items map to which UI templates. It does this via the list Mappings, which take classes that extend DataFeedItem and If they match a mapping in the list it Duplicates that item's template and adds it into the list.
If ItemType is a type that has generic single letter arguments, the type won't be accepted if it's arguments in order don't match the arguments in this list in order.
The template to duplicate when matched with this item mapping.
Usage
This component is to be put into a Component:SingleFeedView or similar so that the component it is specified inside of can use this component to map incoming feed items from the data feed to UI or object templates.