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.configurator
Interface IPlatformConfiguration

public interface IPlatformConfiguration

Platform configuration interface. Represents the runtime configuration used by the Eclipse platform. Any configuration changes do not take effect until next startup of the Eclipse platform.

Do not provide implementations of this interface or its nested interfaces. Use the factory methods on IPlatformConfigurationFactory to create a IPlatformConfiguration, then use the factory methods on the IPlatformConfiguration to create instances of ISiteEntry,IFeatureEntry and ISitePolicy.

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

Nested Class Summary
`static interface` | `IPlatformConfiguration.IFeatureEntry` Feature entry.
`static interface` | `IPlatformConfiguration.ISiteEntry` Configuration entry representing an install site.
`static interface` | `IPlatformConfiguration.ISitePolicy` Site policy.

Method Summary
`void` | `configureFeatureEntry(IPlatformConfiguration.IFeatureEntry entry)` Configures the feature entry.
`void` | `configureSite(IPlatformConfiguration.ISiteEntry entry)` Configures the specified site entry.
`void` | `configureSite(IPlatformConfiguration.ISiteEntry entry, boolean replace)` Configures the specified site entry.
`IPlatformConfiguration.IFeatureEntry` | `createFeatureEntry(String id, String version, String pluginVersion, boolean primary, String application, URL[] root)` Create a feature entry
`IPlatformConfiguration.IFeatureEntry` | `createFeatureEntry(String id, String version, String pluginIdentifier, String pluginVersion, boolean primary, String application, URL[] root)` Create a feature entry
`IPlatformConfiguration.ISiteEntry` | `createSiteEntry(URL url, IPlatformConfiguration.ISitePolicy policy)` Create a site entry
`IPlatformConfiguration.ISitePolicy` | `createSitePolicy(int type, String[] list)` Create a site policy.
`IPlatformConfiguration.IFeatureEntry` | `findConfiguredFeatureEntry(String id)` Locates the specified feature entry.
`IPlatformConfiguration.ISiteEntry` | `findConfiguredSite(URL url)` Returns a site entry matching the specified URL
`String[]` | `getBootstrapPluginIdentifiers()` Deprecated. Do not use this method. Check the osgi.bundles system property for the urls of the automatically started bundles
`long` | `getChangeStamp()` Returns a stamp reflecting the current state of the configuration.
`URL` | `getConfigurationLocation()` Returns the URL location of the configuration information
`IPlatformConfiguration.IFeatureEntry[]` | `getConfiguredFeatureEntries()` Returns a list of configured feature entries.
`IPlatformConfiguration.ISiteEntry[]` | `getConfiguredSites()` Returns configured site entries
`long` | `getFeaturesChangeStamp()` Deprecated. Do not use this method.
`URL[]` | `getPluginPath()` Computes the plug-in path for this configuration.
`long` | `getPluginsChangeStamp()` Deprecated. Do not use this method
`String` | `getPrimaryFeatureIdentifier()` Returns the identifier of the configured primary feature.
`boolean` | `isTransient()` Returns an indication whether the configuration is transient.
`void` | `isTransient(boolean value)` Indicates whether the configuration is transient or not.
`boolean` | `isUpdateable()` Returns an indication whether the configuration can be updated.
`void` | `refresh()` Called to refresh the configuration information.
`void` | `save()` Called to save the configuration information
`void` | `save(URL url)` Called to save the configuration information in the specified location
`void` | `setBootstrapPluginLocation(String id, URL location)` Deprecated. Do not use this method. Use the osig.bundles system property contains the urls of the automatically started bundles.
`void` | `unconfigureFeatureEntry(IPlatformConfiguration.IFeatureEntry entry)` Unconfigures the specified feature entry if it exists.
`void` | `unconfigureSite(IPlatformConfiguration.ISiteEntry entry)` Unconfigures the specified entry.

Method Detail

### createSiteEntry

    public IPlatformConfiguration.ISiteEntry createSiteEntry(URL url,
                                                             IPlatformConfiguration.ISitePolicy policy)

  Create a site entry

  Parameters:
    `url` - site URL
    `policy` - site policy
  Returns:
    created site entry
  Since:
    2.0

