Support - the type of support for performing chosen operation like
OperationSupport or InstallSupportpublic final class OperationContainer<Support>
extends java.lang.Object
UpdateEelement
(like install, uninstall, update, enable, disable), provides checks whether
chosen operation is allowed (e.g. already installed plugin cannot be scheduled for install again),
provides information which additional plugins are
required and so on.
Typical scenario how to use:
OperationContainer
for chosen operation: createForInstall(), createForUninstall(),
createForUpdate(), createForEnable(),createForDisable()UpdateElement (see add(java.util.Collection<org.netbeans.api.autoupdate.UpdateElement>))UpdateElement are needed
(OperationContainer.OperationInfo.getRequiredElements()),
if so then these required instances should be also addedOperationContainer.OperationInfo.getBrokenDependencies()) getSupport() to get either InstallSupport or OperationSupport
that can be used for performing operationUpdateElement element = ...; OperationContainer<OperationSupport> container = createForDirectInstall(); OperationInfo<Support> info = container.add(element); Set<UpdateElement> required = info.getRequiredElements(); container.add(required); OperationSupport support = container.getSupport(); support.doOperation(null);
| Modifier and Type | Class | Description |
|---|---|---|
static class |
OperationContainer.OperationInfo<Support> |
Provides additional information
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(java.util.Collection<UpdateElement> elems) |
Adds all
elems |
void |
add(java.util.Map<UpdateUnit,UpdateElement> elems) |
Adds all
elems |
OperationContainer.OperationInfo<Support> |
add(UpdateElement updateElement) |
Adds
updateElement |
OperationContainer.OperationInfo<Support> |
add(UpdateUnit updateUnit,
UpdateElement updateElement) |
Adds
updateElement |
boolean |
canBeAdded(UpdateUnit updateUnit,
UpdateElement updateElement) |
Check if
updateElement can be added (add(java.util.Collection<org.netbeans.api.autoupdate.UpdateElement>)) |
boolean |
contains(UpdateElement updateElement) |
|
static OperationContainer<OperationSupport> |
createForCustomInstallComponent() |
The factory method to construct instance of
OperationContainer for installation of custom component |
static OperationContainer<OperationSupport> |
createForCustomUninstallComponent() |
The factory method to construct instance of
OperationContainer for uninstallation of custom component |
static OperationContainer<OperationSupport> |
createForDirectDisable() |
The factory method to construct instance of
OperationContainer for disable operation |
static OperationContainer<OperationSupport> |
createForDirectInstall() |
The factory method to construct instance of
OperationContainer for install operation |
static OperationContainer<OperationSupport> |
createForDirectUninstall() |
The factory method to construct instance of
OperationContainer for uninstall operation |
static OperationContainer<OperationSupport> |
createForDirectUpdate() |
The factory method to construct instance of
OperationContainer for update operation |
static OperationContainer<OperationSupport> |
createForDisable() |
The factory method to construct instance of
OperationContainer for disable operation |
static OperationContainer<OperationSupport> |
createForEnable() |
The factory method to construct instance of
OperationContainer for enable operation |
static OperationContainer<InstallSupport> |
createForInstall() |
The factory method to construct instance of
OperationContainer for install operation |
static OperationContainer<InstallSupport> |
createForInternalUpdate() |
The factory method to construct instance of
OperationContainer for internal update operation |
static OperationContainer<OperationSupport> |
createForUninstall() |
The factory method to construct instance of
OperationContainer for uninstall operation |
static OperationContainer<InstallSupport> |
createForUpdate() |
The factory method to construct instance of
OperationContainer for update operation |
Support |
getSupport() |
|
java.util.List<OperationContainer.OperationInfo<Support>> |
listAll() |
|
java.util.List<OperationContainer.OperationInfo<Support>> |
listInvalid() |
|
void |
remove(java.util.Collection<UpdateElement> elems) |
Removes all
elems |
void |
remove(OperationContainer.OperationInfo<Support> op) |
Removes
op |
boolean |
remove(UpdateElement updateElement) |
Removes
updateElement |
void |
removeAll() |
Removes all content
|
java.lang.String |
toString() |
public static OperationContainer<InstallSupport> createForInstall()
OperationContainer for install operationOperationContainer for install operationpublic static OperationContainer<InstallSupport> createForInternalUpdate()
OperationContainer for internal update operationOperationContainer for internal update operationpublic static OperationContainer<OperationSupport> createForDirectInstall()
OperationContainer for install operationOperationContainer for install operationpublic static OperationContainer<InstallSupport> createForUpdate()
OperationContainer for update operationOperationContainer for update operationpublic static OperationContainer<OperationSupport> createForDirectUpdate()
OperationContainer for update operationOperationContainer for update operationpublic static OperationContainer<OperationSupport> createForUninstall()
OperationContainer for uninstall operationOperationContainer for uninstall operationpublic static OperationContainer<OperationSupport> createForDirectUninstall()
OperationContainer for uninstall operationOperationContainer for uninstall operationpublic static OperationContainer<OperationSupport> createForEnable()
OperationContainer for enable operationOperationContainer for enable operationpublic static OperationContainer<OperationSupport> createForDisable()
OperationContainer for disable operationOperationContainer for disable operationpublic static OperationContainer<OperationSupport> createForDirectDisable()
OperationContainer for disable operationOperationContainer for disable operationpublic static OperationContainer<OperationSupport> createForCustomInstallComponent()
OperationContainer for installation of custom componentOperationContainer for installation of custom componentpublic static OperationContainer<OperationSupport> createForCustomUninstallComponent()
OperationContainer for uninstallation of custom componentOperationContainer for uninstallation of custom componentpublic Support getSupport()
OperationSupport or InstallSupport depending on type parameter of OperationContainer<Support> or
null if the OperationContainer is empty or contains any invalid elementslistAll(),
See the difference between and for examplepublic boolean canBeAdded(UpdateUnit updateUnit, UpdateElement updateElement)
updateElement can be added (add(java.util.Collection<org.netbeans.api.autoupdate.UpdateElement>))updateUnit - updateElement - to be inserted.updateElement is allowedpublic void add(java.util.Collection<UpdateElement> elems)
elemselems - to be inserted.public void add(java.util.Map<UpdateUnit,UpdateElement> elems)
elemselems - to be inserted.public OperationContainer.OperationInfo<Support> add(UpdateUnit updateUnit, UpdateElement updateElement)
updateElementupdateUnit - updateElement - OperationContainer.OperationInfo<Support> or
null if the UpdateElement is already present in the containerpublic OperationContainer.OperationInfo<Support> add(UpdateElement updateElement)
updateElementupdateElement - OperationContainer.OperationInfo<Support> or
null if the UpdateElement is already present in the containerpublic void remove(java.util.Collection<UpdateElement> elems)
elemselems - public boolean remove(UpdateElement updateElement)
updateElementupdateElement - public boolean contains(UpdateElement updateElement)
updateElement - OperationContainer
contains the specified updateElement.public java.util.List<OperationContainer.OperationInfo<Support>> listAll()
OperationContainer.OperationInfo<Support> from this
instance of OperationContainerpublic java.util.List<OperationContainer.OperationInfo<Support>> listInvalid()
OperationContainer.OperationInfo<Support> from this
instance of OperationContainerpublic void remove(OperationContainer.OperationInfo<Support> op)
opop - public void removeAll()
public java.lang.String toString()
toString in class java.lang.ObjectBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.