public final class PluginManager extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
install(Set<String> codenamebases,
Object... alternativeOptions)
Open standard dialog for installing modules including declared dependencies.
|
static Object |
installSingle(String codenamebase,
String displayName,
Object... alternativeOptions)
Open standard dialog for installing a module including declared dependencies.
|
static boolean |
openInstallWizard(OperationContainer<InstallSupport> container)
Open standard dialog for installing set of modules.
|
static void |
openInstallWizard(OperationContainer<InstallSupport> container,
boolean runInBackground)
Open standard dialog for installing set of modules.
|
public static boolean openInstallWizard(OperationContainer<InstallSupport> container)
Single module installation can be handled easily by
installSingle(java.lang.String, java.lang.String, java.lang.Object[])
.
OperationContainer
container = OperationContainer.createForInstall(); for ( UpdateUnit
u :UpdateManager.getDefault().getUpdateUnits(UpdateManager.TYPE.MODULE)
) { if (u.getCodeName().matches("org.my.favorite.module")) { if (u.getAvailableUpdates().isEmpty()) { continue; } container.add(u.getAvailableUpdates().get(0)); } } PluginManager.openInstallWizard(container);
container
- the container with list of modules for installinstallSingle(java.lang.String, java.lang.String, java.lang.Object[])
,
install(java.util.Set, java.lang.Object[])
public static void openInstallWizard(OperationContainer<InstallSupport> container, boolean runInBackground)
container
- the container with list of modules for installrunInBackground
- if true
then installation run in the background after license acceptance@CheckForNull public static Object installSingle(@NonNull String codenamebase, @NonNull String displayName, @NonNull Object... alternativeOptions)
codenamebase
- the codenamebase of module to installdisplayName
- the display name of the modulealternativeOptions
- alternative options possibly displayed in error
dialog user may choose if it is not possible to install the plugin;
if chosen the option is return value of this methodnull
if the module has been successfully installed
and/or activated, otherwise it returns the options user has
selected in problem dialog, typically NotifyDescriptor.DEFAULT_OPTION
(on esc), NotifyDescriptor.CANCEL_OPTION
or
any of alternativeOptions
.install(java.util.Set, java.lang.Object[])
@CheckForNull public static Object install(@NonNull Set<String> codenamebases, @NonNull Object... alternativeOptions)
codenamebases
- the codenamebases of modules to install; must contain at least
one codenamebasealternativeOptions
- alternative options possibly displayed in error
dialog user may choose if it is not possible to install the plugin;
if chosen the option is return value of this methodnull
if all the requested modules have been successfully
installed and/or activated, otherwise it returns the options user has
selected in problem dialog, typically NotifyDescriptor.DEFAULT_OPTION
(on esc), NotifyDescriptor.CANCEL_OPTION
or
any of alternativeOptions
.IllegalArgumentException
- if the codenamebases
is emptyBuilt on June 4 2024. | Copyright © 2017-2024 Apache Software Foundation. All Rights Reserved.