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.configuration
Interface ILocalSite

All Superinterfaces:
  IAdaptable

public interface ILocalSite
extends IAdaptable

Local Site. Represents the local installation. It consists of the current configuration and the configuration history. A local site manages the number of configuration histories kept. It also allows specific configuration histories to be saved.

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:
  2.0

Method Summary
`void` | `addConfiguration(IInstallConfiguration config)` Adds the specified configuration to this local site.
`void` | `addLocalSiteChangedListener(ILocalSiteChangedListener listener)` Adds a site change listener
`IInstallConfiguration` | `addToPreservedConfigurations(IInstallConfiguration configuration)` Save the specified configuration.
`IInstallConfiguration` | `cloneCurrentConfiguration()` Creates a new configuration containing the same state as the specified configuration.
`IInstallConfiguration[]` | `getConfigurationHistory()` Return configuration history.
`IInstallConfiguration` | `getCurrentConfiguration()` Return the current configuration.
`IStatus` | `getFeatureStatus(IFeature feature)` Indicates if the 'state' of the specified feature and its children features.
`int` | `getMaximumHistoryCount()` Indicates how many configuration histories should be maintained.
`IInstallConfiguration[]` | `getPreservedConfigurations()` Return the list of saved configurations
`void` | `removeFromPreservedConfigurations(IInstallConfiguration configuration)` Removes the specified configuration from the list of previously saved configurations.
`void` | `removeLocalSiteChangedListener(ILocalSiteChangedListener listener)` Removes a site listener
`void` | `revertTo(IInstallConfiguration configuration, IProgressMonitor monitor, IProblemHandler handler)` Reverts the local site to use the specified configuration.
`boolean` | `save()` Saves the local site state
`void` | `setMaximumHistoryCount(int history)` Sets the number of past configurations to keep in history

Methods inherited from interface org.eclipse.core.runtime.IAdaptable
`getAdapter`

Method Detail

### getCurrentConfiguration

    public IInstallConfiguration getCurrentConfiguration()

  Return the current configuration.

  Returns:
    current configuration
  Since:
    2.0

    Note: This method 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.

### getConfigurationHistory

    public IInstallConfiguration[] getConfigurationHistory()

  Return configuration history.

  Returns:
    an array of configurations, or an empty array.
  Since:
    2.0

    Note: This method 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.

### revertTo

    public void revertTo(IInstallConfiguration configuration,
                         IProgressMonitor monitor,
                         IProblemHandler handler)
                  throws CoreException

  Reverts the local site to use the specified configuration. The result of this operation is a new configuration that contains the same configured features as the specified configuration. The new configuration becomes the current configuration.

  Parameters:
    `configuration` - configuration state to revert to
    `monitor` - progress monitor
    `handler` - problem handler
  Throws:
    `CoreException`
  Since:
    2.0

    Note: This method 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.

### cloneCurrentConfiguration

    public IInstallConfiguration cloneCurrentConfiguration()
                                                    throws CoreException

  Creates a new configuration containing the same state as the specified configuration. The new configuration is not added to this lical site.

  Returns:
    cloned configuration
  Throws:
    `CoreException`
  Since:
    2.0

    Note: This method 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.

### addConfiguration

    public void addConfiguration(IInstallConfiguration config)

  Adds the specified configuration to this local site. The new configuration becomes the current one.

  Parameters:
    `config` - the configuration
  Since:
    2.0

    Note: This method 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.

### save

    public boolean save()
                 throws CoreException

  Saves the local site state

  Returns:
    true if a restart is needed. This return code was added in 3.0.
  Throws:
    `CoreException`
  Since:
    2.0

    Note: This method 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.

### getMaximumHistoryCount

    public int getMaximumHistoryCount()

  Indicates how many configuration histories should be maintained. Histories beyond the specified count are automatically deleted.

  Returns:
    number of past configurations to keep as history
  Since:
    2.0

    Note: This method 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.

### setMaximumHistoryCount

    public void setMaximumHistoryCount(int history)

  Sets the number of past configurations to keep in history

  Parameters:
    `history` - number of configuration to keep
  Since:
    2.0

    Note: This method 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.

### addLocalSiteChangedListener

    public void addLocalSiteChangedListener(ILocalSiteChangedListener listener)

  Adds a site change listener

  Parameters:
    `listener` - the listener
  Since:
    2.0

    Note: This method 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.

### removeLocalSiteChangedListener

    public void removeLocalSiteChangedListener(ILocalSiteChangedListener listener)

  Removes a site listener

  Parameters:
    `listener` - the listener
  Since:
    2.0

    Note: This method 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.

### addToPreservedConfigurations

    public IInstallConfiguration addToPreservedConfigurations(IInstallConfiguration configuration)
                                                       throws CoreException

  Save the specified configuration. Saved configurations are not deleted based on the history count. They must be explicitly removed.

  Parameters:
    `configuration` - the configuration to save
  Returns:
    the preserved configuration or `null` if the configuration to save is `null`
  Throws:
    `CoreException`
  Since:
    2.0

    Note: This method 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.

### removeFromPreservedConfigurations

    public void removeFromPreservedConfigurations(IInstallConfiguration configuration)

  Removes the specified configuration from the list of previously saved configurations.

  Parameters:
    `configuration` - the configuration to remove
  Since:
    2.0

    Note: This method 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.

### getPreservedConfigurations

    public IInstallConfiguration[] getPreservedConfigurations()

  Return the list of saved configurations

  Returns:
    an array of configurations, or an empty array.
  Since:
    2.0

    Note: This method 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.

### getFeatureStatus

    public IStatus getFeatureStatus(IFeature feature)
                             throws CoreException

  Indicates if the 'state' of the specified feature and its children features. A feature is considered to be 'unhappy' in the context of this site, if some of the plug-ins referenced by the feature, or any of its children, are not installed on this site. A feature is considered to be 'happy' in the context of a local site if all the plug-ins referenced by the feature, or any of its children, are installed on the site and no other version of any of the plug-ins are installed on any other site of the local site. A feature is considered to be 'ambiguous' in the context of a local site if all the plug-ins referenced by the feature, or any of its children, are installed on the site and other version of any of the plug-ins are installed on any other site of the local site.

  Parameters:
    `feature` - the feature
  Returns:
    the state of the feature
  Throws:
    `CoreException`
  Since:
    2.0

    Note: This method 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.

  See Also:
    `IFeature.STATUS_HAPPY`, `IFeature.STATUS_UNHAPPY`, `IFeature.STATUS_AMBIGUOUS`

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.