Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

javax.ide.extension
Class ExtensionHook

java.lang.Object
  extended by javax.ide.extension.ElementVisitor
      extended by javax.ide.extension.ExtensionHook
Direct Known Subclasses:
AuditHook, DOMHook, DynamicHook, HashStructureHook, IdeHook, JspLibrariesHandler, UIEditorHookHandler, UpdateHook

public abstract class ExtensionHook
extends ElementVisitor

An extension hook is responsible for processing information from the extension manifest for a particular feature and making this information available to the service responsible for managing the functionality provided by the hook.


Field Summary
static java.lang.String KEY_EXTENSION
           
static java.lang.String KEY_RSBUNDLE_CLASS
           
static java.lang.String MANIFEST_XMLNS
          The XML namespace for a JSR-198 extension manifest.
 
Fields inherited from class javax.ide.extension.ElementVisitor
KEY_LOCATOR
 
Constructor Summary
ExtensionHook()
           
 
Method Summary
protected  java.net.URI findPath(ElementContext context, java.lang.String path)
          Resolves a path in the manifest, searching all dependencies of the current extension in context until a path to an existing resource is found.
protected  Extension getExtension(ElementContext context)
          Get the extension that is currently being processed.
 java.lang.String getProvider()
          Get the id of the extension that registered this hook.
protected  java.lang.String getRSBundleClass(ElementContext context)
          Get the resource bundle class name.
 java.lang.String getSchemaLocation()
          Get the location of the schema for this hook.
protected  java.net.URI resolvePath(ElementContext context, java.lang.String path)
          Resolves a path in the manifest.
 void setProvider(java.lang.String extensionId)
          Set the id of the extension that registered this hook.
 void setSchemaLocation(java.lang.String schemaLocation)
          Set the location of the schema for this hook.
 
Methods inherited from class javax.ide.extension.ElementVisitor
end, getClassLoader, getResourceBundle, log, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_EXTENSION

public static final java.lang.String KEY_EXTENSION
See Also:
Constant Field Values

KEY_RSBUNDLE_CLASS

public static final java.lang.String KEY_RSBUNDLE_CLASS
See Also:
Constant Field Values

MANIFEST_XMLNS

public static final java.lang.String MANIFEST_XMLNS
The XML namespace for a JSR-198 extension manifest.

See Also:
Constant Field Values
Constructor Detail

ExtensionHook

public ExtensionHook()
Method Detail

setProvider

public final void setProvider(java.lang.String extensionId)
Set the id of the extension that registered this hook. This is called while processing hook registration. Extension developers should generally not call this method.

Parameters:
extensionId - the id of the extension that registered this hook. Must not be null.
Since:
JSR-198 2.0

getProvider

public final java.lang.String getProvider()
Get the id of the extension that registered this hook.

Returns:
the id of the extension that registered this hook. Generally, this is guaranteed not to be null, provided the ExtensionHook was created as part of regular hook registration processing. The "standard" JSR-198 hooks will return null from this method.
Since:
JSR-198 2.0

setSchemaLocation

public final void setSchemaLocation(java.lang.String schemaLocation)
Set the location of the schema for this hook. This method is called by the extension registry when processing hooks.

Parameters:
schemaLocation - the schema location.

getSchemaLocation

public final java.lang.String getSchemaLocation()
Get the location of the schema for this hook.

Returns:
the location of the schema for this hook.

getRSBundleClass

protected final java.lang.String getRSBundleClass(ElementContext context)
Get the resource bundle class name.

Parameters:
context - the current context.
Returns:
the fully qualified class name of the resource bundle for the current context.

getExtension

protected final Extension getExtension(ElementContext context)
Get the extension that is currently being processed.

Parameters:
context - the current context.
Returns:
the extension being processed.

resolvePath

protected final java.net.URI resolvePath(ElementContext context,
                                         java.lang.String path)
Resolves a path in the manifest. Paths depend on the source of the extension being processed. For JAR files, if the path starts with a forward slash (/), it is a path inside the JAR file. Otherwise, it is a path relative to the physical location of the JAR file.

Parameters:
context - the xml processing context.
path - a path to resolve. Must not be null.
Returns:
the absolute path a resource. This may or may not exist.

findPath

protected final java.net.URI findPath(ElementContext context,
                                      java.lang.String path)
Resolves a path in the manifest, searching all dependencies of the current extension in context until a path to an existing resource is found.

This method is significantly more expensive than resolvePath( ElementContext, String), because it must perform file system exists() checks.

Parameters:
context - the xml processing context.
path - the path to resolve. Must not be null.
Returns:
the absolute URI of a resource. If not null, this is guaranteed to have existed at the time the exists() check was made.
Since:
2.0

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.