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

## org.eclipse.wst.server.core.model
Class PublishOperation

    java.lang.Object
      org.eclipse.wst.server.core.model.PublishOperation

    public abstract class PublishOperation

extends java.lang.Object

An operation that will be executed during publishing. [issue: EY It is not clear to me that when this task will be run. Will the place where the task is being run depend on the server, e.g. the TDC tasks for the v6 server should be run after the server is started the modules are added to the server; however, the EJB deploy task makes more sense to be run before adding the project to the server.]

Since:
  1.0

Field Summary
`static int` | `OPTIONAL` Operation kind constant (value 0) indicating that the operation does not need be executed.
`static int` | `PREFERRED` Operation kind constant (value 1) indicating that the operation should be executed.
`static int` | `REQUIRED` Operation kind constant (value 2) indicating that the operation must be executed.

Constructor Summary
`PublishOperation()` Create a new operation.
`PublishOperation(java.lang.String label, java.lang.String description)` Create a new operation with the given label and description.

Method Summary
`abstract void` | `execute(IProgressMonitor monitor, IAdaptable info)` Execute (perform) the operation.
`java.lang.String` | `getDescription()` Returns the displayable description for this operation.
`int` | `getKind()` Returns the kind of this operation.
`java.lang.String` | `getLabel()` Returns the displayable label for this operation.
`abstract int` | `getOrder()` Returns the order (index/priority) of the task that will be run.
`TaskModel` | `getTaskModel()` Return the task model.
`void` | `setTaskModel(TaskModel taskModel)` Set the task model.

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

Field Detail

### OPTIONAL

    public static final int OPTIONAL

  Operation kind constant (value 0) indicating that the operation does not need be executed.

  See Also:
    `getKind()`, Constant Field Values

### PREFERRED

    public static final int PREFERRED

  Operation kind constant (value 1) indicating that the operation should be executed.

  See Also:
    `getKind()`, Constant Field Values

### REQUIRED

    public static final int REQUIRED

  Operation kind constant (value 2) indicating that the operation must be executed.

  See Also:
    `getKind()`, Constant Field Values

Constructor Detail

### PublishOperation

    public PublishOperation()

  Create a new operation. The label and description must be supplied by overriding the getLabel() and getDescription() methods.

### PublishOperation

    public PublishOperation(java.lang.String label,
                            java.lang.String description)

  Create a new operation with the given label and description.

  Parameters:
    `label` - a translated label for the operation
    `description` - the operation description

Method Detail

### getKind

    public int getKind()

  Returns the kind of this operation. Operations can either be OPTIONAL (do not have to be executed), PREFERRED (should be executed), or REQUIRED (must be executed).

  Returns:
    one of the kind constants (e.g. `REQUIRED`) declared on `PublishOperation`

### getOrder

    public abstract int getOrder()

  Returns the order (index/priority) of the task that will be run. The task with a smaller order value will be run before the task with a bigger order value. For tasks that have the same order value, the order of running those task are not guaranteed.

  Returns:
    the order (index/priority) of the task that will be run.

### getLabel

    public java.lang.String getLabel()

  Returns the displayable label for this operation.

  Note that this label is appropriate for the current locale.

  Returns:
    a displayable label for this operation

### getDescription

    public java.lang.String getDescription()

  Returns the displayable description for this operation.

  Note that this description is appropriate for the current locale.

  Returns:
    a displayable description for this operation

### getTaskModel

    public TaskModel getTaskModel()

  Return the task model.

  A task model contains information about the overall task flow and allows tasks to store and retrieve data. Its usage allows multiple tasks to be chained together and share data from the output of one task to the input of another.

  Returns:
    the task model
  See Also:
    `setTaskModel(TaskModel)`

### setTaskModel

    public void setTaskModel(TaskModel taskModel)

  Set the task model.

  A task model contains information about the overall task flow and allows tasks to store and retrieve data. Its usage allows multiple tasks to be chained together and share data from the output of one task to the input of another.

  Parameters:
    `taskModel` - the task model
  See Also:
    `getTaskModel()`

### execute

    public abstract void execute(IProgressMonitor monitor,
                                 IAdaptable info)
                          throws CoreException

  Execute (perform) the operation.

  Parameters:
    `monitor` - a progress monitor, or `null` if progress reporting and cancellation are not desired
    `info` - the IAdaptable (or `null`) provided by the caller in order to supply UI information for prompting the user if necessary. When this parameter is not `null`, it should minimally contain an adapter for the org.eclipse.swt.widgets.Shell.class.
  Throws:
    `CoreException` - if there was an error while executing the task

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