Class GUIFileDAO
java.lang.Object
com.compomics.software.autoupdater.FileDAO
com.compomics.software.autoupdater.GUIFileDAO
public class GUIFileDAO extends FileDAO
GUIFileDAO.
- Author:
- Davy Maddelein, Harald Barsnes
-
Constructor Summary
Constructors Constructor Description GUIFileDAO()
-
Method Summary
Modifier and Type Method Description boolean
createDesktopShortcut(MavenJarFile file, String iconName, String toolName, boolean deleteOldShortcut)
Creates a new Desktop Shortcut to the Maven jar file, atm windows only.File
getLocationToDownloadOnDisk(String targetDownloadFolder)
Try to find an at least somewhat sane location to download files to.Methods inherited from class com.compomics.software.autoupdater.FileDAO
addShortcutAtDeskTop, addShortcutAtDeskTop, getMavenJarFileFromFolderWithArtifactId, unGzipAndUntarFile, unzipFile, writeStreamToDisk
-
Constructor Details
-
GUIFileDAO
public GUIFileDAO()
-
-
Method Details
-
createDesktopShortcut
public boolean createDesktopShortcut(MavenJarFile file, String iconName, String toolName, boolean deleteOldShortcut) throws IOExceptionCreates a new Desktop Shortcut to the Maven jar file, atm windows only.- Specified by:
createDesktopShortcut
in classFileDAO
- Parameters:
file
- the Maven jarfile to make a shortcut toiconName
- the name of the icon file in the resources foldertoolName
- the name of the tool, e.g., PeptideShakerdeleteOldShortcut
- if previous shortcuts containing the Maven jar file artifact id should be removed- Returns:
- true id the shortcut was created (?)
- Throws:
IOException
- if an IOException occurs
-
getLocationToDownloadOnDisk
Try to find an at least somewhat sane location to download files to.- Specified by:
getLocationToDownloadOnDisk
in classFileDAO
- Parameters:
targetDownloadFolder
- first place to check if it is a possible download location- Returns:
- the folder to download in (in best case scenario this is the passed parameter targetDownloadFolder)
- Throws:
IOException
- if an IOException occurs
-