Package org.openhab.core.thing.firmware
Class FirmwareStatusInfo
java.lang.Object
org.openhab.core.thing.firmware.FirmwareStatusInfo
The
FirmwareStatusInfo
represents the FirmwareStatus
of a Thing
. If the firmware status is
FirmwareStatus.UPDATE_EXECUTABLE
then the information object will also provide the thing UID and the
version of the latest updatable firmware for the thing.- Author:
- Thomas Höfer - Initial contribution, Dimitar Ivanov - Consolidated all the needed information for firmware status events
-
Method Summary
Modifier and TypeMethodDescriptionstatic FirmwareStatusInfo
createUnknownInfo
(ThingUID thingUID) Creates a newFirmwareStatusInfo
havingFirmwareStatus.UNKNOWN
as firmware status.static FirmwareStatusInfo
createUpdateAvailableInfo
(ThingUID thingUID) Creates a newFirmwareStatusInfo
havingFirmwareStatus.UPDATE_AVAILABLE
as firmware status.static FirmwareStatusInfo
createUpdateExecutableInfo
(ThingUID thingUID, @Nullable String firmwareVersion) Creates a newFirmwareStatusInfo
havingFirmwareStatus.UPDATE_EXECUTABLE
as firmware status.static FirmwareStatusInfo
createUpToDateInfo
(ThingUID thingUID) Creates a newFirmwareStatusInfo
havingFirmwareStatus.UP_TO_DATE
as firmware status.boolean
Returns the firmware status.Returns the thing UID.@Nullable String
Returns the firmware version of the latest updatable firmware for the thing.int
hashCode()
toString()
-
Method Details
-
createUnknownInfo
Creates a newFirmwareStatusInfo
havingFirmwareStatus.UNKNOWN
as firmware status.- Returns:
- the firmware status info (not null)
-
createUpToDateInfo
Creates a newFirmwareStatusInfo
havingFirmwareStatus.UP_TO_DATE
as firmware status.- Returns:
- the firmware status info (not null)
-
createUpdateAvailableInfo
Creates a newFirmwareStatusInfo
havingFirmwareStatus.UPDATE_AVAILABLE
as firmware status.- Returns:
- the firmware status info (not null)
-
createUpdateExecutableInfo
public static FirmwareStatusInfo createUpdateExecutableInfo(ThingUID thingUID, @Nullable String firmwareVersion) Creates a newFirmwareStatusInfo
havingFirmwareStatus.UPDATE_EXECUTABLE
as firmware status. The given firmware version represents the version of the latest updatable firmware for the thing.- Parameters:
firmwareVersion
- the version of the latest updatable firmware for the thing (must not be null)- Returns:
- the firmware status info (not null)
-
getFirmwareStatus
Returns the firmware status.- Returns:
- the firmware status (not null)
-
getUpdatableFirmwareVersion
Returns the firmware version of the latest updatable firmware for the thing.- Returns:
- the firmware version (only set if firmware status is
FirmwareStatus.UPDATE_EXECUTABLE
)
-
getThingUID
Returns the thing UID.- Returns:
- the thing UID of the thing, whose status is updated (not null)
-
hashCode
public int hashCode() -
equals
-
toString
-