osgi.service.blueprint.namespace
service property denoting the namespace URIs this handler can process. The service property value can be either a single String
or URI
, or a Collection
respectively array of String
or URI
. During parsing when the blueprint extender encounters an element from a non-blueprint namespace it will search for a namespace handler for the namespace that is compatible with blueprint bundle being processed. Then for a stand-alone component the parser will invoke the parse
method to create the Metadata
for the xml element while for an element that is part of an existing component the parser will invoke the decorated
method to augment the enclosing ComponentMetadata
instance. Various utilities to interact with the blueprint parser are available to a namespace handler via the ParserContext
argument passed to parse
and decorate
. Recommended behaviour: ParserContext.createMetadata(..)
and casting the returned object to the appropriate MutableComponentMetadata
interface. This method ensures that the metadata object implements the interfaces necessary for other namespace handlers to be able to use the metadata object.ParserContext.generateId()
. decorate
method if the same result could also be achieved by operating on a MutableComponentMetadata
instance. blueprintBundle
or blueprintBundleContext
. In the case of a dry parse (i.e. a parse of the blueprint xml files without a backing OSGi bundle), these values will not be available Implementations are expected to return implementations of the {@link BeanDefinitionParser} interface for custom top-level tags andimplementations of the {@link BeanDefinitionDecorator} interface forcustom nested tags.
The parser will call {@link #parse} when it encounters a custom tagdirectly under the <beans>
tags and {@link #decorate} whenit encounters a custom tag directly under a <bean>
tag.
Developers writing their own custom element extensions typically will not implement this interface drectly, but rather make use of the provided {@link NamespaceHandlerSupport} class. @author Rob Harrop @author Erik Wiersma @since 2.0 @see DefaultBeanDefinitionDocumentReader @see NamespaceHandlerResolver
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|