public final class PluginManager
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.Object |
install(java.util.Set<java.lang.String> codenamebases,
java.lang.Object... alternativeOptions) |
Open standard dialog for installing modules including declared dependencies.
|
static java.lang.Object |
installSingle(java.lang.String codenamebase,
java.lang.String displayName,
java.lang.Object... alternativeOptions) |
Open standard dialog for installing a module including declared dependencies.
|
static boolean |
openInstallWizard(org.netbeans.api.autoupdate.OperationContainer<org.netbeans.api.autoupdate.InstallSupport> container) |
Open standard dialog for installing set of modules.
|
static void |
openInstallWizard(org.netbeans.api.autoupdate.OperationContainer<org.netbeans.api.autoupdate.InstallSupport> container,
boolean runInBackground) |
Open standard dialog for installing set of modules.
|
public static boolean openInstallWizard(org.netbeans.api.autoupdate.OperationContainer<org.netbeans.api.autoupdate.InstallSupport> container)
Single module installation can be handled easily by
installSingle(java.lang.String, java.lang.String, java.lang.Object[]).
OperationContainercontainer = OperationContainer.createForInstall(); for ( UpdateUnitu :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(org.netbeans.api.autoupdate.OperationContainer<org.netbeans.api.autoupdate.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 java.lang.Object installSingle(@NonNull
java.lang.String codenamebase,
@NonNull
java.lang.String displayName,
@NonNull
java.lang.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 java.lang.Object install(@NonNull
java.util.Set<java.lang.String> codenamebases,
@NonNull
java.lang.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.java.lang.IllegalArgumentException - if the codenamebases is emptyBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.