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.core
Class Feature

    java.lang.Object
      org.eclipse.core.runtime.PlatformObject
          org.eclipse.update.core.model.ModelObject
              org.eclipse.update.core.model.FeatureModel
                  org.eclipse.update.core.Feature

All Implemented Interfaces:
  IAdaptable, IFeature, IPlatformEnvironment

public class Feature
extends FeatureModel
implements IFeature

Convenience implementation of a feature.

This class may be instantiated or subclassed by clients.

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
See Also:
  `IFeature`, `FeatureModel`

Field Summary
`static String` | `FEATURE_FILE` Simple file name of the default feature manifest file
`static String` | `FEATURE_XML` File extension of the default feature manifest file

Fields inherited from interface org.eclipse.update.core.IFeature
`SEARCH_LOCATION_BOTH, SEARCH_LOCATION_DEFAULT, SEARCH_LOCATION_FEATURE, STATUS_AMBIGUOUS, STATUS_DISABLED, STATUS_HAPPY, STATUS_UNHAPPY`

Constructor Summary
`Feature()` Feature default constructor

Method Summary
`boolean` | `equals(Object object)` Compares two features for equality
`IURLEntry` | `getCopyright()` Returns the copyright information for the feature.
`IURLEntry` | `getDescription()` Returns the feature description.
`IURLEntry[]` | `getDiscoverySiteEntries()` Return an array of information entries referencing locations of other update sites.
`long` | `getDownloadSize()` Returns the download size of the feature, if it can be determined.
`IFeatureContentConsumer` | `getFeatureContentConsumer()` Returns the content consumer for this feature.
`IFeatureContentProvider` | `getFeatureContentProvider()` Returns the content provider for this feature.
`URL` | `getImage()` Return optional image for the feature.
`IImport[]` | `getImports()` Return a list of plug-in dependencies for this feature.
`IIncludedFeatureReference[]` | `getIncludedFeatureReferences()` Returns an array of feature references included by this feature filtered by the operating system, windowing system and architecture system set in `Sitemanager`
`IInstallHandlerEntry` | `getInstallHandlerEntry()` Returns and optional custom install handler entry.
`long` | `getInstallSize()` Returns the install size of the feature, if it can be determined.
`IURLEntry` | `getLicense()` Returns the license information for the feature.
`INonPluginEntry[]` | `getNonPluginEntries()` Returns an array of non-plug-in entries referenced by this feature filtered by the operating system, windowing system and architecture system set in `Sitemanager`
`int` | `getNonPluginEntryCount()` Returns the count of referenced non-plug-in entries.
`IPluginEntry[]` | `getPluginEntries()` Returns an array of plug-in entries referenced by this feature filtered by the operating system, windowing system and architecture system set in `Sitemanager`
`int` | `getPluginEntryCount()` Returns the count of referenced plug-in entries.
`IImport[]` | `getRawImports()` Return a list of plug-in dependencies for this feature.
`IIncludedFeatureReference[]` | `getRawIncludedFeatureReferences()` Returns an array of feature references included by this feature
`INonPluginEntry[]` | `getRawNonPluginEntries()` Returns an array of non-plug-in entries referenced by this feature
`IPluginEntry[]` | `getRawPluginEntries()` Returns an array of plug-in entries referenced by this feature
`ISite` | `getSite()` Returns the site this feature is associated with.
`IURLEntry` | `getUpdateSiteEntry()` Returns an information entry referencing the location of the feature update site.
`URL` | `getURL()` Returns the feature URL.
`VersionedIdentifier` | `getVersionedIdentifier()` Returns the feature identifier.
`IFeatureReference` | `install(IFeature targetFeature, IFeatureReference[] optionalfeatures, IVerificationListener verificationListener, IProgressMonitor progress)` Install the contents of this feature into the specified target feature.
`IFeatureReference` | `install(IFeature targetFeature, IVerificationListener verificationListener, IProgressMonitor progress)` Install the contents of this feature into the specified target feature.
`void` | `setFeatureContentProvider(IFeatureContentProvider featureContentProvider)` Sets the content provider for this feature.
`void` | `setSite(ISite site)` Sets the site for this feature.
`String` | `toString()` Return the string representation of this fetaure

