|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Feature content provider. A feature content provider is an abstraction of each feature internal packaging structure. It allows the feature content to be accessed in a standard way regardless of the internal packaging. All concrete feature implementations need to implement a feature content provider.
There are two ways of looking at a feature content:
Clients may implement this interface. However, in most cases clients should directly instantiate or subclass the provided implementation of this interface.
FeatureContentProvider
Method Summary | |
ContentReference[] |
getArchiveReferences(InstallMonitor monitor)
Returns an array of content references of all the "packaged" archives that make up this feature. |
long |
getDownloadSizeFor(IPluginEntry[] pluginEntries,
INonPluginEntry[] nonPluginEntries)
Returns the total size of all archives required for the specified plug-in and non-plug-in entries (the "packaging" view). |
IFeature |
getFeature()
Returns the feature associated with this content provider. |
ContentReference[] |
getFeatureEntryArchiveReferences(InstallMonitor monitor)
Returns an array of content references of the "packaged" archives that contain the feature descriptive information. |
ContentReference[] |
getFeatureEntryContentReferences(InstallMonitor monitor)
Returns an array of content references to the feature definition files (ie. |
ContentReference |
getFeatureManifestReference(InstallMonitor monitor)
Returns a content reference to the feature manifest. |
long |
getInstallSizeFor(IPluginEntry[] pluginEntries,
INonPluginEntry[] nonPluginEntries)
Returns the total size of all files required for the specified plug-in and non-plug-in entries (the "logical" view). |
ContentReference[] |
getNonPluginEntryArchiveReferences(INonPluginEntry nonPluginEntry,
InstallMonitor monitor)
Returns an array of content references of the "packaged" archives that contain the files for the specified non-plug-in entry. |
ContentReference[] |
getPluginEntryArchiveReferences(IPluginEntry pluginEntry,
InstallMonitor monitor)
Returns an array of content references of the "packaged" archives that contain the files for the specified plug-in entry. |
ContentReference[] |
getPluginEntryContentReferences(IPluginEntry pluginEntry,
InstallMonitor monitor)
Returns an array of content references to the files implementing the specified plug-in. |
URL |
getURL()
Returns the feature url. |
IVerifier |
getVerifier()
Returns the verifier for this feature. |
void |
setFeature(IFeature feature)
Sets the feature associated with this content provider. |
Method Detail |
public URL getURL()
public ContentReference getFeatureManifestReference(InstallMonitor monitor) throws CoreException
monitor
- progress monitor, can be null
null
if the manifest cannot be found.
CoreException
public ContentReference[] getArchiveReferences(InstallMonitor monitor) throws CoreException
The number of returned references is dependent on each feature content provider (ie. is dependent on the packaging mechanism used by the particular feature type).
monitor
- progress monitor, can be null
CoreException
public ContentReference[] getFeatureEntryArchiveReferences(InstallMonitor monitor) throws CoreException
In general, the feature descriptive information should be packaged separately from the "bulk" of the actual feature content. The feature entry archive(s) must be downloaded from an update site in order to present information about the feature to the client. Consequently, keeping the number and size of the feature entry archive(s) to a minimum will speed up the responsiveness of the user interface.
The number of returned references is dependent on each feature content provider (ie. is dependent on the packaging mechanism used by the particular feature type).
monitor
- progress monitor, can be null
CoreException
getFeatureEntryContentReferences(InstallMonitor)
public ContentReference[] getPluginEntryArchiveReferences(IPluginEntry pluginEntry, InstallMonitor monitor) throws CoreException
The number of returned references is dependent on each feature content provider (ie. is dependent on the packaging mechanism used by the particular feature type).
pluginEntry
- plug-in entrymonitor
- progress monitor, can be null
CoreException
getPluginEntryContentReferences(IPluginEntry, InstallMonitor)
public ContentReference[] getNonPluginEntryArchiveReferences(INonPluginEntry nonPluginEntry, InstallMonitor monitor) throws CoreException
The number of returned references is dependent on each feature content provider (ie. is dependent on the packaging mechanism used by the particular feature type).
Note, that the platform does not interpret non-plug-in entries in any way, other that performing any required downloads. Non-plug-in entries are handled by custom install handlers that must be specified for the feature. Consequently, this interface does not make a distinction between the "logical" and "packaged" views for non-plug-in entries. The "packaged" view (returning references to the non-plug-in archives) is the only one supported. It is the responsibility of the custom install handler to understand the "logical" view of non-plug-in archives.
monitor
- progress monitor, can be null
CoreException
public ContentReference[] getFeatureEntryContentReferences(InstallMonitor monitor) throws CoreException
monitor
- progress monitor, can be null
CoreException
- when an error occursgetFeatureEntryArchiveReferences(InstallMonitor)
public ContentReference[] getPluginEntryContentReferences(IPluginEntry pluginEntry, InstallMonitor monitor) throws CoreException
monitor
- progress monitor, can be null
CoreException
getPluginEntryArchiveReferences(IPluginEntry, InstallMonitor)
public long getDownloadSizeFor(IPluginEntry[] pluginEntries, INonPluginEntry[] nonPluginEntries)
pluginEntries
- an array of plug-in entriesnonPluginEntries
- an array of non-plug-in entries
CoreException
ContentEntryModel.UNKNOWN_SIZE
public long getInstallSizeFor(IPluginEntry[] pluginEntries, INonPluginEntry[] nonPluginEntries)
pluginEntries
- an array of plug-in entriesnonPluginEntries
- an array of non-plug-in entries
CoreException
ContentEntryModel.UNKNOWN_SIZE
public IVerifier getVerifier() throws CoreException
CoreException
public IFeature getFeature()
public void setFeature(IFeature feature)
feature
- feature for this content provider
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |