Class ExtractedAddonUpgrader

java.lang.Object
org.openhab.core.tools.ExtractedAddonUpgrader
All Implemented Interfaces:
Upgrader

@NonNullByDefault public abstract class ExtractedAddonUpgrader extends Object implements Upgrader
The ExtractedAddonUpgrader checks if the parent addon was previously installed, and if specific things exist, and if so installs the corresponding addon.
Author:
Cody Cutrer - Initial contribution
  • Constructor Details

    • ExtractedAddonUpgrader

      public ExtractedAddonUpgrader()
  • Method Details

    • getParentAddonName

      public abstract String getParentAddonName()
    • getAddonName

      public abstract String getAddonName()
    • thingTypeMatches

      public abstract boolean thingTypeMatches(String thingTypeUID)
    • execute

      public boolean execute(@Nullable Path userdataPath, @Nullable Path confPath)
      Description copied from interface: Upgrader
      Executes the upgrade process.
      Specified by:
      execute in interface Upgrader
      Parameters:
      userdataPath - the OPENHAB_USERDATA directory for the upgrade, or a custom path given by the user as --userdata argument
      confPath - the OPENHAB_CONF directory for the upgrade, or a custom path given by the user as --conf argument
      Returns:
      true if the upgrade was successful, false otherwise