### createSitePolicy

    public IPlatformConfiguration.ISitePolicy createSitePolicy(int type,
                                                               String[] list)

  Create a site policy. The policy determines the way the site plug-in are processed at startpu

  Parameters:
    `type` - policy type
    `list` - an array of site-relative paths representing the inclusion/ exclusion list
  Returns:
    created site policy entry
  Since:
    2.0

### createFeatureEntry

    public IPlatformConfiguration.IFeatureEntry createFeatureEntry(String id,
                                                                   String version,
                                                                   String pluginVersion,
                                                                   boolean primary,
                                                                   String application,
                                                                   URL[] root)

  Create a feature entry

  Parameters:
    `id` - feature identifier. Must not be `null`.
    `version` - feature version (as String). Can be `null`.
    `pluginVersion` - version of the feature plugin (as String). Can be `null`.
    `primary` - `true` if the feature is defined as a primary feature, otherwise `false`.
    `application` - identifier of the application to run when this feature is the primary feature. Can be `null`. If specified, the identifier must represent a valid extension registered in the `org.eclipse.core.runtime.applications` extension point.
    `root` - an array of URLs to feature root directories. These are URLs to install locations for the feature plugin and its fragments. Can be `null`.
  Returns:
    create feature entry
  Since:
    2.0

### createFeatureEntry

    public IPlatformConfiguration.IFeatureEntry createFeatureEntry(String id,
                                                                   String version,
                                                                   String pluginIdentifier,
                                                                   String pluginVersion,
                                                                   boolean primary,
                                                                   String application,
                                                                   URL[] root)

  Create a feature entry

  Parameters:
    `id` - feature identifier. Must not be `null`.
    `version` - feature version (as String). Can be `null`.
    `pluginIdentifier` - identifier of the feature plugin (as String). Can be `null`.
    `pluginVersion` - version of the feature plugin (as String). Can be `null`.
    `primary` - `true` if the feature is defined as a primary feature, otherwise `false`.
    `application` - identifier of the application to run when this feature is the primary feature. Can be `null`. If specified, the identifier must represent a valid extension registered in the `org.eclipse.core.runtime.applications` extension point.
    `root` - an array of URLs to feature root directories. These are URLs to install locations for the feature plugin and its fragments. Can be `null`.
  Returns:
    create feature entry
  Since:
    2.1

### configureSite

    public void configureSite(IPlatformConfiguration.ISiteEntry entry)

  Configures the specified site entry. If a site entry with the same site URL is already configured, the entry is not replaced.

  Parameters:
    `entry` - site entry
  Since:
    2.0

### configureSite

    public void configureSite(IPlatformConfiguration.ISiteEntry entry,
                              boolean replace)

  Configures the specified site entry. If a site entry with the same site URL is already configured, the replacement behavior for the entry can be specified.

  Parameters:
    `entry` - site entry
    `replace` - indicating whether an existing configured entry with the same URL should be replaced (`true`) or not (`false`).
  Since:
    2.0

### unconfigureSite

    public void unconfigureSite(IPlatformConfiguration.ISiteEntry entry)

  Unconfigures the specified entry. Does not do anything if the entry is not configured.

  Parameters:
    `entry` - site entry
  Since:
    2.0

### getConfiguredSites

    public IPlatformConfiguration.ISiteEntry[] getConfiguredSites()

  Returns configured site entries

  Returns:
    array of site entries. Returns an empty array if no sites are configured
  Since:
    2.0

### findConfiguredSite

    public IPlatformConfiguration.ISiteEntry findConfiguredSite(URL url)

  Returns a site entry matching the specified URL

  Parameters:
    `url` - site url
  Returns:
    matching site entry, or `null` if no match found
  Since:
    2.0

### configureFeatureEntry

    public void configureFeatureEntry(IPlatformConfiguration.IFeatureEntry entry)

  Configures the feature entry. If another feature entry with the same feature identifier already exists, it is replaced.

  Parameters:
    `entry` - feature entry
  Since:
    2.0

### unconfigureFeatureEntry

    public void unconfigureFeatureEntry(IPlatformConfiguration.IFeatureEntry entry)

  Unconfigures the specified feature entry if it exists.

  Parameters:
    `entry` - feature entry
  Since:
    2.0

### getConfiguredFeatureEntries

    public IPlatformConfiguration.IFeatureEntry[] getConfiguredFeatureEntries()

  Returns a list of configured feature entries.

  Returns:
    array or entries, or an empty array if no entries are configured
  Since:
    2.0

