|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.update.core.FeatureContentProvider
Base implementation of a feature content provider. This class provides a set of helper methods useful for implementing feature content providers. In particular, methods dealing with downloading and caching of feature files.
This class must be subclassed by clients.
IFeatureContentProvider
Field Summary | |
static String |
JAR_EXTENSION
|
Constructor Summary | |
FeatureContentProvider(URL base)
Feature content provider constructor |
Method Summary | |
File |
asLocalFile(ContentReference ref,
InstallMonitor monitor)
Returns the specified reference as a local file. |
ContentReference |
asLocalReference(ContentReference ref,
InstallMonitor monitor)
Returns the specified reference as a local file system reference. |
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. |
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). |
protected String |
getPathID(INonPluginEntry entry)
Returns the path identifer for a non plugin entry. |
protected String |
getPathID(IPluginEntry entry)
Returns the path identifier for a plugin entry. |
URL |
getURL()
Returns the feature url. |
protected File |
getWorkingDirectory()
Returns working directory for this content provider |
void |
setFeature(IFeature feature)
Sets the feature associated with this content provider. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.update.core.IFeatureContentProvider |
getArchiveReferences, getFeatureEntryArchiveReferences, getFeatureEntryContentReferences, getFeatureManifestReference, getNonPluginEntryArchiveReferences, getPluginEntryArchiveReferences, getPluginEntryContentReferences, getVerifier |
Field Detail |
public static final String JAR_EXTENSION
Constructor Detail |
public FeatureContentProvider(URL base)
base
- feature URL. The interpretation of this URL
is specific to each content provider.Method Detail |
public URL getURL()
getURL
in interface IFeatureContentProvider
IFeatureContentProvider.getURL()
public IFeature getFeature()
getFeature
in interface IFeatureContentProvider
IFeatureContentProvider.getFeature()
public void setFeature(IFeature feature)
setFeature
in interface IFeatureContentProvider
feature
- feature for this content providerIFeatureContentProvider.setFeature(IFeature)
public ContentReference asLocalReference(ContentReference ref, InstallMonitor monitor) throws IOException, CoreException
ref
- content referencemonitor
- progress monitor, can be null
IOException
CoreException
public File asLocalFile(ContentReference ref, InstallMonitor monitor) throws IOException, CoreException
ref
- content referencemonitor
- progress monitor, can be null
IOException
CoreException
protected File getWorkingDirectory() throws IOException
IOException
public long getDownloadSizeFor(IPluginEntry[] pluginEntries, INonPluginEntry[] nonPluginEntries)
getDownloadSizeFor
in interface IFeatureContentProvider
pluginEntries
- an array of plug-in entriesnonPluginEntries
- an array of non-plug-in entries
IFeatureContentProvider.getDownloadSizeFor(IPluginEntry[], INonPluginEntry[])
public long getInstallSizeFor(IPluginEntry[] pluginEntries, INonPluginEntry[] nonPluginEntries)
getInstallSizeFor
in interface IFeatureContentProvider
pluginEntries
- an array of plug-in entriesnonPluginEntries
- an array of non-plug-in entries
IFeatureContentProvider.getInstallSizeFor(IPluginEntry[], INonPluginEntry[])
protected String getPathID(IPluginEntry entry)
plugins/<pluginId>_<pluginVersion>.jar
protected String getPathID(INonPluginEntry entry)
features/<featureId>_<featureVersion>/<dataId>
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |