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.model
Class FeatureModel

    java.lang.Object
      org.eclipse.core.runtime.PlatformObject
          org.eclipse.update.core.model.ModelObject
              org.eclipse.update.core.model.FeatureModel

All Implemented Interfaces:
  IAdaptable

Direct Known Subclasses:
  Feature

public class FeatureModel
extends ModelObject

Feature model object.

This class may be instantiated or subclassed by clients. However, in most cases clients should instead instantiate or subclass the provided concrete implementation of this model.

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:
  `Feature`

Constructor Summary
`FeatureModel()` Creates an uninitialized feature object.

Method Summary
`void` | `addDiscoverySiteEntryModel(URLEntryModel discoverySiteInfo)` Adds an additional update site reference.
`void` | `addImportModel(ImportModel importEntry)` Adds a plug-in dependency entry.
`void` | `addIncludedFeatureReferenceModel(IncludedFeatureReferenceModel include)` Adds a feature identifier.
`void` | `addNonPluginEntryModel(NonPluginEntryModel nonPluginEntry)` Adds a non-plug-in data reference.
`void` | `addPluginEntryModel(PluginEntryModel pluginEntry)` Adds a plug-in reference.
`boolean` | `equals(Object obj)` Compares 2 feature models for equality
`String` | `getAffinityFeature()` Returns an optional identifier for the colocation affinity feature
`String` | `getApplication()` Returns an optional identifier for the feature application
`URLEntryModel` | `getCopyrightModel()` Returns the copyright information for the feature.
`URLEntryModel` | `getDescriptionModel()` Returns the feature description.
`URLEntryModel[]` | `getDiscoverySiteEntryModels()` Return an array of information entries referencing locations of other update sites.
`String` | `getFeatureIdentifier()` Returns the feature identifier as a string
`IIncludedFeatureReference[]` | `getFeatureIncluded()` Returns an array of included feature reference model referenced by this feature.
`VersionedIdentifier[]` | `getFeatureIncludeVersionedIdentifier()` Deprecated. use getFeatureIncludeIdentifier instead.
`String` | `getFeatureVersion()` Returns the feature version as a string
`URL` | `getImageURL()` Returns the resolved URL for the image.
`String` | `getImageURLString()` Returns the unresolved URL string for the feature image.
`ImportModel[]` | `getImportModels()` Return a list of plug-in dependencies for this feature.
`InstallHandlerEntryModel` | `getInstallHandlerModel()` Returns and optional custom install handler entry.
`String` | `getLabel()` Retrieve the displayable label for the feature.
`String` | `getLabelNonLocalized()` Retrieve the non-localized displayable label for the feature.
`URLEntryModel` | `getLicenseModel()` Returns the license information for the feature.
`String` | `getNL()` Get optional locale specification as a comma-separated string.
`NonPluginEntryModel[]` | `getNonPluginEntryModels()` Returns an array of non-plug-in entries referenced by this feature
`String` | `getOS()` Get optional operating system specification as a comma-separated string.
`String` | `getOSArch()` Get optional system architecture specification as a comma-separated string.
`PluginEntryModel[]` | `getPluginEntryModels()` Returns an array of plug-in entries referenced by this feature
`String` | `getPrimaryPluginID()` Returns the primaryPluginID.
`String` | `getProvider()` Retrieve the displayable label for the feature provider.
`String` | `getProviderNonLocalized()` Retrieve the non-localized displayable label for the feature provider.
`URLEntryModel` | `getUpdateSiteEntryModel()` Returns an information entry referencing the location of the feature update site.
`String` | `getWS()` Get optional windowing system specification as a comma-separated string.
`boolean` | `isExclusive()` Indicates whether the feature must be processed alone during installation and configuration.
`boolean` | `isPatch()` Returns `true` if this feature is patching another feature, `false` otherwise
`boolean` | `isPrimary()` Indicates whether the feature can be used as a primary feature.
`void` | `markReadOnly()` Marks the model object as read-only.
`void` | `removeDiscoverySiteEntryModel(URLEntryModel discoverySiteInfo)` Removes an update site reference.
`void` | `removeImportModel(ImportModel importEntry)` Removes a plug-in dependency entry.
`void` | `removeNonPluginEntryModel(NonPluginEntryModel nonPluginEntry)` Removes a non-plug-in data reference.
`void` | `removePluginEntryModel(PluginEntryModel pluginEntry)` Removes a plug-in reference.
`void` | `resolve(URL base, URL bundleURL)` Resolve the model object.
`void` | `setAffinityFeature(String affinity)` Sets the identifier of the Feature this feature should be installed with.
`void` | `setApplication(String application)` Sets the feature application identifier.
`void` | `setArch(String arch)` Sets the system architecture specification.
`void` | `setCopyrightModel(URLEntryModel copyright)` Sets the feature copyright information.
`void` | `setDescriptionModel(URLEntryModel description)` Sets the feature description information.
`void` | `setDiscoverySiteEntryModels(URLEntryModel[] discoverySiteInfo)` Sets additional update site references.
`void` | `setExclusive(boolean exclusive)` Indicates whether this feature can act as a primary feature.
`void` | `setFeatureIdentifier(String featureId)` Sets the feature identifier.
`void` | `setFeatureVersion(String featureVersion)` Sets the feature version.
`void` | `setImageURLString(String imageURLString)` Sets the unresolved URL for the feature image.
`void` | `setImportModels(ImportModel[] imports)` Sets the feature plug-in dependency information.
`void` | `setInstallHandlerModel(InstallHandlerEntryModel installHandler)` Sets the custom install handler for the feature.
`void` | `setLabel(String label)` Sets the feature displayable label.
`void` | `setLicenseModel(URLEntryModel license)` Sets the feature license information.
`void` | `setNL(String nl)` Sets the locale specification.
`void` | `setNonPluginEntryModels(NonPluginEntryModel[] nonPluginEntries)` Sets the feature non-plug-in data references.
`void` | `setOS(String os)` Sets the operating system specification.
`void` | `setPluginEntryModels(PluginEntryModel[] pluginEntries)` Sets the feature plug-in references.
`void` | `setPrimary(boolean primary)` Indicates whether this feature can act as a primary feature.
`void` | `setPrimaryPluginID(String plugin)` Method setPrimaryPlugin.
`void` | `setProvider(String provider)` Sets the feature provider displayable label.
`void` | `setUpdateSiteEntryModel(URLEntryModel updateSiteInfo)` Sets the feature update site reference.
`void` | `setWS(String ws)` Sets the windowing system specification.

