Eclipse Platform
2.0

org.eclipse.update.core
Class FeatureReference

java.lang.Object
  |
  +--org.eclipse.core.runtime.PlatformObject
        |
        +--org.eclipse.update.core.model.ModelObject
              |
              +--org.eclipse.update.core.model.FeatureReferenceModel
                    |
                    +--org.eclipse.update.core.FeatureReference
All Implemented Interfaces:
IAdaptable, IFeatureReference

public class FeatureReference
extends FeatureReferenceModel
implements IFeatureReference

Convenience implementation of a feature reference.

This class may be instantiated or subclassed by clients.

Since:
2.0
See Also:
IFeatureReference, FeatureReferenceModel

Constructor Summary
FeatureReference()
          Feature reference default constructor
 
Method Summary
 void addCategory(ICategory category)
          Adds a category to the referenced feature.
 ICategory[] getCategories()
          Returns an array of categories the referenced feature belong to.
 IFeature getFeature()
          Returns the feature this reference points to
 ISite getSite()
          Returns the update site for the referenced feature
 VersionedIdentifier getVersionedIdentifier()
          Returns the feature identifier.
 void setSite(ISite site)
          Associates a site with the feature reference.
 void setURL(URL url)
          Sets the feature reference URL.
 
Methods inherited from class org.eclipse.update.core.model.FeatureReferenceModel
addCategoryName, equals, getCategoryNames, getFeatureIdentifier, getFeatureVersion, getSiteModel, getType, getURL, getURLString, removeCategoryName, resolve, setCategoryNames, setFeatureIdentifier, setFeatureVersion, setSiteModel, setType, setURLString, toString
 
Methods inherited from class org.eclipse.update.core.model.ModelObject
arrayTypeFor, arrayTypeFor, assertIsWriteable, isReadOnly, markListReferenceReadOnly, markReadOnly, 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, wait, wait, wait
 
Methods inherited from interface org.eclipse.update.core.IFeatureReference
getURL
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

FeatureReference

public FeatureReference()
Feature reference default constructor

Method Detail

getFeature

public IFeature getFeature()
                    throws CoreException
Returns the feature this reference points to

Specified by:
getFeature in interface IFeatureReference
Returns:
the feature on the Site
CoreException

getSite

public ISite getSite()
Returns the update site for the referenced feature

Specified by:
getSite in interface IFeatureReference
Returns:
feature site
Since:
2.0
See Also:
IFeatureReference.getSite()

getCategories

public ICategory[] getCategories()
Returns an array of categories the referenced feature belong to.

Specified by:
getCategories in interface IFeatureReference
Returns:
an array of categories, or an empty array
Since:
2.0
See Also:
IFeatureReference.getCategories()

addCategory

public void addCategory(ICategory category)
Adds a category to the referenced feature.

Specified by:
addCategory in interface IFeatureReference
Parameters:
category - new category
Since:
2.0
See Also:
IFeatureReference.addCategory(ICategory)

setURL

public void setURL(URL url)
            throws CoreException
Sets the feature reference URL. This is typically performed as part of the feature reference creation operation. Once set, the url should not be reset.

Specified by:
setURL in interface IFeatureReference
Parameters:
url - reference URL
CoreException
Since:
2.0
See Also:
IFeatureReference.setURL(URL)

setSite

public void setSite(ISite site)
Associates a site with the feature reference. This is typically performed as part of the feature reference creation operation. Once set, the site should not be reset.

Specified by:
setSite in interface IFeatureReference
Parameters:
site - site for the feature reference
Since:
2.0
See Also:
IFeatureReference.setSite(ISite)

getVersionedIdentifier

public VersionedIdentifier getVersionedIdentifier()
                                           throws CoreException
Returns the feature identifier.

Specified by:
getVersionedIdentifier in interface IFeatureReference
Returns:
the feature identifier.
Throws:
CoreException
Since:
2.0
See Also:
IFeatureReference.getVersionedIdentifier()

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.