|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 avaible 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. |
void |
close()
Close the manager. |
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<org.jtheque.utils.bean.Version> |
getVersions(java.lang.Object object)
Return all the versions of the object. |
void |
init()
Init the manager. |
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 |
preInit()
Pre-init the manager. |
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 |
---|
getErrors, getListeners, getLogger, getMessage, getMessage, getStates |
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 preInit()
IManager
preInit
in interface IManager
public void close()
IManager
close
in interface IManager
public void init()
IManager
init
in interface IManager
public void update(Updatable updatable, org.jtheque.utils.bean.Version versionToDownload)
IUpdateManager
update
in interface IUpdateManager
updatable
- The updatable to update.versionToDownload
- The version to apply.public void update(org.jtheque.utils.bean.Version versionToDownload)
IUpdateManager
update
in interface IUpdateManager
versionToDownload
- The version we want to downloadpublic InstallationResult install(java.lang.String versionFileURL)
IUpdateManager
install
in interface IUpdateManager
versionFileURL
- The URL to the version file.
public void update(ModuleContainer module, org.jtheque.utils.bean.Version version)
IUpdateManager
update
in interface IUpdateManager
module
- The module to update.version
- The current version.public java.util.List<org.jtheque.utils.bean.Version> getKernelVersions()
IUpdateManager
getKernelVersions
in interface IUpdateManager
public void verifyingUpdate()
IUpdateManager
verifyingUpdate
in interface IUpdateManager
public boolean isCurrentVersionUpToDate()
IUpdateManager
isCurrentVersionUpToDate
in interface IUpdateManager
public void displayVersionWhenLoaded(java.lang.Object object, javax.swing.JLabel label)
IUpdateManager
displayVersionWhenLoaded
in interface IUpdateManager
object
- The object to get the versions.label
- The label to display the version to.public boolean isUpToDate(java.lang.Object object)
IUpdateManager
isUpToDate
in interface IUpdateManager
object
- The object to test.
public void updateToMostRecentVersion(ModuleContainer module)
IUpdateManager
updateToMostRecentVersion
in interface IUpdateManager
module
- The module to update.public java.util.List<org.jtheque.utils.bean.Version> getVersions(java.lang.Object object)
IUpdateManager
getVersions
in interface IUpdateManager
object
- The object to get the versions for.
public void registerUpdatable(Updatable updatable)
IUpdateManager
registerUpdatable
in interface IUpdateManager
updatable
- The updatable to register.public java.util.List<Updatable> getUpdatables()
IUpdateManager
getUpdatables
in interface IUpdateManager
public void addUpdatableListener(UpdatableListener listener)
IUpdateManager
addUpdatableListener
in interface IUpdateManager
listener
- The listener to add.public void removeUpdatableListener(UpdatableListener listener)
IUpdateManager
removeUpdatableListener
in interface IUpdateManager
listener
- The updatatable 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 |