Package loci.formats

Class UpgradeChecker

java.lang.Object
loci.formats.UpgradeChecker

public class UpgradeChecker extends Object
Class that allows checking for new versions of Bio-Formats, as well as updating to the latest stable, daily, or trunk version.
  • Field Details

    • REGISTRY_IMAGEJ

      public static final String REGISTRY_IMAGEJ
      Registry ID identifying usage of Bio-Formats in ImageJ.
      See Also:
    • REGISTRY_LIBRARY

      public static final String REGISTRY_LIBRARY
      Registry ID identifying usage of Bio-Formats as a library in general.
      See Also:
    • STABLE_VERSION

      public static final String STABLE_VERSION
      Deprecated.
      As of release 6.6.0
      See Also:
    • CI_SERVER

      public static final String CI_SERVER
      Location of the OME continuous integration server.
      See Also:
    • TRUNK_BUILD

      public static final String TRUNK_BUILD
      Location of the JAR artifacts for Bio-Formats' trunk build.
      See Also:
    • DAILY_BUILD

      public static final String DAILY_BUILD
      Location of the JAR artifacts for Bio-Formats' daily build.
      See Also:
    • STABLE_BUILD

      public static final String STABLE_BUILD
      Location of the JAR artifacts for the stable releases.
      See Also:
    • TOOLS

      public static final String TOOLS
      Name of the ueber tools JAR.
      See Also:
    • OLD_TOOLS

      public static final String OLD_TOOLS
      Deprecated.
      Removed in Bio-Formats 6.9.0
      Name of the previous versions' tools JAR.
      See Also:
    • OME_TOOLS

      public static final String OME_TOOLS
      Name of the OME tools JAR.
      See Also:
    • INDIVIDUAL_JARS

      public static final String[] INDIVIDUAL_JARS
      Names of the individual JARs.
    • REGISTRY

      public static final String REGISTRY
      Location of the OME registry.
      See Also:
    • DEFAULT_CALLER

      public static final String DEFAULT_CALLER
      Value of "bioformats.caller" for Bio-Formats utilities.
      See Also:
    • REGISTRY_PROPERTIES

      private static final String[] REGISTRY_PROPERTIES
      Properties that are sent to the OME registry.
    • UPGRADE_CHECK_PROPERTY

      private static final String UPGRADE_CHECK_PROPERTY
      System property to set once the upgrade check is performed.
      See Also:
    • UPGRADE_CHECK_ALLOWED_PROPERTY

      private static final String UPGRADE_CHECK_ALLOWED_PROPERTY
      System property indicating whether the upgrade check is ever allowed.
      See Also:
    • CHUNK_SIZE

      private static final int CHUNK_SIZE
      Number of bytes to read from the CI server at a time.
      See Also:
    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • UpgradeChecker

      public UpgradeChecker()
  • Method Details

    • alreadyChecked

      public boolean alreadyChecked()
      Return true if an upgrade check has already been performed in this JVM session.
    • canDoUpgradeCheck

      public boolean canDoUpgradeCheck()
      Return whether or not we are ever allowed to perform an upgrade check.
    • setCanDoUpgradeCheck

      public void setCanDoUpgradeCheck(boolean canDo)
      Set whether or not we are ever allowed to perform an upgrade check.
    • newVersionAvailable

      public boolean newVersionAvailable(String caller)
      Contact the OME registry and return true if a new version is available. OMERO.registry will identify this as a generic library usage of Bio-Formats (i.e. not associated with a specific client application).
      Parameters:
      caller - name of the calling application, e.g. "MATLAB"
    • newVersionAvailable

      public boolean newVersionAvailable(String registryID, String caller)
      Contact the OME registry and return true if a new version is available.
      Parameters:
      registryID - how the application identifies itself to OMERO.registry
      caller - name of the calling application, e.g. "MATLAB"
      See Also:
    • installIndividualJars

      public boolean installIndividualJars(String urlDir, String downloadDir)
      Download and install all of the individual JAR files into the given directory.
      Parameters:
      urlDir - the location from which to download the JAR files
      downloadDir - the directory into which to save the JAR files
      Returns:
      true if installation was successfull
      See Also:
    • install

      public boolean install(String urlPath, String downloadPath)
      Download and install a JAR file from the given URL.
      Parameters:
      urlPath - the location from which to download the JAR
      downloadPath - the location in which to write the JAR; if this location already exists, it will be overwritten
      Returns:
      true if installation was successful