Interface UpdateRuntime

All Known Implementing Classes:
BootstrapRuntime

public interface UpdateRuntime
Runtime contract exposed to the launched application for update checks and restart/update flow.
  • Method Details

    • checkForUpdates

      AvailableUpdate checkForUpdates() throws IOException
      Checks the for updates.
      Returns:
      the check for updates result
      Throws:
      IOException - if the operation cannot be completed
    • getInstalledUpdatesDiskUsageBytes

      long getInstalledUpdatesDiskUsageBytes() throws IOException
      Returns the installed updates disk usage bytes.
      Returns:
      the installed updates disk usage bytes
      Throws:
      IOException - if the operation cannot be completed
    • getInstalledUpdatesFileCount

      int getInstalledUpdatesFileCount() throws IOException
      Returns the installed updates file count.
      Returns:
      the installed updates file count
      Throws:
      IOException - if the operation cannot be completed
    • getInstalledUpdatesDirectory

      Path getInstalledUpdatesDirectory()
      Returns the installed updates directory.
      Returns:
      the installed updates directory
    • freeUnusedInstalledUpdates

      long freeUnusedInstalledUpdates() throws IOException
      Deletes installed update folders that are no longer needed.
      Returns:
      the free unused installed updates result
      Throws:
      IOException - if the operation cannot be completed
    • getBootstrapConfig

      BootstrapConfig getBootstrapConfig()
      Returns the bootstrap config.
      Returns:
      the bootstrap config
    • getBootstrapJson

      com.fasterxml.jackson.databind.JsonNode getBootstrapJson()
      Returns the bootstrap JSON.
      Returns:
      the bootstrap JSON
    • getCurrentApplicationVersion

      VersionComparator.ParsedVersion getCurrentApplicationVersion()
      Returns the current application version.
      Returns:
      the current application version
    • getSelectedChannel

      UpdateChannel getSelectedChannel()
      Returns the selected channel during bootstrap/update processing.
      Returns:
      the selected channel
    • installUpdateAndRestart

      boolean installUpdateAndRestart(Component parentComponent, AvailableUpdate update, UpdateRuntime.UpdatePreparation preparation) throws IOException
      Installs the update and restart.
      Parameters:
      parentComponent - parent component value used by the operation
      update - update metadata to download or install
      preparation - preparation value used by the operation
      Returns:
      true when the condition is met; otherwise false
      Throws:
      IOException - if the operation cannot be completed
    • isAutoCheckUpdates

      boolean isAutoCheckUpdates()
      Checks whether auto check updates is enabled or applies.
      Returns:
      true if auto check updates is enabled or applies; otherwise false
    • isAutomaticUpdateChecksEnabledByProperty

      boolean isAutomaticUpdateChecksEnabledByProperty()
      Checks whether automatic update checks enabled by property is enabled or applies.
      Returns:
      true if automatic update checks enabled by property is enabled or applies; otherwise false
    • isAvailable

      boolean isAvailable()
      Checks whether available is enabled or applies during bootstrap/update processing.
      Returns:
      true if available is enabled or applies; otherwise false
    • setAutoCheckUpdates

      void setAutoCheckUpdates(boolean enabled)
      Sets the auto check updates.
      Parameters:
      enabled - whether enabled is enabled
    • setSelectedChannel

      void setSelectedChannel(UpdateChannel updateChannel)
      Sets the selected channel during bootstrap/update processing.
      Parameters:
      updateChannel - update channel value used by the operation