Class ThingDTOMapper

java.lang.Object
org.openhab.core.thing.dto.ThingDTOMapper
Direct Known Subclasses:
EnrichedThingDTOMapper

@NonNullByDefault public class ThingDTOMapper extends Object
The ThingDTOMapper is a utility class to map things into data transfer objects (DTO).
Author:
Stefan Bußweiler - Initial contribution, Kai Kreuzer - Added DTO to Thing mapping
  • Constructor Details

    • ThingDTOMapper

      public ThingDTOMapper()
  • Method Details

    • map

      public static ThingDTO map(Thing thing)
      Maps thing into thing data transfer object (DTO).
      Parameters:
      thing - the thing
      Returns:
      the thing DTO object
    • map

      public static Thing map(ThingDTO thingDTO, boolean isBridge)
      Maps thing DTO into thing
      Parameters:
      thingDTO - the thingDTO
      isBridge - flag if the thing DTO identifies a bridge
      Returns:
      the corresponding thing