Methods inherited from class org.eclipse.update.core.model.ModelObject
`arrayTypeFor, arrayTypeFor, assertIsWriteable, getPropertyName, 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`

Constructor Detail

### FeatureModel

    public FeatureModel()

  Creates an uninitialized feature object.

Since:
  2.0

Method Detail

### equals

    public boolean equals(Object obj)

  Compares 2 feature models for equality

  Parameters:
    `obj` - feature model to compare with
  Returns:
    `true` if the two models are equal, `false` otherwise
  Since:
    2.0

### getFeatureIdentifier

    public String getFeatureIdentifier()

  Returns the feature identifier as a string

  Returns:
    feature identifier
  Since:
    2.0
  See Also:
    `IFeature.getVersionedIdentifier()`

### getFeatureVersion

    public String getFeatureVersion()

  Returns the feature version as a string

  Returns:
    feature version
  Since:
    2.0
  See Also:
    `IFeature.getVersionedIdentifier()`

### getLabel

    public String getLabel()

  Retrieve the displayable label for the feature. If the model object has been resolved, the label is localized.

  Returns:
    displayable label, or `null`.
  Since:
    2.0

### getLabelNonLocalized

    public String getLabelNonLocalized()

  Retrieve the non-localized displayable label for the feature.

  Returns:
    non-localized displayable label, or `null`.
  Since:
    2.0

### getProvider

    public String getProvider()

  Retrieve the displayable label for the feature provider. If the model object has been resolved, the label is localized.

  Returns:
    displayable label, or `null`.
  Since:
    2.0

### getProviderNonLocalized

    public String getProviderNonLocalized()

  Retrieve the non-localized displayable label for the feature provider.

  Returns:
    non-localized displayable label, or `null`.
  Since:
    2.0

### getImageURLString

    public String getImageURLString()

  Returns the unresolved URL string for the feature image.

  Returns:
    url string, or `null`
  Since:
    2.0

### getImageURL

    public URL getImageURL()

  Returns the resolved URL for the image.

  Returns:
    url, or `null`
  Since:
    2.0

### getOS

    public String getOS()

  Get optional operating system specification as a comma-separated string.

  Returns:
    the operating system specification string, or `null`.
  Since:
    2.0

### getWS

    public String getWS()

  Get optional windowing system specification as a comma-separated string.

  Returns:
    the windowing system specification string, or `null`.
  Since:
    2.0

### getOSArch

    public String getOSArch()

  Get optional system architecture specification as a comma-separated string.

  Returns:
    the system architecture specification string, or `null`.
  Since:
    2.0

### getNL

    public String getNL()

  Get optional locale specification as a comma-separated string.

  Returns:
    the locale specification string, or `null`.
  Since:
    2.0

### isPrimary

    public boolean isPrimary()

  Indicates whether the feature can be used as a primary feature.

  Returns:
    `true` if this is a primary feature, otherwise `false`
  Since:
    2.0

### isExclusive

    public boolean isExclusive()

  Indicates whether the feature must be processed alone during installation and configuration. Features that are not exclusive can be installed in a batch.

  Returns:
    `true` if feature requires exclusive processing, `false` otherwise.
  Since:
    2.1

