public final class AddOnInstaller extends Object
Extension
s, Plugin
s, PassiveScanner
s and files).Extension
,
Plugin
,
PassiveScanner
Modifier and Type | Method and Description |
---|---|
static void |
install(AddOnClassLoader addOnClassLoader,
AddOn addOn)
Installs all the (dynamically installable) components (
Extension s, Plugin s,
PassiveScanner s and files) of the given addOn . |
static void |
installAddOnExtension(AddOn addOn,
Extension ext) |
static void |
installMissingAddOnFiles(AddOnClassLoader addOnClassLoader,
AddOn addOn)
Installs all the missing files declared by the given
addOn . |
static boolean |
softUninstall(AddOn addOn,
AddOnUninstallationProgressCallback callback)
Uninstalls Java classes (
Extension s, Plugin s, PassiveScanner s) of the
given addOn . |
static boolean |
uninstall(AddOn addOn,
AddOnUninstallationProgressCallback callback)
Deprecated.
(2.8.0) Use
uninstall(AddOn, AddOnUninstallationProgressCallback, Set)
instead. |
static boolean |
uninstall(AddOn addOn,
AddOnUninstallationProgressCallback callback,
Set<AddOn> installedAddOns)
Uninstalls all the (dynamically installable) components (
Extension s, Plugin s,
PassiveScanner s and files) of the given addOn . |
protected static boolean |
uninstallAddOnExtension(AddOn addOn,
Extension extension,
AddOnUninstallationProgressCallback callback)
Uninstalls the given extension.
|
static boolean |
uninstallAddOnFiles(AddOn addOn,
AddOnUninstallationProgressCallback callback)
Deprecated.
(2.8.0) Use
uninstallAddOnFiles(AddOn,
AddOnUninstallationProgressCallback, Set) instead. |
static boolean |
uninstallAddOnFiles(AddOn addOn,
AddOnUninstallationProgressCallback callback,
Set<AddOn> installedAddOns)
Uninstalls the files of the given add-on.
|
static void |
updateAddOnFiles(AddOnClassLoader addOnClassLoader,
AddOn addOn)
Updates the files declared by the given
addOn . |
public static void install(AddOnClassLoader addOnClassLoader, AddOn addOn)
Extension
s, Plugin
s,
PassiveScanner
s and files) of the given addOn
.
It's also responsible to notify the installed extensions when the installation has
finished by calling the method Extension#postInstall()
.
The components are installed in the following order:
ResourceBundle
;
addOnClassLoader
- the class loader of the given addOn
addOn
- the add-on that will be installedExtension
,
PassiveScanner
,
Plugin
,
Extension.postInstall()
@Deprecated public static boolean uninstall(AddOn addOn, AddOnUninstallationProgressCallback callback)
uninstall(AddOn, AddOnUninstallationProgressCallback, Set)
instead.Extension
s, Plugin
s,
PassiveScanner
s and files) of the given addOn
.
The components are uninstalled in the following order (inverse to installation):
ResourceBundle
;
addOn
- the add-on that will be uninstalledcallback
- the callback that will be notified of the progress of the uninstallationtrue
if the add-on was uninstalled without errors, false
otherwise.IllegalArgumentException
- if addOn
or callback
are null.softUninstall(AddOn, AddOnUninstallationProgressCallback)
,
Extension
,
PassiveScanner
,
Plugin
public static boolean uninstall(AddOn addOn, AddOnUninstallationProgressCallback callback, Set<AddOn> installedAddOns)
Extension
s, Plugin
s,
PassiveScanner
s and files) of the given addOn
.
The components are uninstalled in the following order (inverse to installation):
ResourceBundle
;
addOn
- the add-on that will be uninstalled.callback
- the callback that will be notified of the progress of the uninstallation.installedAddOns
- the add-ons currently installed.true
if the add-on was uninstalled without errors, false
otherwise.IllegalArgumentException
- if addOn
or callback
are null.softUninstall(AddOn, AddOnUninstallationProgressCallback)
,
Extension
,
PassiveScanner
,
Plugin
public static boolean softUninstall(AddOn addOn, AddOnUninstallationProgressCallback callback)
Extension
s, Plugin
s, PassiveScanner
s) of the
given addOn
. Should be called when the add-on must be temporarily uninstalled for an
update of a dependency.
The Java classes are uninstalled in the following order (inverse to installation):
addOn
- the add-on that will be softly uninstalledcallback
- the callback that will be notified of the progress of the uninstallationtrue
if the add-on was uninstalled without errors, false
otherwise.Extension
,
PassiveScanner
,
Plugin
protected static boolean uninstallAddOnExtension(AddOn addOn, Extension extension, AddOnUninstallationProgressCallback callback)
addOn
- the add-on that has the extensionextension
- the extension that should be uninstalledcallback
- the callback that will be notified of the progress of the uninstallationtrue
if the extension was uninstalled without errors, false
otherwise.Extension
public static void installMissingAddOnFiles(AddOnClassLoader addOnClassLoader, AddOn addOn)
addOn
.addOnClassLoader
- the class loader of the given addOn
addOn
- the add-on that will have the missing declared files installedpublic static void updateAddOnFiles(AddOnClassLoader addOnClassLoader, AddOn addOn)
addOn
.addOnClassLoader
- the class loader of the given addOn
.addOn
- the add-on that will have the declared files updated.@Deprecated public static boolean uninstallAddOnFiles(AddOn addOn, AddOnUninstallationProgressCallback callback)
uninstallAddOnFiles(AddOn,
AddOnUninstallationProgressCallback, Set)
instead.addOn
- the add-oncallback
- the callback for notification of progresstrue
if no error occurred while removing the files, false
otherwise.IllegalArgumentException
- if addOn
or callback
are null.public static boolean uninstallAddOnFiles(AddOn addOn, AddOnUninstallationProgressCallback callback, Set<AddOn> installedAddOns)
Note: Files that are in use by other installed add-ons are not uninstalled.
addOn
- the add-on whose files should be uninstalled.callback
- the callback for notification of progress.installedAddOns
- the add-ons currently installed (to check if the files can be safely
uninstalled).true
if no error occurred while removing the files, false
otherwise.IllegalArgumentException
- if addOn
or callback
are null.