Eclipse Platform
2.1

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.

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

FEATURE_XML

public static final String FEATURE_XML
File extension of the default feature manifest file
Since:
2.0
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
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
Since:
2.0
See Also:
IFeature.getSite()

getURL

public URL getURL()
Returns the feature URL.
Specified by:
getURL in interface IFeature
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
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
Since:
2.0
See Also:
IFeature.getDiscoverySiteEntries()

getInstallHandlerEntry

public IInstallHandlerEntry getInstallHandlerEntry()
Returns and optional custom install handler entry.
Specified by:
getInstallHandlerEntry in interface IFeature
Since:
2.0
See Also:
IFeature.getInstallHandlerEntry()

getDescription

public IURLEntry getDescription()
Returns the feature description.
Specified by:
getDescription in interface IFeature
Since:
2.0
See Also:
IFeature.getDescription()

getCopyright

public IURLEntry getCopyright()
Returns the copyright information for the feature.
Specified by:
getCopyright in interface IFeature
Since:
2.0
See Also:
IFeature.getCopyright()

getLicense

public IURLEntry getLicense()
Returns the license information for the feature.
Specified by:
getLicense in interface IFeature
Since:
2.0
See Also:
IFeature.getLicense()

getImage

public URL getImage()
Return optional image for the feature.
Specified by:
getImage in interface IFeature
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
Since:
2.0
See Also:
IFeature.setFeatureContentProvider(IFeatureContentProvider)

toString

public String toString()
Return the string representation of this fetaure
Overrides:
toString in class Object
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
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
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
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
See Also:
IFeature.getImports()

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.