Eclipse Platform
2.0

org.eclipse.update.core
Class BaseFeatureFactory

java.lang.Object
  |
  +--org.eclipse.update.core.model.FeatureModelFactory
        |
        +--org.eclipse.update.core.BaseFeatureFactory
All Implemented Interfaces:
IFeatureFactory

public abstract class BaseFeatureFactory
extends FeatureModelFactory
implements IFeatureFactory

Base implementation of a feature factory. The factory is responsible for constructing the correct concrete implementation of the model objects for each particular feature type. This class creates model objects that correspond to the concrete implementation classes provided in this package. The actual feature creation method is subclass responsibility.

This class must be subclassed by clients.

Since:
2.0
See Also:
IFeatureFactory, FeatureModelFactory

Constructor Summary
BaseFeatureFactory()
           
 
Method Summary
abstract  IFeature createFeature(URL url, ISite site)
          Create feature.
 FeatureModel createFeatureModel()
          Create a concrete implementation of feature model.
 ImportModel createImportModel()
          Create a concrete implementation of import dependency model.
 InstallHandlerEntryModel createInstallHandlerEntryModel()
          Create a concrete implementation of install handler model.
 NonPluginEntryModel createNonPluginEntryModel()
          Create a concrete implementation of non-plug-in entry model.
 PluginEntryModel createPluginEntryModel()
          Create a concrete implementation of plug-in entry model.
 URLEntryModel createURLEntryModel()
          Create a concrete implementation of annotated URL model.
protected  ResourceBundle getResourceBundle(URL url)
          Helper method to access resouce bundle for feature.
 
Methods inherited from class org.eclipse.update.core.model.FeatureModelFactory
parseFeature
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFeatureFactory

public BaseFeatureFactory()
Method Detail

createFeature

public abstract IFeature createFeature(URL url,
                                       ISite site)
                                throws CoreException
Create feature. Implementation of this method must be provided by subclass

Specified by:
createFeature in interface IFeatureFactory
Parameters:
url - URL interpreted by the feature
site - site to be associated with the feature
Returns:
concrete feature object
Throws:
CoreException
Since:
2.0
See Also:
IFeatureFactory.createFeature(URL,ISite)

getResourceBundle

protected ResourceBundle getResourceBundle(URL url)
                                    throws IOException,
                                           CoreException
Helper method to access resouce bundle for feature. The default implementation attempts to load the appropriately localized feature.properties file.

Parameters:
url - base URL used to load the resource bundle.
Returns:
resource bundle, or null.
IOException
CoreException
Since:
2.0

createFeatureModel

public FeatureModel createFeatureModel()
Create a concrete implementation of feature model.

Overrides:
createFeatureModel in class FeatureModelFactory
Returns:
feature model
Since:
2.0
See Also:
Feature

createInstallHandlerEntryModel

public InstallHandlerEntryModel createInstallHandlerEntryModel()
Create a concrete implementation of install handler model.

Overrides:
createInstallHandlerEntryModel in class FeatureModelFactory
Returns:
install handler entry model
Since:
2.0
See Also:
InstallHandlerEntry

createImportModel

public ImportModel createImportModel()
Create a concrete implementation of import dependency model.

Overrides:
createImportModel in class FeatureModelFactory
Returns:
import dependency model
Since:
2.0
See Also:
Import

createPluginEntryModel

public PluginEntryModel createPluginEntryModel()
Create a concrete implementation of plug-in entry model.

Overrides:
createPluginEntryModel in class FeatureModelFactory
Returns:
plug-in entry model
Since:
2.0
See Also:
PluginEntry

createNonPluginEntryModel

public NonPluginEntryModel createNonPluginEntryModel()
Create a concrete implementation of non-plug-in entry model.

Overrides:
createNonPluginEntryModel in class FeatureModelFactory
Returns:
non-plug-in entry model
Since:
2.0
See Also:
NonPluginEntry

createURLEntryModel

public URLEntryModel createURLEntryModel()
Create a concrete implementation of annotated URL model.

Overrides:
createURLEntryModel in class FeatureModelFactory
Returns:
annotated URL model
Since:
2.0
See Also:
URLEntry

Eclipse Platform
2.0

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