com.compomics.software.autoupdater
Class GUIFileDAO

java.lang.Object
  extended by com.compomics.software.autoupdater.FileDAO
      extended by com.compomics.software.autoupdater.GUIFileDAO

public class GUIFileDAO
extends FileDAO

GUIFileDAO.

Author:
Davy Maddelein

Constructor Summary
GUIFileDAO()
           
 
Method Summary
 boolean createDesktopShortcut(MavenJarFile file, String iconName, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GUIFileDAO

public GUIFileDAO()
Method Detail

createDesktopShortcut

public boolean createDesktopShortcut(MavenJarFile file,
                                     String iconName,
                                     boolean deleteOldShortcut)
                              throws IOException
Creates a new Desktop Shortcut to the maven jar file, atm windows only.

Specified by:
createDesktopShortcut in class FileDAO
Parameters:
file - the maven jarfile to make a shortcut to
iconName - the name of the icon file in the resources folder
deleteOldShortcut - if previous shortcuts containing the maven jar file artifact id should be removed
Returns:
true id the shortcut was created (?)
Throws:
IOException

getLocationToDownloadOnDisk

public File getLocationToDownloadOnDisk(String targetDownloadFolder)
                                 throws IOException
Try to find an at least somewhat sane location to download files to.

Specified by:
getLocationToDownloadOnDisk in class FileDAO
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


Copyright © 2013. All Rights Reserved.