|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.update.core.model.ModelObject
org.eclipse.update.core.model.SiteModel
org.eclipse.update.core.Site
Convenience implementation of a site.
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.
ISite
,
SiteModel
Field Summary | |
static String |
DEFAULT_FEATURE_PATH
Default path on a site where packaged features are located |
static String |
DEFAULT_INSTALLED_FEATURE_PATH
Default installation path for features |
static String |
DEFAULT_PLUGIN_PATH
Default installation path for plug-ins and plug-in fragments |
static String |
SITE_FILE
Default site manifest file name |
static String |
SITE_XML
Default site manifest extension |
Fields inherited from interface org.eclipse.update.core.ISite |
DEFAULT_INSTALLED_FEATURE_TYPE, DEFAULT_PACKAGED_FEATURE_TYPE, SITE_ACCESS_EXCEPTION |
Constructor Summary | |
Site()
Constructor for Site |
Method Summary | |
void |
addPluginEntry(IPluginEntry pluginEntry)
Adds a new plug-in entry to this site. |
IFeature |
createFeature(String type,
URL url)
Creates a new feature object. |
IFeature |
createFeature(String type,
URL url,
IProgressMonitor monitor)
Creates a new feature object. |
boolean |
equals(Object obj)
Compares two sites for equality |
IArchiveReference[] |
getArchives()
Returns an array of plug-in and non-plug-in archives located on this site |
ICategory[] |
getCategories()
Returns an array of categories defined by the site. |
ICategory |
getCategory(String key)
Returns the named site category. |
IConfiguredSite |
getCurrentConfiguredSite()
Returns the IConfiguredSite for this site in the current
configuration or null if none found. |
String |
getDefaultPackagedFeatureType()
Returns the default type for a packaged feature supported by this site |
IURLEntry |
getDescription()
Returns the site description. |
long |
getDownloadSizeFor(IFeature feature)
Get download size for the specified feature on this site. |
ISiteFeatureReference |
getFeatureReference(IFeature feature)
Returns a reference to the specified feature on this site. |
ISiteFeatureReference[] |
getFeatureReferences()
Returns an array of references to features on this site. |
long |
getInstallSizeFor(IFeature feature)
Get install size for the specified feature on this site. |
IPluginEntry[] |
getPluginEntries()
Returns an array of entries corresponding to plug-ins installed on this site. |
IPluginEntry[] |
getPluginEntriesOnlyReferencedBy(IFeature feature)
Returns an array of entries corresponding to plug-ins that are installed on this site and are referenced only by the specified feature. |
int |
getPluginEntryCount()
Returns the number of plug-ins installed on this site |
ISiteFeatureReference[] |
getRawFeatureReferences()
Returns an array of references to features on this site. |
ISiteContentProvider |
getSiteContentProvider()
Returns the content provider for this site. |
URL |
getURL()
Returns the site URL |
IFeatureReference |
install(IFeature sourceFeature,
IFeatureReference[] optionalFeatures,
IFeatureContentConsumer parentContentConsumer,
IVerifier parentVerifier,
IVerificationListener verificationListener,
IProgressMonitor progress)
Install the specified feature on this site using the content consumer as a context to install the feature in. |
IFeatureReference |
install(IFeature sourceFeature,
IFeatureReference[] optionalFeatures,
IVerificationListener verificationListener,
IProgressMonitor progress)
Install the specified feature and listed optional features on this site. |
IFeatureReference |
install(IFeature sourceFeature,
IVerificationListener verificationListener,
IProgressMonitor progress)
Install the specified feature and all optional features on this site. |
void |
remove(IFeature feature,
IProgressMonitor progress)
Remove (uninstall) the specified feature from this site. |
protected void |
removeFeatureFromCache(URL featureURL)
|
void |
setSiteContentProvider(ISiteContentProvider siteContentProvider)
Sets the site content provider. |
Methods inherited from class org.eclipse.update.core.model.ModelObject |
arrayTypeFor, arrayTypeFor, assertIsWriteable, 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, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.update.core.ISite |
getType |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
Field Detail |
public static final String DEFAULT_INSTALLED_FEATURE_PATH
public static final String DEFAULT_PLUGIN_PATH
public static final String DEFAULT_FEATURE_PATH
public static final String SITE_FILE
public static final String SITE_XML
Constructor Detail |
public Site()
Method Detail |
public boolean equals(Object obj)
obj
- site object to compare with
true
if the two sites are equal,
false
otherwisepublic URL getURL()
getURL
in interface ISite
ISite.getURL()
public IURLEntry getDescription()
getDescription
in interface ISite
null
.ISite.getDescription()
public ICategory[] getCategories()
getCategories
in interface ISite
ISite.getCategories()
public ICategory getCategory(String key)
getCategory
in interface ISite
key
- category name
null
ifit does not existISite.getCategory(String)
public ISiteFeatureReference[] getRawFeatureReferences()
getRawFeatureReferences
in interface ISite
ISite.getFeatureReferences()
public ISiteFeatureReference[] getFeatureReferences()
ISite
getFeatureReferences
in interface ISite
ISite.getFeatureReferences()
public ISiteFeatureReference getFeatureReference(IFeature feature)
getFeatureReference
in interface ISite
feature
- feature
null
if this feature
cannot be located on this site.ISite.getFeatureReference(IFeature)
public IArchiveReference[] getArchives()
getArchives
in interface ISite
ISite.getArchives()
public ISiteContentProvider getSiteContentProvider() throws CoreException
getSiteContentProvider
in interface ISite
CoreException
ISite.getSiteContentProvider()
public String getDefaultPackagedFeatureType()
getDefaultPackagedFeatureType
in interface ISite
org.eclipse.update.core.featureTypes
extension point.ISite.getDefaultPackagedFeatureType()
public IPluginEntry[] getPluginEntries()
getPluginEntries
in interface ISite
ISite.getPluginEntries()
public int getPluginEntryCount()
getPluginEntryCount
in interface ISite
ISite.getPluginEntryCount()
public IPluginEntry[] getPluginEntriesOnlyReferencedBy(IFeature feature) throws CoreException
getPluginEntriesOnlyReferencedBy
in interface ISite
feature
- feature
CoreException
*
public void addPluginEntry(IPluginEntry pluginEntry)
addPluginEntry
in interface ISite
pluginEntry
- plug-in entry
UnsupportedOperationException
ISite.addPluginEntry(IPluginEntry)
public long getDownloadSizeFor(IFeature feature)
getDownloadSizeFor
in interface ISite
feature
- candidate feature
UnsupportedOperationException
ISite.getDownloadSizeFor(IFeature)
public long getInstallSizeFor(IFeature feature)
getInstallSizeFor
in interface ISite
feature
- candidate feature
UnsupportedOperationException
ISite.getInstallSizeFor(IFeature)
public IFeatureReference install(IFeature sourceFeature, IVerificationListener verificationListener, IProgressMonitor progress) throws InstallAbortedException, CoreException
install
in interface ISite
sourceFeature
- feature to installverificationListener
- install verification listenerprogress
- install monitor, can be null
InstallAbortedException
- when the user cancels the install
CoreException
UnsupportedOperationException
ISite.install(IFeature, IVerificationListener, IProgressMonitor)
public IFeatureReference install(IFeature sourceFeature, IFeatureReference[] optionalFeatures, IVerificationListener verificationListener, IProgressMonitor progress) throws InstallAbortedException, CoreException
install
in interface ISite
sourceFeature
- feature to installoptionalFeatures
- list of optional features to be installedverificationListener
- install verification listenerprogress
- install monitor, can be null
InstallAbortedException
- when the user cancels the install
CoreException
UnsupportedOperationException
ISite.install(IFeature, IVerificationListener, IProgressMonitor)
public IFeatureReference install(IFeature sourceFeature, IFeatureReference[] optionalFeatures, IFeatureContentConsumer parentContentConsumer, IVerifier parentVerifier, IVerificationListener verificationListener, IProgressMonitor progress) throws CoreException
sourceFeature
- feature to installparentContentConsumer
- content consumer of the parent featureparentVerifier
- verifier of the parent featureverificationListener
- install verification listenerprogress
- install monitor, can be null
InstallAbortedException
- when the user cancels the install
CoreException
UnsupportedOperationException
public void remove(IFeature feature, IProgressMonitor progress) throws CoreException
remove
in interface ISite
feature
- feature to removeprogress
- progress monitor
UnsupportedOperationException
CoreException
ISite.remove(IFeature, IProgressMonitor)
public void setSiteContentProvider(ISiteContentProvider siteContentProvider)
setSiteContentProvider
in interface ISite
siteContentProvider
- site content providerISite.setSiteContentProvider(ISiteContentProvider)
public IConfiguredSite getCurrentConfiguredSite()
ISite
IConfiguredSite
for this site in the current
configuration or null
if none found.
getCurrentConfiguredSite
in interface ISite
ISite.getCurrentConfiguredSite()
public IFeature createFeature(String type, URL url) throws CoreException
ISite
null
is passed, default feature type will be used.
param url URL of the feature archive as listed in the site.
return newly created feature object, or a cached value if
caching is implemented by this site.
createFeature
in interface ISite
CoreException
ISite.createFeature(String, URL)
public IFeature createFeature(String type, URL url, IProgressMonitor monitor) throws CoreException
ISite
null
is passed, default feature type will be used.
param url URL of the feature archive as listed in the site.
return newly created feature object, or a cached value if
caching is implemented by this site.
createFeature
in interface ISite
monitor
- the progress monitor
CoreException
ISite.createFeature(String, URL,
IProgressMonitor)
protected void removeFeatureFromCache(URL featureURL)
|
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.