public abstract class ExtensionHook extends ElementVisitor
Modifier and Type | Class and Description |
---|---|
static class |
ExtensionHook.URIResource |
ElementVisitor.ResourceBundleProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTRIBUTE_RSBUNDLE_CLASS |
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.
|
KEY_LOCATOR
Constructor and Description |
---|
ExtensionHook() |
Modifier and Type | Method and Description |
---|---|
protected ExtensionHook.URIResource |
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.
|
end, getAttributeHelper, getClassLoader, getMetaClassLoader, getResourceBundle, getResourceBundleProvider, getTextHelper, log, log, setResourceBundleProvider, start
public static final java.lang.String KEY_EXTENSION
public static final java.lang.String KEY_RSBUNDLE_CLASS
public static final java.lang.String ATTRIBUTE_RSBUNDLE_CLASS
public static final java.lang.String MANIFEST_XMLNS
public final void setProvider(java.lang.String extensionId)
extensionId
- the id of the extension that registered this hook.
Must not be null.public final java.lang.String getProvider()
public final void setSchemaLocation(java.lang.String schemaLocation)
schemaLocation
- the schema location.public final java.lang.String getSchemaLocation()
protected final java.lang.String getRSBundleClass(ElementContext context)
context
- the current context.protected final Extension getExtension(ElementContext context)
context
- the current context.protected final java.net.URI resolvePath(ElementContext context, java.lang.String path)
context
- the xml processing context.path
- a path to resolve. Must not be null.protected final ExtensionHook.URIResource findPath(ElementContext context, java.lang.String path)
This method is significantly more expensive than
resolvePath( ElementContext, String)
,
because it must perform file system exists() checks.
context
- the xml processing context.path
- the path to resolve. Must not be null.