Methods inherited from class org.eclipse.update.core.model.FeatureModel
`addDiscoverySiteEntryModel, addImportModel, addIncludedFeatureReferenceModel, addNonPluginEntryModel, addPluginEntryModel, getAffinityFeature, getApplication, getCopyrightModel, getDescriptionModel, getDiscoverySiteEntryModels, getFeatureIdentifier, getFeatureIncluded, getFeatureIncludeVersionedIdentifier, getFeatureVersion, getImageURL, getImageURLString, getImportModels, getInstallHandlerModel, getLabel, getLabelNonLocalized, getLicenseModel, getNL, getNonPluginEntryModels, getOS, getOSArch, getPluginEntryModels, getPrimaryPluginID, getProvider, getProviderNonLocalized, getUpdateSiteEntryModel, getWS, isExclusive, isPatch, isPrimary, markReadOnly, removeDiscoverySiteEntryModel, removeImportModel, removeNonPluginEntryModel, removePluginEntryModel, resolve, setAffinityFeature, setApplication, setArch, setCopyrightModel, setDescriptionModel, setDiscoverySiteEntryModels, setExclusive, setFeatureIdentifier, setFeatureVersion, setImageURLString, setImportModels, setInstallHandlerModel, setLabel, setLicenseModel, setNL, setNonPluginEntryModels, setOS, setPluginEntryModels, setPrimary, setPrimaryPluginID, setProvider, setUpdateSiteEntryModel, setWS`

Methods inherited from class org.eclipse.update.core.model.ModelObject
`arrayTypeFor, arrayTypeFor, assertIsWriteable, getPropertyName, getResourceBundle, isReadOnly, markListReferenceReadOnly, markReferenceReadOnly, resolveListReference, resolveNLString, resolveReference, resolveURL`

Methods inherited from class org.eclipse.core.runtime.PlatformObject
`getAdapter`

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

Methods inherited from interface org.eclipse.update.core.IFeature
`getAffinityFeature, getApplication, getLabel, getPrimaryPluginID, getProvider, isExclusive, isPatch, isPrimary`

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

Methods inherited from interface org.eclipse.update.core.IPlatformEnvironment
`getNL, getOS, getOSArch, getWS`

Field Detail

### FEATURE_FILE

    public static final String FEATURE_FILE

  Simple file name of the default feature manifest file

  Since:
    2.0
  See Also:
    Constant Field Values

### FEATURE_XML

    public static final String FEATURE_XML

  File extension of the default feature manifest file

  Since:
    2.0
  See Also:
    Constant Field Values

Constructor Detail

### Feature

    public Feature()

  Feature default constructor

Since:
  2.0

Method Detail

### equals

    public boolean equals(Object object)

  Compares two features for equality

  Overrides:
    `equals` in class `FeatureModel`
  Parameters:
    `object` - feature object to compare with
  Returns:
    `true` if the two features are equal, `false` otherwise
  Since:
    2.0

### getVersionedIdentifier

    public VersionedIdentifier getVersionedIdentifier()

  Returns the feature identifier.

  Specified by:
    `getVersionedIdentifier` in interface `IFeature`
  Returns:
    the feature identifier.
  Since:
    2.0
  See Also:
    `IFeature.getVersionedIdentifier()`

### getSite

    public ISite getSite()

  Returns the site this feature is associated with.

  Specified by:
    `getSite` in interface `IFeature`
  Returns:
    the site for this feature
  Since:
    2.0
  See Also:
    `IFeature.getSite()`

### getURL

    public URL getURL()

  Returns the feature URL.

  Specified by:
    `getURL` in interface `IFeature`
  Returns:
    feature URL
  Since:
    2.0
  See Also:
    `IFeature.getURL()`

### getUpdateSiteEntry

    public IURLEntry getUpdateSiteEntry()

  Returns an information entry referencing the location of the feature update site.

  Specified by:
    `getUpdateSiteEntry` in interface `IFeature`
  Returns:
    update site entry, or `null`.
  Since:
    2.0
  See Also:
    `IFeature.getUpdateSiteEntry()`

### getDiscoverySiteEntries

    public IURLEntry[] getDiscoverySiteEntries()

  Return an array of information entries referencing locations of other update sites.

  Specified by:
    `getDiscoverySiteEntries` in interface `IFeature`
  Returns:
    an array of site entries, or an empty array.
  Since:
    2.0
  See Also:
    `IFeature.getDiscoverySiteEntries()`

### getInstallHandlerEntry

    public IInstallHandlerEntry getInstallHandlerEntry()

  Returns and optional custom install handler entry.

  Specified by:
    `getInstallHandlerEntry` in interface `IFeature`
  Returns:
    install handler entry, or `null` if none was specified
  Since:
    2.0
  See Also:
    `IFeature.getInstallHandlerEntry()`

