|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.shibboleth.common.config.BaseSpringNamespaceHandler
public abstract class BaseSpringNamespaceHandler
A base class for NamespaceHandler
implementations.
This code is heavily based on Spring's NamespaceHandlerSupport
. The largest difference is that bean
definition parsers may be registered against either an elements name or schema type. During parser lookup the schema
type is preferred.
Constructor Summary | |
---|---|
BaseSpringNamespaceHandler()
|
Method Summary | |
---|---|
BeanDefinitionHolder |
decorate(Node node,
BeanDefinitionHolder definition,
ParserContext parserContext)
Decorates the supplied Node by delegating to the BeanDefinitionDecorator that is registered to
handle that Node . |
protected BeanDefinitionDecorator |
findDecoratorForNode(Node node)
Locates the BeanDefinitionParser from the register implementations using the local name of the supplied
Node . |
protected BeanDefinitionParser |
findParserForElement(Element element)
Locates the BeanDefinitionParser from the register implementations using the local name of the supplied
Element . |
BeanDefinition |
parse(Element element,
ParserContext parserContext)
Parses the supplied Element by delegating to the BeanDefinitionParser that is registered for that
Element . |
protected void |
registerBeanDefinitionDecorator(QName elementNameOrType,
BeanDefinitionDecorator decorator)
Subclasses can call this to register the supplied BeanDefinitionDecorator to handle the specified
element. |
protected void |
registerBeanDefinitionDecoratorForAttribute(QName attributeName,
BeanDefinitionDecorator decorator)
Subclasses can call this to register the supplied BeanDefinitionDecorator to handle the specified
attribute. |
protected void |
registerBeanDefinitionParser(QName elementNameOrType,
BeanDefinitionParser parser)
Subclasses can call this to register the supplied BeanDefinitionParser to handle the specified element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.beans.factory.xml.NamespaceHandler |
---|
init |
Constructor Detail |
---|
public BaseSpringNamespaceHandler()
Method Detail |
---|
public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext)
Node
by delegating to the BeanDefinitionDecorator
that is registered to
handle that Node
.
decorate
in interface NamespaceHandler
node
- the node decorating a the given bean definitiondefinition
- the bean being decoratedparserContext
- the current parser context
public BeanDefinition parse(Element element, ParserContext parserContext)
Element
by delegating to the BeanDefinitionParser
that is registered for that
Element
.
parse
in interface NamespaceHandler
element
- the element to be parsed into a bean definitionparserContext
- the context within which the bean definition is created
protected BeanDefinitionParser findParserForElement(Element element)
BeanDefinitionParser
from the register implementations using the local name of the supplied
Element
.
element
- the element to locate the bean definition parser for
protected BeanDefinitionDecorator findDecoratorForNode(Node node)
BeanDefinitionParser
from the register implementations using the local name of the supplied
Node
. Supports both Elements
and Attrs
.
node
- the node to locate the decorator for
protected void registerBeanDefinitionParser(QName elementNameOrType, BeanDefinitionParser parser)
BeanDefinitionParser
to handle the specified element.
The element name is the local (non-namespace qualified) name.
elementNameOrType
- the element name or schema type the parser is forparser
- the parser to registerprotected void registerBeanDefinitionDecorator(QName elementNameOrType, BeanDefinitionDecorator decorator)
BeanDefinitionDecorator
to handle the specified
element. The element name is the local (non-namespace qualified) name.
elementNameOrType
- the element name or schema type the parser is fordecorator
- the decorator to registerprotected void registerBeanDefinitionDecoratorForAttribute(QName attributeName, BeanDefinitionDecorator decorator)
BeanDefinitionDecorator
to handle the specified
attribute. The attribute name is the local (non-namespace qualified) name.
attributeName
- the name of the attribute to register the decorator fordecorator
- the decorator to register
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |