Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.update.core
Interface ISite

All Superinterfaces:
  IAdaptable

All Known Implementing Classes:
  Site

public interface ISite
extends IAdaptable

Site represents a location containing some number of features (packaged or installed). Sites are treated purely as an installation and packaging construct. They do not play a role during Eclipse plug-in execution.

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.

Since:
  2.0
See Also:
  `Site`

Field Summary
`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.

Method Summary
`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.

Methods inherited from interface org.eclipse.core.runtime.IAdaptable
`getAdapter`

Field Detail

### DEFAULT_INSTALLED_FEATURE_TYPE

    public static final String DEFAULT_INSTALLED_FEATURE_TYPE

  Default type for an installed feature. Different concrete feature implementations can be registered together with their corresponding type using the `org.eclipse.update.core.featureTypes` extension point.

  Since:
    2.0
  See Also:
    Constant Field Values

### DEFAULT_PACKAGED_FEATURE_TYPE

    public static final String DEFAULT_PACKAGED_FEATURE_TYPE

  Default type for a packaged feature. Different concrete feature implementations can be registered together with their corresponding type using the `org.eclipse.update.core.featureTypes` extension point.

  Since:
    2.0
  See Also:
    Constant Field Values

### SITE_ACCESS_EXCEPTION

    public static final int SITE_ACCESS_EXCEPTION

  If we are unable to access a site, the returned CoreException will contain this return code.

  Since:
    2.0.1
  See Also:
    Constant Field Values

Method Detail

### getURL

    public URL getURL()

  Returns the site URL

  Returns:
    site URL
  Since:
    2.0

### getType

    public String getType()

  Return the site type. Different concrete site implementations can be registered together with their corresponding type using the `org.eclipse.update.core.siteTypes` extension point.

  Returns:
    site type, or `null`.
  Since:
    2.0

### getDescription

    public IURLEntry getDescription()

  Returns the site description.

  Returns:
    site description, or `null`.
  Since:
    2.0

### getCategories

    public ICategory[] getCategories()

  Returns an array of categories defined by the site.

  Returns:
    array of site categories, or an empty array.
  Since:
    2.0

### getCategory

    public ICategory getCategory(String name)

  Returns the named site category.

  Parameters:
    `name` - category name
  Returns:
    named category, or `null` ifit does not exist
  Since:
    2.0

### getFeatureReferences

    public ISiteFeatureReference[] getFeatureReferences()

  Returns an array of references to features on this site.

  Returns:
    an array of feature references, or an empty array.
  Since:
    2.0

### getRawFeatureReferences

    public ISiteFeatureReference[] getRawFeatureReferences()

  Returns an array of references to features on this site. No filtering occurs.

  Returns:
    an array of feature references, or an empty array..
  Since:
    2.1

### getFeatureReference

    public ISiteFeatureReference getFeatureReference(IFeature feature)

  Returns a reference to the specified feature if it is installed on this site. filtered by the operating system, windowing system and architecture system set in `Sitemanager`

  Parameters:
    `feature` - feature
  Returns:
    feature reference, or `null` if this feature cannot be located on this site.
  Since:
    2.0

### getArchives

    public IArchiveReference[] getArchives()

  Returns an array of plug-in and non-plug-in archives located on this site

  Returns:
    an array of archive references, or an empty array if there are no archives known to this site. Note, that an empty array does not necessarily indicate there are no archives accessible on this site. It simply indicates the site has no prior knowledge of such archives.
  Since:
    2.0

### getSiteContentProvider

    public ISiteContentProvider getSiteContentProvider()
                                                throws CoreException

  Returns the content provider for this site. A content provider is an abstraction of each site organization. It allows the content of the site to be accessed in a standard way regardless of the organization. All concrete sites need to be able to return a content provider.

  Returns:
    site content provider
  Throws:
    `CoreException`
  Since:
    2.0

### getDefaultPackagedFeatureType

    public String getDefaultPackagedFeatureType()

  Returns the default type for a packaged feature supported by this site

  Returns:
    feature type, as registered in the `org.eclipse.update.core.featureTypes` extension point.
  Since:
    2.0

### getPluginEntries

    public IPluginEntry[] getPluginEntries()

  Returns an array of entries corresponding to plug-ins installed on this site.

  Returns:
    array of plug-in entries,or an empty array.
  Since:
    2.0

### getPluginEntryCount

    public int getPluginEntryCount()

  Returns the number of plug-ins installed on this site

  Returns:
    number of installed plug-ins
  Since:
    2.0

### addPluginEntry

    public void addPluginEntry(IPluginEntry pluginEntry)

  Adds a new plug-in entry to this site.

  Parameters:
    `pluginEntry` - plug-in entry
  Since:
    2.0

### getPluginEntriesOnlyReferencedBy

    public IPluginEntry[] getPluginEntriesOnlyReferencedBy(IFeature feature)
                                                    throws CoreException

  Returns an array of entries corresponding to plug-ins that are installed on this site and are referenced only by the specified feature. These are plug-ins that are not shared with any other feature.

  Parameters:
    `feature` - feature
  Returns:
    an array of plug-in entries, or an empty array.
  Throws:
    `CoreException`
  Since:
    2.0

### getDownloadSizeFor

    public 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. This method takes into account any plug-ins that are already available on this site.

  Parameters:
    `feature` - candidate feature
  Returns:
    download size of the feature in KiloBytes, or an indication the size could not be determined
  Since:
    2.0
  See Also:
    `ContentEntryModel.UNKNOWN_SIZE`

### getInstallSizeFor

    public 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. This method takes into account any plug-ins that are already installed on this site.

  Parameters:
    `feature` - candidate feature
  Returns:
    install size of the feature in KiloBytes, or an indication the size could not be determined
  Since:
    2.0
  See Also:
    `ContentEntryModel.UNKNOWN_SIZE`

### install

    public IFeatureReference install(IFeature feature,
                                     IVerificationListener verificationListener,
                                     IProgressMonitor monitor)
                              throws InstallAbortedException,
                                     CoreException

  Installs the specified feature on this site.

  Parameters:
    `feature` - feature to install
    `verificationListener` - install verification listener
    `monitor` - install monitor, can be `null`
  Throws:
    `InstallAbortedException` - when the user cancels the install
    `CoreException`
  Since:
    2.0

### install

    public IFeatureReference install(IFeature feature,
                                     IFeatureReference[] optionalfeatures,
                                     IVerificationListener verificationListener,
                                     IProgressMonitor monitor)
                              throws InstallAbortedException,
                                     CoreException

  Installs the specified feature on this site. Only optional features passed as parameter will be installed.

  Parameters:
    `feature` - feature to install
    `optionalfeatures` - list of optional features to be installed
    `verificationListener` - install verification listener
    `monitor` - install monitor, can be `null`
  Throws:
    `InstallAbortedException` - when the user cancels the install
    `CoreException`
  Since:
    2.0

### remove

    public void remove(IFeature feature,
                       IProgressMonitor monitor)
                throws CoreException

  Removes (uninstalls) the specified feature from this site. This method takes into account plug-in entries referenced by the specified fetaure that continue to be required by other features installed on this site.

  Parameters:
    `feature` - feature to remove
    `monitor` - progress monitor
  Throws:
    `CoreException`
  Since:
    2.0

### setSiteContentProvider

    public void setSiteContentProvider(ISiteContentProvider siteContentProvider)

  Sets the site content provider. This is typically performed as part of the site creation operation. Once set, the provider should not be reset.

  Parameters:
    `siteContentProvider` - site content provider
  Since:
    2.0

### getCurrentConfiguredSite

    public IConfiguredSite getCurrentConfiguredSite()

  Returns the `IConfiguredSite` for this site in the current configuration or `null` if none found.

  Since:
    2.0.2

### createFeature

    public IFeature createFeature(String type,
                                  URL url)
                           throws CoreException

  Deprecated. use createFeature(String,URL,IProgressMonitor) instead

  Creates a new feature object. The feature must exist on this site or a core exception will be thrown. Concrete implementations may elect to cache instances, in which case subsequent calls to create a feature with the same URL will return the same instance. param type the feature type that will be used to select the factory. If `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.

  Throws:
    `CoreException`
  Since:
    2.0.2

### createFeature

    public IFeature createFeature(String type,
                                  URL url,
                                  IProgressMonitor monitor)
                           throws CoreException

  Creates a new feature object. The feature must exist on this site or a core exception will be thrown. Concrete implementations may elect to cache instances, in which case subsequent calls to create a feature with the same URL will return the same instance. param type the feature type that will be used to select the factory. If `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.

  Parameters:
    `monitor` - the progress monitor
  Throws:
    `CoreException`
  Since:
    2.1

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| 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.