|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.aries.blueprint.container.ParserContextImpl
public class ParserContextImpl
A simple ParserContext implementation. This class is supposed to be short lived and only used for calling a given namespace handler.
Constructor Summary | |
---|---|
ParserContextImpl(Parser parser,
ComponentDefinitionRegistry componentDefinitionRegistry,
ComponentMetadata enclosingComponent,
org.w3c.dom.Node sourceNode)
|
Method Summary | ||
---|---|---|
|
createMetadata(java.lang.Class<T> type)
Create a new metadata instance of the given type. |
|
java.lang.String |
generateId()
Generate a unique id following the same scheme that the blueprint container uses internally |
|
ComponentDefinitionRegistry |
getComponentDefinitionRegistry()
|
|
java.lang.String |
getDefaultActivation()
Get the default activation setting for the current blueprint file |
|
java.lang.String |
getDefaultAvailability()
Get the default availability setting for the current blueprint file |
|
java.lang.String |
getDefaultTimeout()
Get the default timeout setting for the current blueprint file |
|
ComponentMetadata |
getEnclosingComponent()
Retrieve the ComponentMetadata of the component that
encloses the current Node that is to be parsed by a
namespace handler. |
|
Parser |
getParser()
|
|
org.w3c.dom.Node |
getSourceNode()
Returns the DOM Node that was passed to the NamespaceHandler call for which this ParserContext instance was created. |
|
|
parseElement(java.lang.Class<T> type,
ComponentMetadata enclosingComponent,
org.w3c.dom.Element element)
Invoke the blueprint parser to parse a DOM element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParserContextImpl(Parser parser, ComponentDefinitionRegistry componentDefinitionRegistry, ComponentMetadata enclosingComponent, org.w3c.dom.Node sourceNode)
Method Detail |
---|
public ComponentDefinitionRegistry getComponentDefinitionRegistry()
getComponentDefinitionRegistry
in interface ParserContext
public ComponentMetadata getEnclosingComponent()
ParserContext
ComponentMetadata
of the component that
encloses the current Node
that is to be parsed by a
namespace handler.
In case of top-level components this method will return null
.
getEnclosingComponent
in interface ParserContext
public org.w3c.dom.Node getSourceNode()
ParserContext
getSourceNode
in interface ParserContext
public <T extends Metadata> T createMetadata(java.lang.Class<T> type)
ParserContext
MutableComponentMetadata
interface, so as to allow the caller to set the properties of the
metadata.
Note that the returned object may not be initialised, so callers
should take care to assure every property needed by the blueprint
extender is set.
createMetadata
in interface ParserContext
T
- The expected Metadata type to be createdtype
- the class of the Metadata object to create
public <T> T parseElement(java.lang.Class<T> type, ComponentMetadata enclosingComponent, org.w3c.dom.Element element)
ParserContext
parseElement
in interface ParserContext
T
- The expected metadata type to be parsedtype
- the class of the Metadata type to be parsedenclosingComponent
- The component metadata that contains the Element
to be parsedelement
- The DOM element that is to be parsedpublic Parser getParser()
public java.lang.String generateId()
ParserContext
generateId
in interface ParserContext
public java.lang.String getDefaultActivation()
ParserContext
getDefaultActivation
in interface ParserContext
public java.lang.String getDefaultAvailability()
ParserContext
getDefaultAvailability
in interface ParserContext
public java.lang.String getDefaultTimeout()
ParserContext
getDefaultTimeout
in interface ParserContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |