public final class OperationSupport extends Object
OperationContainer
.
Instance of OperationSupport
can be obtained by calling OperationContainer.getSupport()
Modifier and Type | Class and Description |
---|---|
static class |
OperationSupport.Restarter
A helper object returned by a performer of the operation for invoking
methods
OperationSupport.doRestart(org.netbeans.api.autoupdate.OperationSupport.Restarter, org.netbeans.api.progress.ProgressHandle) or OperationSupport.doRestartLater(org.netbeans.api.autoupdate.OperationSupport.Restarter) |
Modifier and Type | Method and Description |
---|---|
void |
doCancel()
Cancels changes done in previous call
OperationSupport.doOperation(org.netbeans.api.progress.ProgressHandle) if supported. |
OperationSupport.Restarter |
doOperation(ProgressHandle progress)
Performs operation
|
void |
doRestart(OperationSupport.Restarter restarter,
ProgressHandle progress)
Finishes operation, applies all changes and ensures restart of the application immediately.
|
void |
doRestartLater(OperationSupport.Restarter restarter)
Finishes operation, all the changes will be completed after restart the application.
|
public OperationSupport.Restarter doOperation(ProgressHandle progress) throws OperationException
progress
- instance of ProgressHandle
or nullOperationSupport.Restarter
which is necessary
for next calls like OperationSupport.doRestart(org.netbeans.api.autoupdate.OperationSupport.Restarter, org.netbeans.api.progress.ProgressHandle)
or OperationSupport.doRestartLater(org.netbeans.api.autoupdate.OperationSupport.Restarter)
OperationException
OperationException
public void doCancel() throws OperationException
OperationSupport.doOperation(org.netbeans.api.progress.ProgressHandle)
if supported.OperationException
OperationException
public void doRestart(OperationSupport.Restarter restarter, ProgressHandle progress) throws OperationException
OperationSupport.doOperation(org.netbeans.api.progress.ProgressHandle)
returns non null instance of Restarter
then
this method must be called to apply all changesrestarter
- instance of Restarter
obtained from previous call OperationSupport.doOperation(org.netbeans.api.progress.ProgressHandle)
.
Mustn't be null.progress
- instance of ProgressHandle
or nullOperationException
OperationException
public void doRestartLater(OperationSupport.Restarter restarter)
OperationSupport.doOperation(org.netbeans.api.progress.ProgressHandle)
returns non null instance of Restarter
then
this method must be called to apply all changesrestarter
- instance of Restarter
obtained from previous call OperationSupport.doOperation(org.netbeans.api.progress.ProgressHandle)
.
Mustn't be null.