public class UpgradeChecker extends Object
Modifier and Type | Field and Description |
---|---|
private static int |
CHUNK_SIZE
Number of bytes to read from the CI server at a time.
|
static String |
CI_SERVER
Location of the OME continuous integration server.
|
static String |
DAILY_BUILD
Location of the JAR artifacts for Bio-Formats' daily build.
|
static String |
DEFAULT_CALLER
Value of "bioformats.caller" for Bio-Formats utilities.
|
static String[] |
INDIVIDUAL_JARS
Names of the individual JARs.
|
private static org.slf4j.Logger |
LOGGER |
static String |
OLD_TOOLS
Name of the previous versions' tools JAR.
|
static String |
OME_TOOLS
Name of the OME tools JAR.
|
static String |
REGISTRY
Location of the OME registry.
|
static String |
REGISTRY_IMAGEJ
Registry ID identifying usage of Bio-Formats in ImageJ.
|
static String |
REGISTRY_LIBRARY
Registry ID identifying usage of Bio-Formats as a library in general.
|
private static String[] |
REGISTRY_PROPERTIES
Properties that are sent to the OME registry.
|
static String |
STABLE_BUILD
Location of the JAR artifacts for the stable releases.
|
static String |
STABLE_VERSION
Version number of the latest stable release.
|
static String |
TOOLS
Name of the ueber tools JAR.
|
static String |
TRUNK_BUILD
Location of the JAR artifacts for Bio-Formats' trunk build.
|
private static String |
UPGRADE_CHECK_ALLOWED_PROPERTY
System property indicating whether the upgrade check is ever allowed.
|
private static String |
UPGRADE_CHECK_PROPERTY
System property to set once the upgrade check is performed.
|
Constructor and Description |
---|
UpgradeChecker() |
Modifier and Type | Method and Description |
---|---|
boolean |
alreadyChecked()
Return true if an upgrade check has already been performed in this
JVM session.
|
boolean |
canDoUpgradeCheck()
Return whether or not we are ever allowed to perform an upgrade check.
|
boolean |
install(String urlPath,
String downloadPath)
Download and install a JAR file from the given URL.
|
boolean |
installIndividualJars(String urlDir,
String downloadDir)
Download and install all of the individual JAR files into the given
directory.
|
boolean |
newVersionAvailable(String caller)
Contact the OME registry and return true if a new version is available.
|
boolean |
newVersionAvailable(String registryID,
String caller)
Contact the OME registry and return true if a new version is available.
|
void |
setCanDoUpgradeCheck(boolean canDo)
Set whether or not we are ever allowed to perform an upgrade check.
|
public static final String REGISTRY_IMAGEJ
public static final String REGISTRY_LIBRARY
public static final String STABLE_VERSION
public static final String CI_SERVER
public static final String TRUNK_BUILD
public static final String DAILY_BUILD
public static final String STABLE_BUILD
public static final String TOOLS
public static final String OLD_TOOLS
public static final String OME_TOOLS
public static final String[] INDIVIDUAL_JARS
public static final String REGISTRY
public static final String DEFAULT_CALLER
private static final String[] REGISTRY_PROPERTIES
private static final String UPGRADE_CHECK_PROPERTY
private static final String UPGRADE_CHECK_ALLOWED_PROPERTY
private static final int CHUNK_SIZE
private static final org.slf4j.Logger LOGGER
public boolean alreadyChecked()
public boolean canDoUpgradeCheck()
public void setCanDoUpgradeCheck(boolean canDo)
public boolean newVersionAvailable(String caller)
caller
- name of the calling application, e.g. "MATLAB"public boolean newVersionAvailable(String registryID, String caller)
registryID
- how the application identifies itself to OMERO.registrycaller
- name of the calling application, e.g. "MATLAB"REGISTRY_IMAGEJ
,
REGISTRY_LIBRARY
public boolean installIndividualJars(String urlDir, String downloadDir)
urlDir
- the location from which to download the JAR filesdownloadDir
- the directory into which to save the JAR filesinstall(String, String)
public boolean install(String urlPath, String downloadPath)
urlPath
- the location from which to download the JARdownloadPath
- the location in which to write the JAR;
if this location already exists, it will be overwrittenCopyright © 2015 Open Microscopy Environment