de.willuhn.boot.Bootable
public class RepositoryService
extends java.lang.Object
implements de.willuhn.boot.Bootable
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
SYSTEM_REPOSITORY |
Die URL des System-Repository.
|
static java.lang.String[] |
WELL_KNOWN |
Liste von bekannten Repositories, die wir mit ausliefern, die der User aber wieder loeschen kann
|
Constructor | Description |
---|---|
RepositoryService() |
Modifier and Type | Method | Description |
---|---|---|
void |
addRepository(java.net.URL url) |
Fuegt ein neues Online-Repository hinzu.
|
void |
checkSignature(PluginData plugin,
java.io.File archive,
java.io.File sig) |
Prueft die Signatur eines Plugins.
|
boolean |
contains(java.net.URL url) |
Prueft, ob die angegebene URL als Repository hinterlegt ist.
|
java.lang.Class<de.willuhn.boot.Bootable>[] |
depends() |
|
void |
downloadMulti(PluginData... plugins) |
Laedt mehrere Plugins von ggf.
|
java.util.List<java.net.URL> |
getRepositories() |
Liefert eine Liste mit URLs zu aktiven Online-Repositories mit Plugins.
|
java.util.List<java.net.URL> |
getRepositories(boolean all) |
Liefert eine Liste mit URLs zu Online-Repositories mit Plugins.
|
void |
init(de.willuhn.boot.BootLoader arg0,
de.willuhn.boot.Bootable arg1) |
|
boolean |
isEnabled(java.net.URL url) |
Liefert true, wenn das Repository aktiv ist und verwendet werden soll.
|
Repository |
open(java.net.URL url) |
Oeffnet ein Repository.
|
void |
removeRepository(java.net.URL url) |
Entfernt ein Online-Repository.
|
ResolverResult |
resolve(PluginData plugin) |
Loest die zu installierenden Abhaengigkeiten fuer das Plugin auf.
|
void |
setEnabled(java.net.URL url,
boolean enabled) |
Markiert ein Repository als aktiv/inaktiv.
|
void |
shutdown() |
public static final java.lang.String SYSTEM_REPOSITORY
public static final java.lang.String[] WELL_KNOWN
public java.lang.Class<de.willuhn.boot.Bootable>[] depends()
depends
in interface de.willuhn.boot.Bootable
Bootable.depends()
public void init(de.willuhn.boot.BootLoader arg0, de.willuhn.boot.Bootable arg1) throws de.willuhn.boot.SkipServiceException
init
in interface de.willuhn.boot.Bootable
de.willuhn.boot.SkipServiceException
Bootable.init(de.willuhn.boot.BootLoader, de.willuhn.boot.Bootable)
public void shutdown()
shutdown
in interface de.willuhn.boot.Bootable
Bootable.shutdown()
public java.util.List<java.net.URL> getRepositories(boolean all)
all
- true, wenn auch die inaktiven Repositories geliefert werden sollen.public java.util.List<java.net.URL> getRepositories()
public ResolverResult resolve(PluginData plugin) throws de.willuhn.util.ApplicationException
plugin
- das zu installierende Plugin.de.willuhn.util.ApplicationException
public void downloadMulti(PluginData... plugins) throws de.willuhn.util.ApplicationException
plugins
- die Liste der Plugins.de.willuhn.util.ApplicationException
public void checkSignature(PluginData plugin, java.io.File archive, java.io.File sig) throws java.lang.Exception
plugin
- das Plugin.archive
- Datei, dessen Signatur gecheckt werden soll.sig
- die Signatur.java.lang.Exception
public Repository open(java.net.URL url) throws de.willuhn.util.ApplicationException
url
- URL zum Repository.de.willuhn.util.ApplicationException
public boolean isEnabled(java.net.URL url)
url
- die URL.public void setEnabled(java.net.URL url, boolean enabled)
url
- die URL.enabled
- true, wenn das Repository verwendet werden soll.public void addRepository(java.net.URL url) throws de.willuhn.util.ApplicationException
url
- URL des Online-Repositories.de.willuhn.util.ApplicationException
public void removeRepository(java.net.URL url) throws de.willuhn.util.ApplicationException
url
- URL des Online-Repositories.de.willuhn.util.ApplicationException
public boolean contains(java.net.URL url)
url
- die zu pruefende URL