Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.update.standalone
Class ScriptedCommand

    java.lang.Object
      org.eclipse.update.standalone.ScriptedCommand

All Implemented Interfaces:
  IOperationListener

Direct Known Subclasses:
  AddSiteCommand, DisableCommand, EnableCommand, InstallCommand, ListFeaturesCommand, RemoveSiteCommand, SearchCommand, UninstallCommand, UpdateCommand

public abstract class ScriptedCommand
extends Object
implements IOperationListener

Parent class for all the update manager standalone commands. Subclasses will provide specific operations and the implementation of the run() method.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
  3.0

Field Summary
`protected boolean` | `verifyOnly`

Constructor Summary
`ScriptedCommand()` Constructor
`ScriptedCommand(String verifyOnly)` Constructor.

Method Summary
`boolean` | `afterExecute(IOperation operation, Object data)` May be called after an operation finishes executing.
`void` | `applyChangesNow()` Applies the changes made to the current configuration.
`boolean` | `beforeExecute(IOperation operation, Object data)` May be called before an operation starts executing.
`IInstallConfiguration` | `getConfiguration()`
`protected boolean` | `isVerifyOnly()`
`boolean` | `run()` Convenience method that executes the command with a null progress monitor.
`abstract boolean` | `run(IProgressMonitor monitor)` Executes the command.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### verifyOnly

    protected boolean verifyOnly

Constructor Detail

### ScriptedCommand

    public ScriptedCommand()

  Constructor

### ScriptedCommand

    public ScriptedCommand(String verifyOnly)

  Constructor.

Parameters:
  `verifyOnly` - if true, the command is not executed, but will only attempt to run the command. This is mostly used when wanted to know if the command would fail.

Method Detail

### isVerifyOnly

    protected final boolean isVerifyOnly()

  Returns:
    true if the command should only be run in simulation mode, to verify if it can execute.

### run

    public final boolean run()

  Convenience method that executes the command with a null progress monitor.

### run

    public abstract boolean run(IProgressMonitor monitor)

  Executes the command. Subclasses are responsible for implementing this method. If the command was constructed with verifyOnly=true, the command should not execute, but only verify it can execute.

  Parameters:
    `monitor` - progress monitor during command execution.

### applyChangesNow

    public void applyChangesNow()

  Applies the changes made to the current configuration.

### afterExecute

    public boolean afterExecute(IOperation operation,
                                Object data)

  Description copied from interface: `IOperationListener`
  May be called after an operation finishes executing.

  Specified by:
    `afterExecute` in interface `IOperationListener`
  Parameters:
    `operation` - operation to listen to
    `data` - info specific to the operation
  Returns:
    not used

### beforeExecute

    public boolean beforeExecute(IOperation operation,
                                 Object data)

  Description copied from interface: `IOperationListener`
  May be called before an operation starts executing.

  Specified by:
    `beforeExecute` in interface `IOperationListener`
  Parameters:
    `operation` - operation to listen to
    `data` - info specific to the operation
  Returns:
    not used

### getConfiguration

    public final IInstallConfiguration getConfiguration()

  Returns:
    the installation configuration affected by the command

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.