public class CompomicsWrapper extends Object
Constructor and Description |
---|
CompomicsWrapper()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkForNewDeployedVersion(String toolName,
MavenJarFile oldMavenJarFile,
URL jarRepository,
String iconName,
boolean deleteOldFiles,
boolean startDownloadedVersion,
boolean addDesktopIcon,
Image normalIcon,
Image waitingIcon,
boolean exitJavaOnCancel)
Check if a newer version of the tool is deployed in the Maven repository,
and closes the tool if the user decided to update.
|
static void |
checkForNewVersion(String currentVersion,
String toolName,
String googleCodeToolName)
Deprecated.
use the Maven repository option instead:
checkForNewDeployedVersion
|
static void |
checkForNewVersion(String currentVersion,
String toolName,
String googleCodeToolName,
boolean closeToolWhenUpgrading,
String zipFileTag,
String zipFileType)
Deprecated.
use the Maven repository option instead:
checkForNewDeployedVersion
|
static void |
checkJavaVersion(String toolName)
Checks if the user is running Java 64 bit and shows a warning if not, and
shows a dialog with a warning and a link to the JavaTroubleShooting page
if not.
|
static boolean |
downloadLatestVersion(String toolName,
String groupId,
String artifactId,
File downloadFolder,
URL jarRepository,
String iconName,
boolean startDownloadedVersion,
boolean addDesktopIcon,
Image normalIcon,
Image waitingIcon,
boolean exitJavaOnCancel)
Check if a newer version of the tool is deployed in the Maven repository,
and closes the tool if the user decided to update.
|
static String |
getJarFilePath(String classPath,
String toolName)
Returns the path to the jar file.
|
ArrayList<String> |
getJavaHomeAndOptions(String toolPath)
Returns an array list containing the Java home plus any parameters to the
JVM.
|
static boolean |
is64BitJava()
Returns if the Java version used is 64 bit.
|
void |
launchTool(String toolName,
File jarFile,
String splashName,
String mainClass)
Starts the launcher by calling the launch method.
|
void |
launchTool(String toolName,
File jarFile,
String splashName,
String mainClass,
String[] args)
Starts the launcher by calling the launch method.
|
public void launchTool(String toolName, File jarFile, String splashName, String mainClass)
toolName
- the name of the tooljarFile
- the jar file to executesplashName
- the splash name, for example peptide-shaker-splash.pngmainClass
- the main class to execute, for example
eu.isas.peptideshaker.gui.PeptideShakerGUIpublic void launchTool(String toolName, File jarFile, String splashName, String mainClass, String[] args)
toolName
- the name of the tooljarFile
- the jar file to executesplashName
- the splash name, for example peptide-shaker-splash.png,
can be nullmainClass
- the main class to execute, for example
eu.isas.peptideshaker.gui.PeptideShakerGUIargs
- the arguments to pass to the tool (ignored if null)public static String getJarFilePath(String classPath, String toolName)
classPath
- the class path to extract the jar file path fromtoolName
- the name of the tool, e.g., "PeptideShaker" or
"SearchGUI".public static boolean is64BitJava()
public static void checkJavaVersion(String toolName)
toolName
- the name of the tool, e.g., "PeptideShaker"public static boolean checkForNewDeployedVersion(String toolName, MavenJarFile oldMavenJarFile, URL jarRepository, String iconName, boolean deleteOldFiles, boolean startDownloadedVersion, boolean addDesktopIcon, Image normalIcon, Image waitingIcon, boolean exitJavaOnCancel)
toolName
- the name of the tool, e.g., PeptideShaker or SearchGUIoldMavenJarFile
- the old jar filejarRepository
- the Maven repositoryiconName
- the icon namedeleteOldFiles
- if true, the old version of the tool is tried
deletedstartDownloadedVersion
- if true, the new version is started when
downloadedaddDesktopIcon
- if true, a desktop icon is addednormalIcon
- the normal icon for the progress dialogwaitingIcon
- the waiting icon for the progress dialogexitJavaOnCancel
- if true, the JVM will be shut down if the update
is canceled by the user before it has started or when the update is donepublic static boolean downloadLatestVersion(String toolName, String groupId, String artifactId, File downloadFolder, URL jarRepository, String iconName, boolean startDownloadedVersion, boolean addDesktopIcon, Image normalIcon, Image waitingIcon, boolean exitJavaOnCancel)
toolName
- the name of the tool, e.g., PeptideShaker or SearchGUIgroupId
- the group idartifactId
- the artifact iddownloadFolder
- the folder to download tojarRepository
- the Maven repositoryiconName
- the icon namestartDownloadedVersion
- if true, the new version is started when
downloadedaddDesktopIcon
- if true, a desktop icon is addednormalIcon
- the normal icon for the progress dialogwaitingIcon
- the waiting icon for the progress dialogexitJavaOnCancel
- if true, the JVM will be shut down if the update
is canceled by the user before it has started or when the update is donepublic static void checkForNewVersion(String currentVersion, String toolName, String googleCodeToolName)
currentVersion
- the version number of the tool currently runningtoolName
- the name of the tool, e.g., "PeptideShaker"googleCodeToolName
- the GoogleCode name of the tool, e.g.,
"peptide-shaker"public static void checkForNewVersion(String currentVersion, String toolName, String googleCodeToolName, boolean closeToolWhenUpgrading, String zipFileTag, String zipFileType)
currentVersion
- the version number of the tool currently runningtoolName
- the name of the tool, e.g., "PeptideShaker"googleCodeToolName
- the GoogleCode name of the tool, e.g.,
"peptide-shaker"closeToolWhenUpgrading
- if true, the tool will close when the
download page is opened, false only opens the download pagezipFileTag
- the zip file tag, e.g., SearchGUI-1.10.4_windows.zip
has the tag "_windows"zipFileType
- the zip file type, e.g., ".zip" or ".tar.gz"public ArrayList<String> getJavaHomeAndOptions(String toolPath) throws FileNotFoundException, IOException, ClassNotFoundException
toolPath
- the path to the jar file of the toolFileNotFoundException
- if a FileNotFoundException occursIOException
- if an IOException occursClassNotFoundException
- if a ClassNotFoundException occursCopyright © 2016. All rights reserved.