Package de.willuhn.jameica.services
Class UpdateService
- java.lang.Object
-
- de.willuhn.jameica.services.UpdateService
-
- All Implemented Interfaces:
de.willuhn.boot.Bootable
public class UpdateService extends java.lang.Object implements de.willuhn.boot.Bootable
Service, der regelmaessig prueft, ob Updates fuer installierte Plugins in den Repositories liegen.
-
-
Constructor Summary
Constructors Constructor Description UpdateService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<de.willuhn.boot.Bootable>[]
depends()
java.util.TreeMap<java.lang.String,java.util.List<PluginData>>
findUpdates(de.willuhn.util.ProgressMonitor monitor)
Sucht nach Updates fuer die installierten Plugins und liefert sie zurueck.boolean
getUpdateCheck()
Prueft, ob ueberhaupt regelmaessig nach Updates gesucht werden soll.boolean
getUpdateInstall()
Prueft, ob Updates automatisch installiert werden sollen oder nur eine Benachrichtigung erfolgen soll.int
getUpdateInterval()
Liefert das Intervall (in Tagen), in denen nach Updates gesucht werden soll.void
init(de.willuhn.boot.BootLoader arg0, de.willuhn.boot.Bootable arg1)
void
setUpdateCheck(boolean b)
Legt fest, ob ueberhaupt regelmaessig nach Updates gesucht werden soll.void
setUpdateInstall(boolean b)
Legt fest, ob Updates automatisch installiert werden sollen oder nur eine Benachrichtigung erfolgen soll.void
setUpdateInterval(int days)
Speichert das Intervall (in Tagen), in denen nach Updates gesucht werden soll.void
shutdown()
-
-
-
Method Detail
-
depends
public java.lang.Class<de.willuhn.boot.Bootable>[] depends()
- Specified by:
depends
in interfacede.willuhn.boot.Bootable
- See Also:
Bootable.depends()
-
init
public void init(de.willuhn.boot.BootLoader arg0, de.willuhn.boot.Bootable arg1) throws de.willuhn.boot.SkipServiceException
- Specified by:
init
in interfacede.willuhn.boot.Bootable
- Throws:
de.willuhn.boot.SkipServiceException
- See Also:
Bootable.init(de.willuhn.boot.BootLoader, de.willuhn.boot.Bootable)
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfacede.willuhn.boot.Bootable
- See Also:
Bootable.shutdown()
-
getUpdateInterval
public int getUpdateInterval()
Liefert das Intervall (in Tagen), in denen nach Updates gesucht werden soll.- Returns:
- Intervall in Tagen.
-
setUpdateInterval
public void setUpdateInterval(int days)
Speichert das Intervall (in Tagen), in denen nach Updates gesucht werden soll.- Parameters:
days
- Intervall in Tagen.
-
getUpdateCheck
public boolean getUpdateCheck()
Prueft, ob ueberhaupt regelmaessig nach Updates gesucht werden soll.- Returns:
- true, wenn regelmaessig nach Updates gesucht werden soll.
-
setUpdateCheck
public void setUpdateCheck(boolean b)
Legt fest, ob ueberhaupt regelmaessig nach Updates gesucht werden soll.- Parameters:
b
- true, wenn regelmaessig nach Updates gesucht werden soll.
-
getUpdateInstall
public boolean getUpdateInstall()
Prueft, ob Updates automatisch installiert werden sollen oder nur eine Benachrichtigung erfolgen soll.- Returns:
- true, wenn automatisch installiert werden soll.
-
setUpdateInstall
public void setUpdateInstall(boolean b)
Legt fest, ob Updates automatisch installiert werden sollen oder nur eine Benachrichtigung erfolgen soll.- Parameters:
b
- true, wenn automatisch installiert werden soll.
-
findUpdates
public java.util.TreeMap<java.lang.String,java.util.List<PluginData>> findUpdates(de.willuhn.util.ProgressMonitor monitor) throws de.willuhn.util.ApplicationException
Sucht nach Updates fuer die installierten Plugins und liefert sie zurueck.- Parameters:
monitor
- optionale Angabe eines Progress-Monitor, in dem der Pruef-Fortschritt angezeigt wird.- Returns:
- die gefundenen Updates oder NULL, wenn keine Updates gefunden wurden.
- Throws:
de.willuhn.util.ApplicationException
-
-