### getDescription

    public IURLEntry getDescription()

  Returns the feature description.

  Specified by:
    `getDescription` in interface `IFeature`
  Returns:
    feature rescription, or `null`.
  Since:
    2.0
  See Also:
    `IFeature.getDescription()`

### getCopyright

    public IURLEntry getCopyright()

  Returns the copyright information for the feature.

  Specified by:
    `getCopyright` in interface `IFeature`
  Returns:
    copyright information, or `null`.
  Since:
    2.0
  See Also:
    `IFeature.getCopyright()`

### getLicense

    public IURLEntry getLicense()

  Returns the license information for the feature.

  Specified by:
    `getLicense` in interface `IFeature`
  Returns:
    feature license, or `null`.
  Since:
    2.0
  See Also:
    `IFeature.getLicense()`

### getImage

    public URL getImage()

  Return optional image for the feature.

  Specified by:
    `getImage` in interface `IFeature`
  Returns:
    the URL pointing to the image, , or `null`.
  Since:
    2.0
  See Also:
    `IFeature.getImage()`

### getRawImports

    public IImport[] getRawImports()

  Return a list of plug-in dependencies for this feature.

  Specified by:
    `getRawImports` in interface `IFeature`
  Returns:
    the list of required plug-in dependencies, or an empty array.
  Since:
    2.0
  See Also:
    `IFeature.getRawImports()`

### install

    public IFeatureReference install(IFeature targetFeature,
                                     IVerificationListener verificationListener,
                                     IProgressMonitor progress)
                              throws InstallAbortedException,
                                     CoreException

  Install the contents of this feature into the specified target feature. This method is a reference implementation of the feature installation protocol. Other concrete feature implementation that override this method need to implement this protocol.

  Specified by:
    `install` in interface `IFeature`
  Parameters:
    `targetFeature` -
    `verificationListener` -
    `progress` -
  Throws:
    `InstallAbortedException` - when the user cancels the install
    `CoreException`
  Since:
    2.0
  See Also:
    `IFeature.install(IFeature, IVerificationListener, IProgressMonitor)`

### install

    public IFeatureReference install(IFeature targetFeature,
                                     IFeatureReference[] optionalfeatures,
                                     IVerificationListener verificationListener,
                                     IProgressMonitor progress)
                              throws InstallAbortedException,
                                     CoreException

  Install the contents of this feature into the specified target feature. This method is a reference implementation of the feature installation protocol. Other concrete feature implementation that override this method need to implement this protocol.

  Specified by:
    `install` in interface `IFeature`
  Parameters:
    `targetFeature` -
    `optionalfeatures` - the optional features to be installed
    `verificationListener` -
    `progress` -
  Throws:
    `CoreException`
    `InstallAbortedException` - when the user cancels the install
  Since:
    2.0
  See Also:
    `IFeature.install(IFeature, IVerificationListener, IProgressMonitor)`

### getRawPluginEntries

    public IPluginEntry[] getRawPluginEntries()

  Returns an array of plug-in entries referenced by this feature

  Specified by:
    `getRawPluginEntries` in interface `IFeature`
  Returns:
    an erray of plug-in entries, or an empty array.
  Since:
    2.0
  See Also:
    `IFeature.getPluginEntries()`

### getPluginEntryCount

    public int getPluginEntryCount()

  Returns the count of referenced plug-in entries.

  Specified by:
    `getPluginEntryCount` in interface `IFeature`
  Returns:
    plug-in entry count
  Since:
    2.0
  See Also:
    `IFeature.getPluginEntryCount()`

### getRawNonPluginEntries

    public INonPluginEntry[] getRawNonPluginEntries()

  Returns an array of non-plug-in entries referenced by this feature

  Specified by:
    `getRawNonPluginEntries` in interface `IFeature`
  Returns:
    an erray of non-plug-in entries, or an empty array.
  Since:
    2.0
  See Also:
    `IFeature.getNonPluginEntries()`

### getNonPluginEntryCount

    public int getNonPluginEntryCount()

  Returns the count of referenced non-plug-in entries.

  Specified by:
    `getNonPluginEntryCount` in interface `IFeature`
  Returns:
    non-plug-in entry count
  Since:
    2.0
  See Also:
    `IFeature.getNonPluginEntryCount()`

