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.operations
Class OperationsManager

    java.lang.Object
      org.eclipse.update.operations.OperationsManager

public class OperationsManager
extends Object

Entry point for update manager operations. Use this class to obtain the factory that creates update manager operations, or to get the operation validator.

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

Method Summary
`static void` | `addPendingOperation(IOperation operation)` Register a pending operation.
`static void` | `addUpdateModelChangedListener(IUpdateModelChangedListener listener)` Adds a model changed listener.
`static void` | `applyChangesNow()` Applies the changes made to the current configuration.
`static IFeatureOperation` | `findPendingOperation(IFeature feature)` Check if the feature is the subject of an update operation such as install, configure, etc. and return it.
`static void` | `fireObjectChanged(Object object, String property)` Notifies model changed listeners when features/sites/etc. have changed.
`static void` | `fireObjectsAdded(Object parent, Object[] children)` Notifies model changed listeners when features/sites/etc. are added.
`static void` | `fireObjectsRemoved(Object parent, Object[] children)` Notifies model changed listeners when features/sites/etc are removed.
`static IOperationFactory` | `getOperationFactory()` Each update operations must be created by the operation factory.
`static IInstallFeatureOperation[]` | `getSelectedJobsWithLicenses(IInstallFeatureOperation[] jobs)` Returns the list of operations that need a license agreement.
`static IInstallFeatureOperation[]` | `getSelectedJobsWithOptionalFeatures(IInstallFeatureOperation[] jobs)` Returns the list of operations that have optional features to install.
`static IOperationValidator` | `getValidator()` Returns the operations validator.
`static boolean` | `hasSelectedJobsWithLicenses(IInstallFeatureOperation[] jobs)` Returns true when any of the install operations requires a license agreement.
`static boolean` | `hasSelectedJobsWithOptionalFeatures(IInstallFeatureOperation[] jobs)` Returns true when any of the features to install has optional features.
`static boolean` | `isInProgress()` Returns true when some operation is being executed, false otherwise.
`static void` | `removePendingOperation(IOperation operation)` Unregister a pending operation.
`static void` | `removeUpdateModelChangedListener(IUpdateModelChangedListener listener)` Removes an model changed listener.
`static void` | `setInProgress(boolean inProgress)` Sets whether any operations is in progress.
`static void` | `setValidator(IOperationValidator validator)` Sets a custom operation validator

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

Method Detail

### getOperationFactory

    public static IOperationFactory getOperationFactory()

  Each update operations must be created by the operation factory. Use this method to obtain the factory.

  Returns:
    returns the operation factory

### findPendingOperation

    public static IFeatureOperation findPendingOperation(IFeature feature)

  Check if the feature is the subject of an update operation such as install, configure, etc. and return it. Currently there can only be one pending operation on a feature.

  Parameters:
    `feature` - feature to check for pending operations
  Returns:
    pending operation if any, otherwise null.

### addPendingOperation

    public static void addPendingOperation(IOperation operation)

  Register a pending operation.

  Parameters:
    `operation` - pending operation

### removePendingOperation

    public static void removePendingOperation(IOperation operation)

  Unregister a pending operation.

  Parameters:
    `operation` - pending operation

### addUpdateModelChangedListener

    public static void addUpdateModelChangedListener(IUpdateModelChangedListener listener)

  Adds a model changed listener.

  Parameters:
    `listener` - update model change listener

### removeUpdateModelChangedListener

    public static void removeUpdateModelChangedListener(IUpdateModelChangedListener listener)

  Removes an model changed listener.

  Parameters:
    `listener` - update model change listener

### fireObjectsAdded

    public static void fireObjectsAdded(Object parent,
                                        Object[] children)

  Notifies model changed listeners when features/sites/etc. are added.

  Parameters:
    `parent` - parent object
    `children` - children added

### fireObjectsRemoved

    public static void fireObjectsRemoved(Object parent,
                                          Object[] children)

  Notifies model changed listeners when features/sites/etc are removed.

  Parameters:
    `parent` - parent object
    `children` - children removed

### fireObjectChanged

    public static void fireObjectChanged(Object object,
                                         String property)

  Notifies model changed listeners when features/sites/etc. have changed.

  Parameters:
    `object` - changed object
    `property` - changed object property

### hasSelectedJobsWithLicenses

    public static boolean hasSelectedJobsWithLicenses(IInstallFeatureOperation[] jobs)

  Returns true when any of the install operations requires a license agreement.

  Parameters:
    `jobs` - features to install
  Returns:
    true when any of the features to install have a license

### hasSelectedJobsWithOptionalFeatures

    public static boolean hasSelectedJobsWithOptionalFeatures(IInstallFeatureOperation[] jobs)

  Returns true when any of the features to install has optional features.

  Parameters:
    `jobs` - features to install
  Returns:
    true when any of the features has optional features

### getSelectedJobsWithLicenses

    public static IInstallFeatureOperation[] getSelectedJobsWithLicenses(IInstallFeatureOperation[] jobs)

  Returns the list of operations that need a license agreement.

  Parameters:
    `jobs` - features to install
  Returns:
    the list of operation that need a license agreement

### getSelectedJobsWithOptionalFeatures

    public static IInstallFeatureOperation[] getSelectedJobsWithOptionalFeatures(IInstallFeatureOperation[] jobs)

  Returns the list of operations that have optional features to install.

  Parameters:
    `jobs` - features to install
  Returns:
    list of operations that have optional features to install

### setInProgress

    public static void setInProgress(boolean inProgress)

  Sets whether any operations is in progress.

  Parameters:
    `inProgress` - true when operation is in progress

### isInProgress

    public static boolean isInProgress()

  Returns true when some operation is being executed, false otherwise.

  Returns:
    true when some operation execution is in progress, false otherwise

### getValidator

    public static IOperationValidator getValidator()

  Returns the operations validator.

  Returns:
    the operation validator

### setValidator

    public static void setValidator(IOperationValidator validator)

  Sets a custom operation validator

  Parameters:
    `validator` - the custom validator

### applyChangesNow

    public static void applyChangesNow()

  Applies the changes made to the current configuration. Care must be taken when using this method. Normally, if you install a new plugin it is safe to do it.

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.