org.jtheque.core.managers.update
Interface IUpdateManager

All Known Implementing Classes:
UpdateManager

public interface IUpdateManager

An update manager specification.

Author:
Baptiste Wicht

Method Summary
 void addUpdatableListener(UpdatableListener listener)
          Add an updatable listener.
 void displayVersionWhenLoaded(java.lang.Object object, javax.swing.JLabel label)
          Display the version of the object when we've loaded the version's file.
 java.util.List<org.jtheque.utils.bean.Version> getKernelVersions()
          Return the list of availables versions on internet.
 java.util.List<Updatable> getUpdatables()
          Return all the updatables.
 java.util.List<? extends org.jtheque.utils.bean.Version> getVersions(java.lang.Object object)
          Return all the versions of the object.
 InstallationResult install(java.lang.String versionFileURL)
          Install a module from a versions file.
 boolean isCurrentVersionUpToDate()
          Indicate if the currrent version is the last version.
 boolean isUpToDate(java.lang.Object object)
          Test if a object is up to date or if there is a most recent version on update site.
 void registerUpdatable(Updatable updatable)
          Register a new updatable.
 void removeUpdatableListener(UpdatableListener listener)
          Remove an updatable listener.
 void update(ModuleContainer module, org.jtheque.utils.bean.Version version)
          Update the module.
 void update(Updatable updatable, org.jtheque.utils.bean.Version versionToDownload)
          Update the updatable with specific version.
 void update(org.jtheque.utils.bean.Version versionToDownload)
          Update JTheque.
 void updateToMostRecentVersion(ModuleContainer module)
          Update the module to the most recent available version.
 void verifyingUpdate()
          Verify if there is a new update available and if the user want to update the application.
 

Method Detail

update

void update(org.jtheque.utils.bean.Version versionToDownload)
Update JTheque. This method search on internet the datas of the version we want to download and download all the files useful and update the local files. Last, we reboot the program.

Parameters:
versionToDownload - The version we want to download

update

void update(ModuleContainer module,
            org.jtheque.utils.bean.Version version)
Update the module.

Parameters:
module - The module to update.
version - The current version.

getKernelVersions

java.util.List<org.jtheque.utils.bean.Version> getKernelVersions()
Return the list of availables versions on internet.

Returns:
The availables versions

verifyingUpdate

void verifyingUpdate()
Verify if there is a new update available and if the user want to update the application.


isCurrentVersionUpToDate

boolean isCurrentVersionUpToDate()
Indicate if the currrent version is the last version.

Returns:
true if we've the last version, else false

displayVersionWhenLoaded

void displayVersionWhenLoaded(java.lang.Object object,
                              javax.swing.JLabel label)
Display the version of the object when we've loaded the version's file.

Parameters:
object - The object to get the versions.
label - The label to display the version to.

isUpToDate

boolean isUpToDate(java.lang.Object object)
Test if a object is up to date or if there is a most recent version on update site.

Parameters:
object - The object to test.
Returns:
true if the module is up to date else false.

getVersions

java.util.List<? extends org.jtheque.utils.bean.Version> getVersions(java.lang.Object object)
Return all the versions of the object.

Parameters:
object - The object to get the versions for.
Returns:
A List containing all the versions of the updatable.

install

InstallationResult install(java.lang.String versionFileURL)
Install a module from a versions file.

Parameters:
versionFileURL - The URL to the version file.
Returns:
The result of the installation.

registerUpdatable

void registerUpdatable(Updatable updatable)
Register a new updatable.

Parameters:
updatable - The updatable to register.

update

void update(Updatable updatable,
            org.jtheque.utils.bean.Version versionToDownload)
Update the updatable with specific version.

Parameters:
updatable - The updatable to update.
versionToDownload - The version to apply.

getUpdatables

java.util.List<Updatable> getUpdatables()
Return all the updatables.

Returns:
A List containing all the updatables

addUpdatableListener

void addUpdatableListener(UpdatableListener listener)
Add an updatable listener.

Parameters:
listener - The listener to add.

removeUpdatableListener

void removeUpdatableListener(UpdatableListener listener)
Remove an updatable listener.

Parameters:
listener - The updatatable listener to remove.

updateToMostRecentVersion

void updateToMostRecentVersion(ModuleContainer module)
Update the module to the most recent available version.

Parameters:
module - The module to update.


Copyright © 2009 JTheque. All Rights Reserved.