Class ApplicationInventory

java.lang.Object
lu.kbra.modelizer_next.bootstrap.subapp.ApplicationInventory

public final class ApplicationInventory extends Object
Finds installed application versions and chooses the newest usable installation.
  • Constructor Details

    • ApplicationInventory

      public ApplicationInventory()
  • Method Details

    • findLatestInstalled

      public Optional<InstalledApplication> findLatestInstalled() throws IOException
      Finds the latest installed that matches the supplied input.
      Returns:
      the matching latest installed, or null when no match exists
      Throws:
      IOException - if the operation cannot be completed
    • findLatestInstalled

      public Optional<InstalledApplication> findLatestInstalled(UpdateChannel wantedChannel) throws IOException
      Finds the latest installed that matches the supplied input.
      Parameters:
      wantedChannel - wanted channel value used by the operation
      Returns:
      the matching latest installed, or null when no match exists
      Throws:
      IOException - if the operation cannot be completed
    • install

      public InstalledApplication install(AvailableUpdate update, ProgressListener listener) throws IOException
      Creates an InstalledApplication value from an installed jar path.
      Parameters:
      update - update metadata to download or install
      listener - listener notified about progress or changes
      Returns:
      the install result
      Throws:
      IOException - if the operation cannot be completed
    • readInstalledApplication

      public Optional<InstalledApplication> readInstalledApplication(Path jarPath)
      Reads the installed application.
      Parameters:
      jarPath - path to read or write
      Returns:
      an optional result when a matching value is available