public class ApplicationUpdaterActionUpdate extends AbstractApplicationUpdaterAction
| Modifier and Type | Field and Description |
|---|---|
protected ApplicationUpdaterCallback |
callback |
protected File |
destDir |
protected DownloadMonitor |
downloadMonitor |
AUTHENTICATION_KEY, config, currentDir, HTTP_PROXY, URL_KEY, VERSION_KEY, vfsPropertiesUrl| Constructor and Description |
|---|
ApplicationUpdaterActionUpdate(org.nuiton.config.ApplicationConfig config,
String vfsPropertiesUrl,
File currentDir,
File destDir,
DownloadMonitor downloadMonitor,
ApplicationUpdaterCallback callback) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doUpdate(org.apache.commons.vfs2.FileSystemOptions vfsConfig,
ApplicationInfo info)
Decompresse le zip qui est pointer par l'url dans le repertoire
specifie, et ajoute le fichier contenant la version de l'application.
|
protected File |
downloadUpdate(org.apache.commons.vfs2.FileSystemOptions vfsConfig,
ApplicationInfo info,
String srcPath)
Télécharge une archive dans un fichier temporaraire.
|
protected void |
explodeUpdate(org.apache.commons.vfs2.FileSystemOptions vfsConfig,
ApplicationInfo info,
String archiveType,
File source,
File target)
Recopie le contenu du répertoire de l'archive dans le répertoire
target. |
protected void |
onUpdateError(String app,
ApplicationInfo info,
Map<String,Exception> appUpdateError,
Exception eee) |
void |
run()
Recupere le fichier properties contenant les informations de mise a jour
liste les applications et leur version actuelle
pour chaque application a mettre a jour recupere le zip et le decompresse
Si callback existe envoi les messages necessaires
|
getApplicationName, getCurrentVersion, getUpdaterConfig, getVersions, getVFSConfig, toVfsURLprotected ApplicationUpdaterCallback callback
protected DownloadMonitor downloadMonitor
protected File destDir
public ApplicationUpdaterActionUpdate(org.nuiton.config.ApplicationConfig config,
String vfsPropertiesUrl,
File currentDir,
File destDir,
DownloadMonitor downloadMonitor,
ApplicationUpdaterCallback callback)
public void run()
protected void onUpdateError(String app, ApplicationInfo info, Map<String,Exception> appUpdateError, Exception eee)
protected void doUpdate(org.apache.commons.vfs2.FileSystemOptions vfsConfig,
ApplicationInfo info)
throws Exception
vfsConfig - le proxy a utiliser pour la connexion a l'urlinfo - information sur l'application a mettre a jourException - pour toute erreur pendant la mise à jourprotected File downloadUpdate(org.apache.commons.vfs2.FileSystemOptions vfsConfig, ApplicationInfo info, String srcPath) throws IOException
vfsConfig - configuration of vsf (info - informations sur l'applicationsrcPath - source path de la forme vfs2 ex:"zip:http://www.nuiton.org/attachments/download/830/nuiton-utils-2.6.5-deps.zip"IOException - pour toute erreur pendant le téléchargementprotected void explodeUpdate(org.apache.commons.vfs2.FileSystemOptions vfsConfig,
ApplicationInfo info,
String archiveType,
File source,
File target)
throws org.apache.commons.vfs2.FileSystemException,
UpdateInvalidArchiveLayoutException
target.
vfsConfig - la configuration vsfinfo - informations sur l'applicationarchiveType - le type de l'archivesource - l'archive à décompressertarget - le répertoire cibleorg.apache.commons.vfs2.FileSystemException - si une erreur survient lors des opérations d'IOUpdateInvalidArchiveLayoutException - si l'archive n'a pas le bon formatCopyright © 2013–2016 CodeLutin. All rights reserved.