|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jtheque.core.managers.AbstractManager
org.jtheque.core.managers.update.UpdateManager
public final class UpdateManager
Manage the update of the application. This class can go on internet to verify if a more recent version of JTheque is available and download one new version if there is one.
| Constructor Summary | |
|---|---|
UpdateManager()
Private constructor, the instance of the class is accessible by getInstance() method. |
|
| Method Summary | |
|---|---|
void |
addUpdatableListener(UpdatableListener listener)
Add an updatable listener. |
Collection<org.jtheque.utils.bean.Version> |
getKernelVersions()
Return the list of available versions on internet. |
org.jtheque.utils.bean.Version |
getMostRecentVersion(Object object)
Return the most recent version of the object. |
Collection<Updatable> |
getUpdatables()
Return all the updatable. |
Collection<org.jtheque.utils.bean.Version> |
getVersions(Object object)
Return all the versions of the object. |
void |
init()
Init the manager. |
InstallationResult |
install(String versionFileURL)
Install a module from a versions file. |
boolean |
isCurrentVersionUpToDate()
Indicate if the current version is the last version. |
boolean |
isUpToDate(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 |
setVersionsLoader(IVersionsLoader versionsLoader)
Set the versions loader. |
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. |
| Methods inherited from class org.jtheque.core.managers.AbstractManager |
|---|
close, getErrorManager, getListeners, getLogger, getManager, getMessage, getMessage, getStates, preInit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UpdateManager()
| Method Detail |
|---|
public void init()
IManager
init in interface IManagerinit in class AbstractManager
public void update(Updatable updatable,
org.jtheque.utils.bean.Version versionToDownload)
IUpdateManager
update in interface IUpdateManagerupdatable - The updatable to update.versionToDownload - The version to apply.public void update(org.jtheque.utils.bean.Version versionToDownload)
IUpdateManager
update in interface IUpdateManagerversionToDownload - The version we want to downloadpublic InstallationResult install(String versionFileURL)
IUpdateManager
install in interface IUpdateManagerversionFileURL - The URL to the version file.
public void update(ModuleContainer module,
org.jtheque.utils.bean.Version version)
IUpdateManager
update in interface IUpdateManagermodule - The module to update.version - The current version.public Collection<org.jtheque.utils.bean.Version> getKernelVersions()
IUpdateManager
getKernelVersions in interface IUpdateManagerpublic void verifyingUpdate()
IUpdateManager
verifyingUpdate in interface IUpdateManagerpublic boolean isCurrentVersionUpToDate()
IUpdateManager
isCurrentVersionUpToDate in interface IUpdateManagerpublic boolean isUpToDate(Object object)
IUpdateManager
isUpToDate in interface IUpdateManagerobject - The object to test.
public void updateToMostRecentVersion(ModuleContainer module)
IUpdateManager
updateToMostRecentVersion in interface IUpdateManagermodule - The module to update.public org.jtheque.utils.bean.Version getMostRecentVersion(Object object)
IUpdateManager
getMostRecentVersion in interface IUpdateManagerobject - The object. It can be the Core, a module or an updatable.
public Collection<org.jtheque.utils.bean.Version> getVersions(Object object)
IUpdateManager
getVersions in interface IUpdateManagerobject - The object to get the versions for.
public void registerUpdatable(Updatable updatable)
IUpdateManager
registerUpdatable in interface IUpdateManagerupdatable - The updatable to register.public Collection<Updatable> getUpdatables()
IUpdateManager
getUpdatables in interface IUpdateManagerpublic void addUpdatableListener(UpdatableListener listener)
IUpdateManager
addUpdatableListener in interface IUpdateManagerlistener - The listener to add.public void removeUpdatableListener(UpdatableListener listener)
IUpdateManager
removeUpdatableListener in interface IUpdateManagerlistener - The updatable listener to remove.public void setVersionsLoader(IVersionsLoader versionsLoader)
versionsLoader - The versions loader implementation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||