|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
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 oracle.ide.ExtensionRegistry
public abstract class ExtensionRegistry
The extension registry provides access to information about extensions loaded from JSR-198 extension manifests during initialization of the IDE.
This registry implementation provides information about extensions that is specific to the Oracle JSR-198 implementation.
Although it is not final, this class is not intended for subclassing by extension writers.
Obtain an instance of the extension registry like this:
ExtensionRegistry registry = ExtensionRegistry.getExtensionRegistry();
Nested Class Summary | |
---|---|
static class |
ExtensionRegistry.ClassFactory
Factory for loading classes. |
Field Summary | |
---|---|
protected java.util.logging.Logger |
_manifestLogger
|
static java.lang.String |
DEFAULT_PROCESSOR_PLUGINS_DIR
The directory (relative to the oracle home) that contains default extension processor plugins. |
static java.lang.String |
EDT_EXTENSION_ID
This property is primarily intended for use by the extension design time. |
static java.lang.String |
EDT_HOT_CLASSES
This property is primarily intended for use by the extension design time. |
static java.lang.String |
EDT_HOT_DEPLOY_DIR
This property is primarily intended for use by the extension design time. |
static java.lang.String |
EDT_HOT_MANIFEST
This property is primarily intended for use by the extension design time. |
protected static java.lang.String |
EXTENSIONS_DIR
The name of the extensions directory. |
static java.lang.String |
PRODUCT_PROCESSOR_PLUGINS_DIR
The directory (relative to the product home) that contains product-specific extension processor plugins. |
Constructor Summary | |
---|---|
ExtensionRegistry()
|
Method Summary | |
---|---|
protected RoleManager |
createRoleManager()
Creates the role manager. |
abstract Extension |
findExtensionEvenIfNotLoaded(java.lang.String id)
Returns an extension by its id. |
abstract java.util.Collection<Extension> |
getAllExtensions()
Returns all available extensions, whether or not they are currently loaded. |
java.util.Collection<ExtensionHook> |
getAllHooks()
Returns all registered hooks. |
java.lang.ClassLoader |
getClassLoader(java.lang.String extensionId)
Returns the class loader to use for the specified extension. |
java.util.Collection<java.lang.String> |
getDisabledExtensions()
Returns a collection of all disabled extensions. |
java.io.File |
getExtensionJAR(Extension extension)
Returns the JAR file for the specified extension. |
java.lang.String |
getExtensionJAR(java.lang.String extensionId,
Version version)
Deprecated. since 11.0 use getExtensionJAR( Extension ) . |
protected java.lang.String |
getExtensionJAR(java.lang.String extensionId,
Version version,
boolean userDirOk)
Deprecated. since 11.0 use getExtensionJAR( Extension ) . |
static ExtensionRegistry |
getExtensionRegistry()
Returns the Oracle implementation of the JSR-198 extension registry. |
abstract java.util.Collection<java.io.File> |
getExtensionSearchPath()
Returns the list of locations that should be searched for extensions. |
ExtensionHook |
getHook(ElementName elementName)
Returns the hook for the specified element name. |
IdeHook |
getIdeHook(ElementName elementName)
Deprecated. since 11.0. Use getHook(ElementName) . This method is
being maintained for backwards compatibility. |
java.io.File |
getInstallDirectory(Extension extension)
Returns the install directory for an extension. |
java.lang.String |
getInstallDirectory(java.lang.String extensionId)
Deprecated. since 11.0 use getInstallDirectory(Extension) . |
java.lang.String |
getInstallDirectory(java.lang.String extensionId,
Version version)
Deprecated. since 11.0 use getInstallDirectory(Extension) . |
java.net.URI |
getInstallRoot(Extension extension)
Returns the install root of the specified extension. |
java.util.logging.Logger |
getLogger()
Returns the logger that should be used to log messages of interest to extension developers. |
java.util.logging.Logger |
getManifestLogger()
Returns the logger used to report problems in the extension manifest. |
abstract java.lang.String |
getNotLoadedReason(java.lang.String extensionId)
Gets the reason why a particular extension was not loaded. |
static ExtensionRegistry |
getOracleRegistry()
Deprecated. since 11.1.1 use getExtensionRegistry() . |
RoleManager |
getRoleManager()
Returns the role manager. |
abstract java.net.URL |
getSystemDirectory(java.lang.String extensionId)
Returns the system directory for the specified extension. |
abstract java.net.URL |
getSystemDirectory(java.lang.String extensionId,
Version version)
Returns the system directory for the specified extension. |
static boolean |
isCustomizationContext(ElementContext context)
Returns true if the specified context is one in which it is valid to register customization hooks. |
abstract boolean |
isLoaded(java.lang.String extensionId)
Returns true if a specified extension is loaded. |
abstract boolean |
isNewlyInstalled(java.lang.String extensionId)
Returns true if the specified extension is newly installed. |
abstract boolean |
isUserExtension(java.lang.String extensionId)
Returns true if a specified extension is located in the user specific extensions directory. |
protected void |
registerIdeHook(ElementName elementName,
ExtensionHook hook)
Registers an ide hook. |
Methods inherited from class javax.ide.extension.ExtensionRegistry |
---|
addToClassPath, createExtensionLogger, createExtensionVisitor, createHookVisitorFactory, createInitialContext, cycleEncountered, findAllExtensionSources, findExtension, getExtensions, initialize, isExtensionEnabled, loadExtension, loadExtensions, loadExtensions, unsatisfiedExtensionDependencies |
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 |
Field Detail |
---|
public static final java.lang.String EDT_HOT_CLASSES
public static final java.lang.String EDT_HOT_MANIFEST
public static final java.lang.String EDT_HOT_DEPLOY_DIR
public static final java.lang.String EDT_EXTENSION_ID
protected static final java.lang.String EXTENSIONS_DIR
public static final java.lang.String DEFAULT_PROCESSOR_PLUGINS_DIR
ExtensionProcessorPlugin
for more details.
public static final java.lang.String PRODUCT_PROCESSOR_PLUGINS_DIR
ExtensionProcessorPlugin
for more details.
protected java.util.logging.Logger _manifestLogger
Constructor Detail |
---|
public ExtensionRegistry()
Method Detail |
---|
public static boolean isCustomizationContext(ElementContext context)
Customization hook implementations may test this method to determine whether a customization hook usage is valid in the given context. If it is not valid, then the hook should silently ignore the customization.
context
- a manifest processing context.
java.lang.NullPointerException
- if context is null.public abstract java.util.Collection<java.io.File> getExtensionSearchPath()
public static final ExtensionRegistry getExtensionRegistry()
(ExtensionRegistry) javax.ide.extensionExtensionRegistry.getExtensionRegistry()
public static final ExtensionRegistry getOracleRegistry()
getExtensionRegistry()
.
(ExtensionRegistry) javax.ide.extensionExtensionRegistry.getExtensionRegistry()
public RoleManager getRoleManager()
protected RoleManager createRoleManager()
This implementation returns a role manager that always returns
RoleManager.NO_ROLE
from RoleManager.getActiveRole()
.
public abstract java.lang.String getNotLoadedReason(java.lang.String extensionId)
extensionId
- the id of an extension. Must not be
null.
public final java.util.logging.Logger getLogger()
public final java.util.logging.Logger getManifestLogger()
public abstract boolean isLoaded(java.lang.String extensionId)
extensionId
- the id of an extension. Must not be null.
public abstract boolean isUserExtension(java.lang.String extensionId)
extensionId
- the id of an extension. Must not be null.
public abstract boolean isNewlyInstalled(java.lang.String extensionId)
extensionId
- the id of an extension
public abstract java.net.URL getSystemDirectory(java.lang.String extensionId)
This method requires that the extension be loaded (i.e. that
isLoaded(String)
on the extension returns true). If the
extension is not loaded, you can retrieve the system directory using the
version of this method that also takes a version number (
getSystemDirectory(String,javax.ide.util.Version)
).
extensionId
- the id of an extension. Must not be null.
java.lang.NullPointerException
- if extensionId is null.
java.lang.IllegalArgumentException
- if the extension cannot be found.
java.lang.IllegalStateException
- if the extension registry has not finished
initializing extensions.public abstract java.net.URL getSystemDirectory(java.lang.String extensionId, Version version)
This method will work even if the extension has not yet been loaded.
extensionId
- the id of the extension. Must not be null.version
- the version of the extension. Must not be null.
java.lang.NullPointerException
- if extensionId or
version are null.public final java.net.URI getInstallRoot(Extension extension)
This method is provided for compatibility with JSR-198 and is functionaly
equivalent to getInstallDirectory(String)
.
getInstallRoot
in class ExtensionRegistry
extension
- an extension to get the install root for. Must not be
null.
public final java.lang.String getInstallDirectory(java.lang.String extensionId)
getInstallDirectory(Extension)
.
extensionId
- the id of an installed extension. Must not be null.
public final java.lang.String getInstallDirectory(java.lang.String extensionId, Version version)
getInstallDirectory(Extension)
.
This method can be used even if an extension has not been loaded.
extensionId
- the id of an installed extension. Must not be null.version
- the version of the extension. May be null, in which case
the currently loaded version of the extension is used.
public final java.io.File getInstallDirectory(Extension extension)
This method can be used even if an extension has not been loaded.
extension
- an extension to find the install directory for. Must
not be null.
protected java.lang.String getExtensionJAR(java.lang.String extensionId, Version version, boolean userDirOk)
getExtensionJAR( Extension )
.
public java.lang.String getExtensionJAR(java.lang.String extensionId, Version version)
getExtensionJAR( Extension )
.
extensionId
- the id of the extension to find.version
- the version of the extension. If null, the currently
loaded version of the extension is used.
public final java.io.File getExtensionJAR(Extension extension)
This method may return null for some types of extension that are not loaded from JAR files (for example, roles).
extension
- an extension. May be an extension that is not loaded.
Must not be null.
java.lang.NullPointerException
- if the extension is null.public IdeHook getIdeHook(ElementName elementName)
getHook(ElementName)
. This method is
being maintained for backwards compatibility.
elementName
- the name of an Oracle IDE specific manifest element.
Must not be null.
public ExtensionHook getHook(ElementName elementName)
getHook
in class ExtensionRegistry
elementName
- the element name of a hook to retrieve. Must not be
null.
protected final void registerIdeHook(ElementName elementName, ExtensionHook hook)
elementName
- the element name to register this ide hook for.hook
- the hook.public abstract java.util.Collection<Extension> getAllExtensions()
A minimal amount of information will be available for unloaded extensions.
Use isLoaded(String)
to determine whether a given extension id
is loaded.
public java.util.Collection<java.lang.String> getDisabledExtensions()
public abstract Extension findExtensionEvenIfNotLoaded(java.lang.String id)
id
- the id of any extension returned by getAllExtensions()
.
public java.lang.ClassLoader getClassLoader(java.lang.String extensionId)
extensionId
- the id of an extension.
public java.util.Collection<ExtensionHook> getAllHooks()
getHook(ElementName)
method rather than iterating
the whole list of hooks.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |