Package org.openhab.core.thing.firmware
Class FirmwareUpdateResultInfo
java.lang.Object
org.openhab.core.thing.firmware.FirmwareUpdateResultInfo
The
FirmwareUpdateResultInfo
contains information about the result of a firmware update.- Author:
- Thomas Höfer - Initial contribution, Dimitar Ivanov - Consolidated all the needed information for firmware status events
-
Method Summary
Modifier and TypeMethodDescriptionstatic FirmwareUpdateResultInfo
createFirmwareUpdateResultInfo
(ThingUID thingUID, FirmwareUpdateResult result, String errorMessage) Creates a newFirmwareUpdateResultInfo
.boolean
@Nullable String
Returns the error message in case of result isFirmwareUpdateResult.ERROR
.Returns the result of the firmware update.Returns the thing UID.int
hashCode()
toString()
-
Method Details
-
createFirmwareUpdateResultInfo
public static FirmwareUpdateResultInfo createFirmwareUpdateResultInfo(ThingUID thingUID, FirmwareUpdateResult result, String errorMessage) Creates a newFirmwareUpdateResultInfo
.- Parameters:
thingUID
- thingUID of the thing being updatedresult
- the result of the firmware update (must not be null)errorMessage
- the error message in case of result isFirmwareUpdateResult.ERROR
(must not be null or empty for erroneous firmware updates; ignored for successful firmware updates)- Returns:
- FirmwareUpdateResultInfo (not null)
- Throws:
IllegalArgumentException
- if error message is null or empty for erroneous firmware updates
-
getResult
Returns the result of the firmware update.- Returns:
- the result of the firmware update
-
getThingUID
Returns the thing UID.- Returns:
- the thing UID
-
getErrorMessage
Returns the error message in case of result isFirmwareUpdateResult.ERROR
.- Returns:
- the error message in case of erroneous firmware updates (is null for successful firmware updates)
-
hashCode
public int hashCode() -
equals
-
toString
-