### findConfiguredFeatureEntry

    public IPlatformConfiguration.IFeatureEntry findConfiguredFeatureEntry(String id)

  Locates the specified feature entry.

  Parameters:
    `id` - feature identifier
  Returns:
    ferature entry, or `null`.
  Since:
    2.0

### getConfigurationLocation

    public URL getConfigurationLocation()

  Returns the URL location of the configuration information

  Returns:
    configuration location URL, or `null` if the configuration location could not be determined.
  Since:
    2.0

### getChangeStamp

    public long getChangeStamp()

  Returns a stamp reflecting the current state of the configuration. If called repeatedly, returns the same value as long as no changes were made to the configuration (changes to sites, features or plugins).

  Returns:
    configuration change stamp
  Since:
    2.0

### getFeaturesChangeStamp

    public long getFeaturesChangeStamp()

  Deprecated. Do not use this method.

  Returns a stamp reflecting the current state of the features in the configuration. If called repeatedly, returns the same value as long as no changes were made to features in the configuration.

  Returns:
    configuration features change stamp
  Since:
    2.0

### getPluginsChangeStamp

    public long getPluginsChangeStamp()

  Deprecated. Do not use this method

  Returns a stamp reflecting the current state of the plug-ins in the configuration. If called repeatedly, returns the same value as long as no changes were made to plug-ins in the configuration.

  Returns:
    configuration plug-ins change stamp
  Since:
    2.0

### getPrimaryFeatureIdentifier

    public String getPrimaryFeatureIdentifier()

  Returns the identifier of the configured primary feature. A primary feature is used to specify product customization information for a running instance of Eclipse.

  Returns:
    primary feature identifier, or `null` if none configured
  Since:
    2.0

### getPluginPath

    public URL[] getPluginPath()

  Computes the plug-in path for this configuration. The result includes all plug-ins visible on each of the configured sites based on each site policy.

  Returns:
    an array of plug-in path elements (full URL entries), or an empty array.
  Since:
    2.0

### getBootstrapPluginIdentifiers

    public String[] getBootstrapPluginIdentifiers()

  Deprecated. Do not use this method. Check the osgi.bundles system property for the urls of the automatically started bundles

  Returns an array of bootstrap plugin identifiers whose location needs to be explicitly identified in the configuration.

  Returns:
    an array of identifiers, or empty array otherwise
  Since:
    2.0

### setBootstrapPluginLocation

    public void setBootstrapPluginLocation(String id,
                                           URL location)

  Deprecated. Do not use this method. Use the osig.bundles system property contains the urls of the automatically started bundles.

  Sets the location of a bootstrap plugin.

  Parameters:
    `id` - plugin identifier. Must match one of the entries returned by getBootstrapPluginIdentifiers()
    `location` -
  Since:
    2.0
  See Also:
    `getBootstrapPluginIdentifiers()`

### isUpdateable

    public boolean isUpdateable()

  Returns an indication whether the configuration can be updated.

  Returns:
    `true` if configuration can be updated, `false` otherwise
  Since:
    2.0

### isTransient

    public boolean isTransient()

  Returns an indication whether the configuration is transient. A transient configuration typically represents a scenario where the configuration was computed for a single instantiation of the platform and is not guaranteed to be valid on subsequent instantiations.

  Returns:
    `true` if configuration is transient, `false` otherwise
  Since:
    2.0

### isTransient

    public void isTransient(boolean value)

  Indicates whether the configuration is transient or not. A transient configuration typically represents a scenario where the configuration was computed for a single instantiation of the platform and is not guaranteed to be valid on subsequent instantiations. This method has no effect if called on the current platform configuration.

  Parameters:
    `value` - `true` if configuration is transient, `false` otherwise
  Since:
    2.0

### refresh

    public void refresh()

  Called to refresh the configuration information. In particular, causes change stamps to be recomputed based on the current configuration state, and updates the lists of available plug-ins.

  Since:
    2.0

### save

    public void save()
              throws IOException

  Called to save the configuration information

  Throws:
    `IOException`
  Since:
    2.0

### save

    public void save(URL url)
              throws IOException

  Called to save the configuration information in the specified location

  Parameters:
    `url` - save location.
  Throws:
    `IOException`
  Since:
    2.0

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.