public interface ISite extends IAdaptable
Clients may implement this interface. However, in most cases clients should directly instantiate or subclass the provided implementation of this interface.
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.
Site| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_INSTALLED_FEATURE_TYPE
Default type for an installed feature.
|
static String |
DEFAULT_PACKAGED_FEATURE_TYPE
Default type for a packaged feature.
|
static int |
SITE_ACCESS_EXCEPTION
If we are unable to access a site, the returned CoreException will contain
this return code.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPluginEntry(IPluginEntry pluginEntry)
Adds a new plug-in entry to this site.
|
IFeature |
createFeature(String type,
URL url)
Deprecated.
use createFeature(String,URL,IProgressMonitor) instead
|
IFeature |
createFeature(String type,
URL url,
IProgressMonitor monitor)
Creates a new feature object.
|
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 name)
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)
Returns the size of the files that need to be downloaded in order
to install the specified feature on this site, if it can be determined.
|
ISiteFeatureReference |
getFeatureReference(IFeature feature)
Returns a reference to the specified feature if
it is installed on this site.
|
ISiteFeatureReference[] |
getFeatureReferences()
Returns an array of references to features on this site.
|
long |
getInstallSizeFor(IFeature feature)
Returns the size of the files that need to be installed
for the specified feature on this site, if it can be determined.
|
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.
|
String |
getType()
Return the site type.
|
URL |
getURL()
Returns the site URL
|
IFeatureReference |
install(IFeature feature,
IFeatureReference[] optionalfeatures,
IVerificationListener verificationListener,
IProgressMonitor monitor)
Installs the specified feature on this site.
|
IFeatureReference |
install(IFeature feature,
IVerificationListener verificationListener,
IProgressMonitor monitor)
Installs the specified feature on this site.
|
void |
remove(IFeature feature,
IProgressMonitor monitor)
Removes (uninstalls) the specified feature from this site.
|
void |
setSiteContentProvider(ISiteContentProvider siteContentProvider)
Sets the site content provider.
|
getAdapterstatic final String DEFAULT_INSTALLED_FEATURE_TYPE
org.eclipse.update.core.featureTypes
extension point.static final String DEFAULT_PACKAGED_FEATURE_TYPE
org.eclipse.update.core.featureTypes
extension point.static final int SITE_ACCESS_EXCEPTION
URL getURL()
String getType()
org.eclipse.update.core.siteTypes extension point.null.IURLEntry getDescription()
null.ICategory[] getCategories()
ICategory getCategory(String name)
name - category namenull ifit does not existISiteFeatureReference[] getFeatureReferences()
ISiteFeatureReference[] getRawFeatureReferences()
ISiteFeatureReference getFeatureReference(IFeature feature)
Sitemanagerfeature - featurenull if this feature
cannot be located on this site.IArchiveReference[] getArchives()
ISiteContentProvider getSiteContentProvider() throws CoreException
CoreExceptionString getDefaultPackagedFeatureType()
org.eclipse.update.core.featureTypes extension point.IPluginEntry[] getPluginEntries()
int getPluginEntryCount()
void addPluginEntry(IPluginEntry pluginEntry)
pluginEntry - plug-in entryIPluginEntry[] getPluginEntriesOnlyReferencedBy(IFeature feature) throws CoreException
feature - featureCoreExceptionlong getDownloadSizeFor(IFeature feature)
feature - candidate featureContentEntryModel.UNKNOWN_SIZElong getInstallSizeFor(IFeature feature)
feature - candidate featureContentEntryModel.UNKNOWN_SIZEIFeatureReference install(IFeature feature, IVerificationListener verificationListener, IProgressMonitor monitor) throws InstallAbortedException, CoreException
feature - feature to installverificationListener - install verification listenermonitor - install monitor, can be nullInstallAbortedException - when the user cancels the installCoreExceptionIFeatureReference install(IFeature feature, IFeatureReference[] optionalfeatures, IVerificationListener verificationListener, IProgressMonitor monitor) throws InstallAbortedException, CoreException
feature - feature to installoptionalfeatures - list of optional features to be installedverificationListener - install verification listenermonitor - install monitor, can be nullInstallAbortedException - when the user cancels the installCoreExceptionvoid remove(IFeature feature, IProgressMonitor monitor) throws CoreException
feature - feature to removemonitor - progress monitorCoreExceptionvoid setSiteContentProvider(ISiteContentProvider siteContentProvider)
siteContentProvider - site content providerIConfiguredSite getCurrentConfiguredSite()
IConfiguredSite for this site in the current
configuration or null if none found.IFeature createFeature(String type, URL url) throws CoreException
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.CoreExceptionIFeature createFeature(String type, URL url, IProgressMonitor monitor) throws CoreException
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.monitor - the progress monitorCoreExceptionGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.