### getApplication

    public String getApplication()

  Returns an optional identifier for the feature application

  Returns:
    application identifier, or `null`.
  Since:
    2.0

### getAffinityFeature

    public String getAffinityFeature()

  Returns an optional identifier for the colocation affinity feature

  Returns:
    feature identifier, or `null`.
  Since:
    2.0

### getInstallHandlerModel

    public InstallHandlerEntryModel getInstallHandlerModel()

  Returns and optional custom install handler entry.

  Returns:
    install handler entry, or `null` if none was specified
  Since:
    2.0

### getDescriptionModel

    public URLEntryModel getDescriptionModel()

  Returns the feature description.

  Returns:
    feature rescription, or `null`.
  Since:
    2.0

### getCopyrightModel

    public URLEntryModel getCopyrightModel()

  Returns the copyright information for the feature.

  Returns:
    copyright information, or `null`.
  Since:
    2.0

### getLicenseModel

    public URLEntryModel getLicenseModel()

  Returns the license information for the feature.

  Returns:
    feature license, or `null`.
  Since:
    2.0

### getUpdateSiteEntryModel

    public URLEntryModel getUpdateSiteEntryModel()

  Returns an information entry referencing the location of the feature update site.

  Returns:
    update site entry, or `null`.
  Since:
    2.0

### getDiscoverySiteEntryModels

    public URLEntryModel[] getDiscoverySiteEntryModels()

  Return an array of information entries referencing locations of other update sites.

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

### getImportModels

    public ImportModel[] getImportModels()

  Return a list of plug-in dependencies for this feature.

  Returns:
    the list of required plug-in dependencies, or an empty array.
  Since:
    2.0

### getPluginEntryModels

    public PluginEntryModel[] getPluginEntryModels()

  Returns an array of plug-in entries referenced by this feature

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

### getFeatureIncludeVersionedIdentifier

    public VersionedIdentifier[] getFeatureIncludeVersionedIdentifier()

  Deprecated. use getFeatureIncludeIdentifier instead.

  Returns an array of versioned identifier referenced by this feature

  Returns:
    an array of versioned identifier, or an empty array.
  Since:
    2.0

### getFeatureIncluded

    public IIncludedFeatureReference[] getFeatureIncluded()

  Returns an array of included feature reference model referenced by this feature.

  Returns:
    an array of included feature reference model, or an empty array.
  Since:
    2.0

### getNonPluginEntryModels

    public NonPluginEntryModel[] getNonPluginEntryModels()

  Returns an array of non-plug-in entries referenced by this feature

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

### setFeatureIdentifier

    public void setFeatureIdentifier(String featureId)

  Sets the feature identifier. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `featureId` - feature identifier
  Since:
    2.0

### setFeatureVersion

    public void setFeatureVersion(String featureVersion)

  Sets the feature version. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `featureVersion` - feature version
  Since:
    2.0

### setLabel

    public void setLabel(String label)

  Sets the feature displayable label. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `label` - displayable label
  Since:
    2.0

### setProvider

    public void setProvider(String provider)

  Sets the feature provider displayable label. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `provider` - provider displayable label
  Since:
    2.0

### setImageURLString

    public void setImageURLString(String imageURLString)

  Sets the unresolved URL for the feature image. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `imageURLString` - unresolved URL string
  Since:
    2.0

### setOS

    public void setOS(String os)

  Sets the operating system specification. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `os` - operating system specification as a comma-separated list
  Since:
    2.0

### setWS

    public void setWS(String ws)

  Sets the windowing system specification. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `ws` - windowing system specification as a comma-separated list
  Since:
    2.0

### setNL

    public void setNL(String nl)

  Sets the locale specification. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `nl` - locale specification as a comma-separated list
  Since:
    2.0

### setArch

    public void setArch(String arch)

  Sets the system architecture specification. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `arch` - system architecture specification as a comma-separated list
  Since:
    2.0

### setPrimary

    public void setPrimary(boolean primary)

  Indicates whether this feature can act as a primary feature. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `primary` - `true` if this feature can act as primary, `false` otherwise
  Since:
    2.0

### setExclusive

    public void setExclusive(boolean exclusive)

  Indicates whether this feature can act as a primary feature. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `exclusive` - `true` if this feature must be processed independently from other features, `false` if feature can be processed in a batch with other features.
  Since:
    2.1

### setApplication

    public void setApplication(String application)

  Sets the feature application identifier. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `application` - feature application identifier
  Since:
    2.0

### setAffinityFeature

    public void setAffinityFeature(String affinity)

  Sets the identifier of the Feature this feature should be installed with. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `affinity` - the identifier of the Feature
  Since:
    2.0

