Class DeviceInfo
- java.lang.Object
-
- com.cumulocity.microservice.lpwan.codec.model.DeviceInfo
-
public class DeviceInfo extends Object
The DeviceInfo class uniquely represents one device with the device manufacturer name, the device model.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEVICE_MANUFACTURER
static String
DEVICE_MODEL
-
Constructor Summary
Constructors Constructor Description DeviceInfo(@NotBlank String deviceManufacturer, @NotBlank String deviceModel)
Instantiates a new DeviceInfo.DeviceInfo(@NotBlank String deviceManufacturer, @NotBlank String deviceModel, @Null Set<DeviceCommand> supportedCommands)
DeviceInfo(@NotNull Map<String,String> properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getAttributes()
This method returns the manufacturer, model and the supported commands for a devicevoid
validate()
This method validates the object field.
-
-
-
Field Detail
-
DEVICE_MANUFACTURER
public static final String DEVICE_MANUFACTURER
- See Also:
- Constant Field Values
-
DEVICE_MODEL
public static final String DEVICE_MODEL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DeviceInfo
public DeviceInfo(@NotBlank @NotBlank String deviceManufacturer, @NotBlank @NotBlank String deviceModel)
Instantiates a new DeviceInfo.- Parameters:
deviceManufacturer
- represents the name of the device manufacturer.deviceModel
- represents the name of the device model.
-
DeviceInfo
public DeviceInfo(@NotBlank @NotBlank String deviceManufacturer, @NotBlank @NotBlank String deviceModel, @Null @Null Set<DeviceCommand> supportedCommands)
-
-
Method Detail
-
getAttributes
public Map<String,Object> getAttributes()
This method returns the manufacturer, model and the supported commands for a device- Returns:
- Map The resultant map consisting of the attributes of the device
-
validate
public void validate()
This method validates the object field.- Throws:
IllegalArgumentException
- if the field marked with @NotBlank are either null or blank.- See Also:
- IllegalArgumentException
-
-