Class FileFormatItemDTOMapper
java.lang.Object
org.openhab.core.io.rest.core.fileformat.FileFormatItemDTOMapper
The
FileFormatItemDTOMapper is a utility class to map items into file format item data transfer objects
(DTOs).- Author:
- Laurent Garnier - Initial contribution
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Itemmap(FileFormatItemDTO dto, ItemBuilderFactory itemBuilderFactory) Maps file format item DTO object into item.static FileFormatItemDTOmap(Item item, Collection<Metadata> metadata, @Nullable String format, Collection<ItemChannelLink> channelLinks) Maps item into file format item DTO object.static Collection<Metadata> Maps file format item DTO object into a collection of metadata including channels links provided through the "channel" namespace.
-
Constructor Details
-
FileFormatItemDTOMapper
public FileFormatItemDTOMapper()
-
-
Method Details
-
map
public static FileFormatItemDTO map(Item item, Collection<Metadata> metadata, @Nullable String format, Collection<ItemChannelLink> channelLinks) Maps item into file format item DTO object.- Parameters:
item- the itemmetadata- some metadataformat- the format to be used to format the item state, can be NULLchannelLinks- some items channel links- Returns:
- file format item DTO object
-
map
Maps file format item DTO object into item.- Parameters:
dto- the file format item DTO objectitemBuilderFactory- the item builder factory- Returns:
- item
-
mapMetadata
Maps file format item DTO object into a collection of metadata including channels links provided through the "channel" namespace.- Parameters:
dto- the file format item DTO object- Returns:
- the collection of metadata
-