org.netbeans.modules.autoupdate.services 1.26.1

org.netbeans.api.autoupdate
Class OperationSupport

java.lang.Object
  extended by org.netbeans.api.autoupdate.OperationSupport

public final class OperationSupport
extends Object

Performs all operations scheduled on instance of OperationContainer. Instance of OperationSupport can be obtained by calling OperationContainer.getSupport()


Nested Class Summary
static class OperationSupport.Restarter
          A helper object returned by a performer of the operation for invoking methods doRestart(org.netbeans.api.autoupdate.OperationSupport.Restarter, org.netbeans.api.progress.ProgressHandle) or doRestartLater(org.netbeans.api.autoupdate.OperationSupport.Restarter)
 
Method Summary
 void doCancel()
          Cancels changes done in previous call 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doOperation

public OperationSupport.Restarter doOperation(ProgressHandle progress)
                                       throws OperationException
Performs operation

Parameters:
progress - instance of ProgressHandle or null
Returns:
instance of OperationSupport.Restarter which is necessary for next calls like doRestart(org.netbeans.api.autoupdate.OperationSupport.Restarter, org.netbeans.api.progress.ProgressHandle) or doRestartLater(org.netbeans.api.autoupdate.OperationSupport.Restarter)
Throws:
OperationException
See Also:
OperationException

doCancel

public void doCancel()
              throws OperationException
Cancels changes done in previous call doOperation(org.netbeans.api.progress.ProgressHandle) if supported.

Throws:
OperationException
See Also:
OperationException

doRestart

public void doRestart(OperationSupport.Restarter restarter,
                      ProgressHandle progress)
               throws OperationException
Finishes operation, applies all changes and ensures restart of the application immediately. If method doOperation(org.netbeans.api.progress.ProgressHandle) returns non null instance of Restarter then this method must be called to apply all changes

Parameters:
restarter - instance of Restarter obtained from previous call doOperation(org.netbeans.api.progress.ProgressHandle). Mustn't be null.
progress - instance of ProgressHandle or null
Throws:
OperationException
See Also:
OperationException

doRestartLater

public void doRestartLater(OperationSupport.Restarter restarter)
Finishes operation, all the changes will be completed after restart the application. If method doOperation(org.netbeans.api.progress.ProgressHandle) returns non null instance of Restarter then this method must be called to apply all changes

Parameters:
restarter - instance of Restarter obtained from previous call doOperation(org.netbeans.api.progress.ProgressHandle). Mustn't be null.

org.netbeans.modules.autoupdate.services 1.26.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.