Interface VersionManager

All Known Implementing Classes:
VersionManagerImpl

public interface VersionManager
Encapsulates version checks
Author:
krylov
  • Method Details

    • isUpToDate

      boolean isUpToDate(HasVersions object)
      Checks that an object is up to date
      Parameters:
      object - object with versions to check
      Returns:
      true if up to date, false if outdated
      Throws:
      UndefinedVersionsException - if object does not contain versions
    • isCompatible

      boolean isCompatible(HasVersions object)
      Checks that an object is compatible
      Parameters:
      object - object with versions to check
      Returns:
      true if compatible, false if otherwise
      Throws:
      UndefinedVersionsException - if object does not contain versions
    • requireCompatible

      default <T extends HasVersions> T requireCompatible(T object)
      Throws exception if an object is not compatible
      Parameters:
      object - object to check
      Returns:
      object
      Throws:
      IncompatibleObjectException - if an object is not compatible
      UndefinedVersionsException - if object does not contain versions
    • getCurrentVersions

      Versions getCurrentVersions(HasVersions object)
      Returns current versions for the object, i.e. studio and those packages only that the object depends upon. See FileWithVersionsIO.getUsedPackages(HasVersions)
      Parameters:
      object - the object
      Returns:
      current studio version and package versions for those packages used by the object
    • getCurrentVersions

      Versions getCurrentVersions()
      Returns:
      current studio and packages versions