### setInstallHandlerModel

    public void setInstallHandlerModel(InstallHandlerEntryModel installHandler)

  Sets the custom install handler for the feature. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `installHandler` - install handler entry
  Since:
    2.0

### setDescriptionModel

    public void setDescriptionModel(URLEntryModel description)

  Sets the feature description information. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `description` - feature description information
  Since:
    2.0

### setCopyrightModel

    public void setCopyrightModel(URLEntryModel copyright)

  Sets the feature copyright information. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `copyright` - feature copyright information
  Since:
    2.0

### setLicenseModel

    public void setLicenseModel(URLEntryModel license)

  Sets the feature license information. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `license` - feature license information
  Since:
    2.0

### setUpdateSiteEntryModel

    public void setUpdateSiteEntryModel(URLEntryModel updateSiteInfo)

  Sets the feature update site reference. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `updateSiteInfo` - feature update site reference
  Since:
    2.0

### setDiscoverySiteEntryModels

    public void setDiscoverySiteEntryModels(URLEntryModel[] discoverySiteInfo)

  Sets additional update site references. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `discoverySiteInfo` - additional update site references
  Since:
    2.0

### setImportModels

    public void setImportModels(ImportModel[] imports)

  Sets the feature plug-in dependency information. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `imports` - feature plug-in dependency information
  Since:
    2.0

### setPluginEntryModels

    public void setPluginEntryModels(PluginEntryModel[] pluginEntries)

  Sets the feature plug-in references. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `pluginEntries` - feature plug-in references
  Since:
    2.0

### setNonPluginEntryModels

    public void setNonPluginEntryModels(NonPluginEntryModel[] nonPluginEntries)

  Sets the feature non-plug-in data references. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `nonPluginEntries` - feature non-plug-in data references
  Since:
    2.0

### addDiscoverySiteEntryModel

    public void addDiscoverySiteEntryModel(URLEntryModel discoverySiteInfo)

  Adds an additional update site reference. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `discoverySiteInfo` - update site reference
  Since:
    2.0

### addImportModel

    public void addImportModel(ImportModel importEntry)

  Adds a plug-in dependency entry. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `importEntry` - plug-in dependency entry
  Since:
    2.0

### addPluginEntryModel

    public void addPluginEntryModel(PluginEntryModel pluginEntry)

  Adds a plug-in reference. Throws a runtime exception if this object is marked read-only.

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

### addIncludedFeatureReferenceModel

    public void addIncludedFeatureReferenceModel(IncludedFeatureReferenceModel include)

  Adds a feature identifier. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `include` - the included feature
  Since:
    2.1

### addNonPluginEntryModel

    public void addNonPluginEntryModel(NonPluginEntryModel nonPluginEntry)

  Adds a non-plug-in data reference. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `nonPluginEntry` - non-plug-in data reference
  Since:
    2.0

### removeDiscoverySiteEntryModel

    public void removeDiscoverySiteEntryModel(URLEntryModel discoverySiteInfo)

  Removes an update site reference. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `discoverySiteInfo` - update site reference
  Since:
    2.0

### removeImportModel

    public void removeImportModel(ImportModel importEntry)

  Removes a plug-in dependency entry. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `importEntry` - plug-in dependency entry
  Since:
    2.0

### removePluginEntryModel

    public void removePluginEntryModel(PluginEntryModel pluginEntry)

  Removes a plug-in reference. Throws a runtime exception if this object is marked read-only.

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

### removeNonPluginEntryModel

    public void removeNonPluginEntryModel(NonPluginEntryModel nonPluginEntry)

  Removes a non-plug-in data reference. Throws a runtime exception if this object is marked read-only.

  Parameters:
    `nonPluginEntry` - non-plug-in data reference
  Since:
    2.0

### markReadOnly

    public void markReadOnly()

  Marks the model object as read-only.

  Overrides:
    `markReadOnly` in class `ModelObject`
  Since:
    2.0
  See Also:
    `ModelObject.isReadOnly()`

### resolve

    public void resolve(URL base,
                        URL bundleURL)
                 throws MalformedURLException

  Resolve the model object. Any URL strings in the model are resolved relative to the base URL argument. Any translatable strings in the model that are specified as translation keys are localized using the supplied resource bundle.

  Overrides:
    `resolve` in class `ModelObject`
  Parameters:
    `base` - URL
    `bundleURL` - resource bundle url
  Throws:
    `MalformedURLException`
  Since:
    2.0

### setPrimaryPluginID

    public void setPrimaryPluginID(String plugin)

  Method setPrimaryPlugin.

  Parameters:
    `plugin` -

### getPrimaryPluginID

    public String getPrimaryPluginID()

  Returns the primaryPluginID.

  Returns:
    String

### isPatch

    public boolean isPatch()

  Returns `true` if this feature is patching another feature, `false` otherwise

  Returns:
    boolean

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.