|
org.netbeans.modules.autoupdate.services 1.16.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.autoupdate.OperationContainer<Support>
Support
- the type of support for performing chosen operation like
OperationSupport
or InstallSupport
public final class OperationContainer<Support>
An object that keeps requests for operations upon instances of 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 additonal 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)
)UpdateElement
are needed
(OperationContainer.OperationInfo.getRequiredElements()
),
if so then these requiered 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);
Nested Class Summary | |
---|---|
static class |
OperationContainer.OperationInfo<Support>
Provides additional information |
Method Summary | |
---|---|
void |
add(Collection<UpdateElement> elems)
Adds all elems |
void |
add(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 ) |
boolean |
contains(UpdateElement updateElement)
|
static OperationContainer<OperationSupport> |
createForCustomInstallComponent()
The factory method to construct instance of OperationContainer for installation of custom compomnent |
static OperationContainer<OperationSupport> |
createForCustomUninstallComponent()
The factory method to construct instance of OperationContainer for uninstallation of custom compomnent |
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()
|
List<OperationContainer.OperationInfo<Support>> |
listAll()
|
List<OperationContainer.OperationInfo<Support>> |
listInvalid()
|
void |
remove(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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static OperationContainer<InstallSupport> createForInstall()
OperationContainer
for install operation
OperationContainer
for install operationpublic static OperationContainer<InstallSupport> createForInternalUpdate()
OperationContainer
for internal update operation
OperationContainer
for internal update operationpublic static OperationContainer<OperationSupport> createForDirectInstall()
OperationContainer
for install operation
OperationContainer
for install operationpublic static OperationContainer<InstallSupport> createForUpdate()
OperationContainer
for update operation
OperationContainer
for update operationpublic static OperationContainer<OperationSupport> createForDirectUpdate()
OperationContainer
for update operation
OperationContainer
for update operationpublic static OperationContainer<OperationSupport> createForUninstall()
OperationContainer
for uninstall operation
OperationContainer
for uninstall operationpublic static OperationContainer<OperationSupport> createForDirectUninstall()
OperationContainer
for uninstall operation
OperationContainer
for uninstall operationpublic static OperationContainer<OperationSupport> createForEnable()
OperationContainer
for enable operation
OperationContainer
for enable operationpublic static OperationContainer<OperationSupport> createForDisable()
OperationContainer
for disable operation
OperationContainer
for disable operationpublic static OperationContainer<OperationSupport> createForDirectDisable()
OperationContainer
for disable operation
OperationContainer
for disable operationpublic static OperationContainer<OperationSupport> createForCustomInstallComponent()
OperationContainer
for installation of custom compomnent
OperationContainer
for installation of custom compomnentpublic static OperationContainer<OperationSupport> createForCustomUninstallComponent()
OperationContainer
for uninstallation of custom compomnent
OperationContainer
for uninstallation of custom compomnentpublic 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 {@link #createForInstall} and {@link #createForDirectInstall} for example
public boolean canBeAdded(UpdateUnit updateUnit, UpdateElement updateElement)
updateElement
can be added (add(java.util.Collection)
)
updateUnit
- updateElement
- to be inserted.
updateElement
is allowedpublic void add(Collection<UpdateElement> elems)
elems
elems
- to be inserted.public void add(Map<UpdateUnit,UpdateElement> elems)
elems
elems
- to be inserted.public OperationContainer.OperationInfo<Support> add(UpdateUnit updateUnit, UpdateElement updateElement)
updateElement
updateUnit
- updateElement
-
OperationContainer.OperationInfo
<Support> or
null
if the UpdateElement
is already present in the containerpublic OperationContainer.OperationInfo<Support> add(UpdateElement updateElement)
updateElement
updateElement
-
OperationContainer.OperationInfo
<Support> or
null
if the UpdateElement
is already present in the containerpublic void remove(Collection<UpdateElement> elems)
elems
elems
- public boolean remove(UpdateElement updateElement)
updateElement
updateElement
-
public boolean contains(UpdateElement updateElement)
updateElement
-
OperationContainer
contains the specified updateElement
.public List<OperationContainer.OperationInfo<Support>> listAll()
OperationContainer.OperationInfo
<Support> from this
instance of OperationContainer
public List<OperationContainer.OperationInfo<Support>> listInvalid()
OperationContainer.OperationInfo
<Support> from this
instance of OperationContainer
public void remove(OperationContainer.OperationInfo<Support> op)
op
op
- public void removeAll()
|
org.netbeans.modules.autoupdate.services 1.16.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |