eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
865 stars 782 forks source link

Refactor Firmware API in regards to the newly introduced FirmwareRestriction function #5918

Open hanneshofmann opened 6 years ago

hanneshofmann commented 6 years ago

Described in #5642 and merged with the PR #5903, the Firmware API has been extended to define a so called FirmwareRestriction function which is further used to check the installation applicability of a firmware for a given thing. By using these restriction functions, the API methods Firmware#isModelRestricted and Firmware#getPrerequisiteVersion (and consequently the builder methods) are deprecated since they can easily replaced with the newly introduced FirmwareRestriction function.

Besides removing the obsolete API methods, @dstivanov pointed out, that we could also think about moving the org.eclipse.smarthome.core.thing.internal.firmware.FirmwareImpl.Version to an exported package (e.g. org.eclipse.smarthome.core.thing.binding.firmware).

htreu commented 6 years ago

Please also note that the corresponding properties are exposed via the Thing REST resource. According to this comment (https://github.com/eclipse/smarthome/pull/5903#issuecomment-405193803) they are not used in PaperUI but may be used by other clients using the firmware update mechanism (currently known: DT).