### getRawIncludedFeatureReferences

    public IIncludedFeatureReference[] getRawIncludedFeatureReferences()
                                                                throws CoreException

  Returns an array of feature references included by this feature

  Specified by:
    `getRawIncludedFeatureReferences` in interface `IFeature`
  Returns:
    an erray of feature references, or an empty array.
  Throws:
    `CoreException`
  Since:
    2.0

### getDownloadSize

    public long getDownloadSize()

  Returns the download size of the feature, if it can be determined.

  Specified by:
    `getDownloadSize` in interface `IFeature`
  Returns:
    download size of the feature in KiloBytes, or an indication the size could not be determined
  Since:
    2.0
  See Also:
    `IFeature.getDownloadSize()`

### getInstallSize

    public long getInstallSize()

  Returns the install size of the feature, if it can be determined.

  Specified by:
    `getInstallSize` in interface `IFeature`
  Returns:
    install size of the feature in KiloBytes, or an indication the size could not be determined
  Since:
    2.0
  See Also:
    `IFeature.getInstallSize()`

### getFeatureContentProvider

    public IFeatureContentProvider getFeatureContentProvider()
                                                      throws CoreException

  Returns the content provider for this feature.

  Specified by:
    `getFeatureContentProvider` in interface `IFeature`
  Returns:
    feature content provider
  Throws:
    `CoreException`
  Since:
    2.0
  See Also:
    `IFeature.getFeatureContentProvider()`

### getFeatureContentConsumer

    public IFeatureContentConsumer getFeatureContentConsumer()
                                                      throws CoreException

  Returns the content consumer for this feature.

  Specified by:
    `getFeatureContentConsumer` in interface `IFeature`
  Returns:
    feature content consumer
  Throws:
    `CoreException`
  Since:
    2.0
  See Also:
    `IFeature.getFeatureContentConsumer()`

### setSite

    public void setSite(ISite site)
                 throws CoreException

  Sets the site for this feature.

  Specified by:
    `setSite` in interface `IFeature`
  Parameters:
    `site` - the site
  Throws:
    `CoreException` - site for this feature is already set
  Since:
    2.0
  See Also:
    `IFeature.setSite(ISite)`

### setFeatureContentProvider

    public void setFeatureContentProvider(IFeatureContentProvider featureContentProvider)

  Sets the content provider for this feature.

  Specified by:
    `setFeatureContentProvider` in interface `IFeature`
  Parameters:
    `featureContentProvider` - content provider
  Since:
    2.0
  See Also:
    `IFeature.setFeatureContentProvider(IFeatureContentProvider)`

### toString

    public String toString()

  Return the string representation of this fetaure

  Returns:
    feature as string
  Since:
    2.0

### getIncludedFeatureReferences

    public IIncludedFeatureReference[] getIncludedFeatureReferences()
                                                             throws CoreException

  Description copied from interface: `IFeature`
  Returns an array of feature references included by this feature filtered by the operating system, windowing system and architecture system set in `Sitemanager`

  Specified by:
    `getIncludedFeatureReferences` in interface `IFeature`
  Returns:
    an erray of feature references, or an empty array.
  Throws:
    `CoreException`
  See Also:
    `IFeature.getRawIncludedFeatureReferences()`

### getNonPluginEntries

    public INonPluginEntry[] getNonPluginEntries()

  Description copied from interface: `IFeature`
  Returns an array of non-plug-in entries referenced by this feature filtered by the operating system, windowing system and architecture system set in `Sitemanager`

  Specified by:
    `getNonPluginEntries` in interface `IFeature`
  Returns:
    an erray of non-plug-in entries, or an empty array.
  See Also:
    `IFeature.getRawNonPluginEntries()`

### getPluginEntries

    public IPluginEntry[] getPluginEntries()

  Description copied from interface: `IFeature`
  Returns an array of plug-in entries referenced by this feature filtered by the operating system, windowing system and architecture system set in `Sitemanager`

  Specified by:
    `getPluginEntries` in interface `IFeature`
  Returns:
    an erray of plug-in entries, or an empty array.
  See Also:
    `IFeature.getRawPluginEntries()`

### getImports

    public IImport[] getImports()

  Description copied from interface: `IFeature`
  Return a list of plug-in dependencies for this feature. A plug-in dependency is a reference to a plug-in required for feature execution that is not packaged as part of the feature. filtered by the operating system, windowing system and architecture system set in `Sitemanager`

  Specified by:
    `getImports` in interface `IFeature`
  Returns:
    the list of required plug-in dependencies, or an empty array.
  See Also:
    `IFeature.getImports()`

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.