Class ItemDTOMapper

java.lang.Object
org.openhab.core.items.dto.ItemDTOMapper

@NonNullByDefault public class ItemDTOMapper extends Object
The ItemDTOMapper is a utility class to map items into item data transfer objects (DTOs).
Author:
Kai Kreuzer - Initial contribution, Stefan Bußweiler - Moved to core and renamed class to DTO mapper, Dennis Nobel - Removed dynamic data
  • Constructor Details

    • ItemDTOMapper

      public ItemDTOMapper()
  • Method Details

    • map

      public static @Nullable Item map(ItemDTO itemDTO, ItemBuilderFactory itemBuilderFactory)
      Maps item DTO into item object.
      Parameters:
      itemDTO - the DTO
      itemBuilderFactory - the item registry
      Returns:
      the item object
    • mapFunction

      public static GroupFunction mapFunction(@Nullable Item baseItem, GroupFunctionDTO function)
    • map

      public static ItemDTO map(Item item)
      Maps item into item DTO object.
      Parameters:
      item - the item
      Returns:
      item DTO object
    • mapFunction

      public static @Nullable GroupFunctionDTO mapFunction(@Nullable GroupFunction function)