|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
javax.ide.Service
javax.ide.extension.ExtensionRegistry
public abstract class ExtensionRegistry
The extension registry provides access to information about installed extensions.
Constructor Summary | |
---|---|
ExtensionRegistry() |
Method Summary | |
---|---|
protected void |
addToClassPath(javax.ide.extension.spi.ExtensionSource source) Deprecated. since 2.0 this method is no longer called during the processing of extension sources; the source will be added to the classpath using the BaseExtensionVisitor.addToClasspath(ElementContext,Extension,URI) method. |
protected java.util.logging.Logger |
createExtensionLogger() Create a logger which will log validation and error messages while parsing manifest files. |
protected abstract javax.ide.extension.spi.ExtensionVisitor |
createExtensionVisitor(ElementVisitorFactory hookVisitorFactory) Create the element visitor that is responsible for visiting the root element in extension manifests. |
protected ElementVisitorFactory |
createHookVisitorFactory() Create the visitor factory for hooks. |
protected ElementContext |
createInitialContext() Create the initial parsing context. |
protected void |
cycleEncountered(java.util.Collection cycle) A cycle was encountered. |
protected abstract java.util.Collection |
findAllExtensionSources() Find all valid extension sources. |
Extension |
findExtension(java.lang.String id) Find the Extension identified by the given id . |
static ExtensionRegistry |
getExtensionRegistry() Get the extension registry implementation for this IDE. |
java.util.Collection |
getExtensions() Get a collection of registered extensions. |
ExtensionHook |
getHook(ElementName hookElement) Get the hook for the specified element name. |
abstract java.net.URI |
getInstallRoot(Extension extension) Get the install root of the specified extension. |
protected void |
initialize() Initializes the extension registry. |
protected boolean |
isExtensionEnabled(java.lang.String id, Version version) Gets whether the specified extension is enabled in this IDE. |
protected void |
loadExtension(javax.ide.extension.spi.SAXManifestParser parser, java.util.logging.Logger logger, javax.ide.extension.spi.ExtensionSource source) |
protected java.util.Collection |
loadExtensions() Loads all extensions. |
protected java.util.Collection |
loadExtensions(java.util.Collection orderedSources) Load extensions in the specified order. |
protected void |
unsatisfiedExtensionDependencies(Extension ext, java.util.Collection deps) An extension with unsatisfied dependencies was encountered. |
Methods inherited from class javax.ide.Service |
---|
getService, resetAllServices |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExtensionRegistry()
Method Detail |
---|
public final Extension findExtension(java.lang.String id)
Extension
identified by the given id
.id
- the id of an extension.public final java.util.Collection getExtensions()
public ExtensionHook getHook(ElementName hookElement)
hookElement
- the element name of a hook to retrieve. Must not be null.protected abstract java.util.Collection findAllExtensionSources()
protected ElementContext createInitialContext()
protected java.util.Collection loadExtensions()
This implementation obtains the collection of extension sources by calling findAllExtensionSources()
. It then refines this list to only sources which are valid (have a non-null URI).
This implementation performs dependency analysis of extensions to determine the correct load order. Given multiple extensions with the same ID but different versions, it will always choose the latest version (even if that causes a dependency from another extension to be unsatisfied).
When the list of extensions to load in order is determined, this implementation calls loadExtensions( Collection )
. It also calls cycleEncountered( Collection )
if any cyclic dependencies were found and unsatisfiedExtensionDependencies( Extension, Collection )
if unsatisfied dependencies were found.
protected boolean isExtensionEnabled(java.lang.String id, Version version)
This implementation always returns true.
id
- the id of an extensionversion
- the version of an extensionprotected void cycleEncountered(java.util.Collection cycle)
The returned collection contains partially populated Extension instances in dependency order. The last extension in the collection is a duplicate of one of the previous extensions in the collection and is the first extension on which a cycle was detected.
This implementation does nothing.
cycle
- a collection of Extensions that have a cyclic dependency.protected void unsatisfiedExtensionDependencies(Extension ext, java.util.Collection deps)
This implementation does nothing.
ext
- an extension which was not loaded due to unresolved dependencies on other extensions.deps
- a collection of ExtensionDependency objects, one for each dependency that was not satisfied.protected java.util.Collection loadExtensions(java.util.Collection orderedSources)
This implementation uses SAXManifestParser to load each extension in turn.
orderedSources
- a collection of ExtensionSource instances. The iterator order of this collection is the correct order to load the extensions based on their dependencies.protected void loadExtension(javax.ide.extension.spi.SAXManifestParser parser, java.util.logging.Logger logger, javax.ide.extension.spi.ExtensionSource source)
protected java.util.logging.Logger createExtensionLogger()
This implementation returns a default logger created using the log manager.
protected abstract javax.ide.extension.spi.ExtensionVisitor createExtensionVisitor(ElementVisitorFactory hookVisitorFactory)
hookVisitorFactory
- the visitor factory for the hooks section of the manifest.protected void addToClassPath(javax.ide.extension.spi.ExtensionSource source)
BaseExtensionVisitor.addToClasspath(ElementContext,Extension,URI)
method.source
- the source of an extension. E.g if this is a JAR, it needs to be added to the classpath.protected ElementVisitorFactory createHookVisitorFactory()
protected void initialize()
initialize
in class Service
public static ExtensionRegistry getExtensionRegistry()
public abstract java.net.URI getInstallRoot(Extension extension)
extension
- an extension to get the install root for. Must not be null.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |