public class CustomSchemaParser extends org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
Constructor and Description |
---|
CustomSchemaParser() |
Modifier and Type | Method and Description |
---|---|
protected void |
doParse(Element element,
org.springframework.beans.factory.xml.ParserContext parserContext,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Parses the xml bean into a standard bean definition format and fills the information in the passed in definition
builder
|
protected BeanTagAttribute.AttributeType |
findBeanType(Element tag)
Finds the attribute type of the schema being used by the element.
|
protected Object |
findKey(Element grandchild,
org.springframework.beans.factory.support.BeanDefinitionBuilder parent,
org.springframework.beans.factory.xml.ParserContext parserContext)
Finds the key of a map entry in the custom schema.
|
protected Object |
findValue(Element grandchild,
org.springframework.beans.factory.support.BeanDefinitionBuilder parent,
org.springframework.beans.factory.xml.ParserContext parserContext)
Finds the value of a map entry in the custom schema.
|
protected Class<?> |
getBeanClass(Element bean)
Retrieves the class of the bean defined by the xml element.
|
protected String |
nodesToString(NodeList nodeList) |
protected String |
nodeToString(Node node) |
protected Object |
parseBean(Element tag,
org.springframework.beans.factory.support.BeanDefinitionBuilder parent,
org.springframework.beans.factory.xml.ParserContext parserContext)
Parses a bean based on the namespace of the bean.
|
protected Object |
parseCustomBean(Element tag,
org.springframework.beans.factory.support.BeanDefinitionBuilder parent,
org.springframework.beans.factory.xml.ParserContext parserContext)
Parses a bean of the custom namespace.
|
protected org.springframework.beans.factory.support.ManagedList |
parseList(ArrayList<Element> grandChildren,
Element child,
org.springframework.beans.factory.support.BeanDefinitionBuilder parent,
org.springframework.beans.factory.xml.ParserContext parserContext)
Parses a list of elements into a list of beans/standard content.
|
protected org.springframework.beans.factory.support.ManagedMap |
parseMap(ArrayList<Element> grandChildren,
Element child,
org.springframework.beans.factory.support.BeanDefinitionBuilder parent,
org.springframework.beans.factory.xml.ParserContext parserContext)
Parses a list of elements into a map of beans/standard content.
|
protected org.springframework.beans.factory.support.ManagedSet |
parseSet(ArrayList<Element> grandChildren,
Element child,
org.springframework.beans.factory.support.BeanDefinitionBuilder parent,
org.springframework.beans.factory.xml.ParserContext parserContext)
Parses a list of elements into a set of beans/standard content.
|
protected Object |
parseSpringBean(Element tag,
org.springframework.beans.factory.xml.ParserContext parserContext)
Parses a bean of the spring namespace.
|
protected void |
processSingleValue(String name,
String value,
Map<String,BeanTagAttributeInfo> entries,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Adds the property value to the bean definition based on the name and value of the attribute.
|
doParse, getBeanClassName, getParentName, parseInternal
public CustomSchemaParser()
protected Class<?> getBeanClass(Element bean)
getBeanClass
in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
bean
- the xml element for the bean being parsedprotected void doParse(Element element, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
doParse
in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
element
- - The xml bean being parsed.parserContext
- - Provided information and functionality regarding current bean set.bean
- - A definition builder used to build a new spring bean from the information it is filled with.protected void processSingleValue(String name, String value, Map<String,BeanTagAttributeInfo> entries, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
name
- - The name of the attribute.value
- - The value of the attribute.entries
- - The property entries for the over all tag.bean
- - The bean definition being created.protected Object findKey(Element grandchild, org.springframework.beans.factory.support.BeanDefinitionBuilder parent, org.springframework.beans.factory.xml.ParserContext parserContext)
grandchild
- - The map entry.protected Object findValue(Element grandchild, org.springframework.beans.factory.support.BeanDefinitionBuilder parent, org.springframework.beans.factory.xml.ParserContext parserContext)
grandchild
- - The map entry.protected BeanTagAttribute.AttributeType findBeanType(Element tag)
tag
- - The tag to check.protected Object parseBean(Element tag, org.springframework.beans.factory.support.BeanDefinitionBuilder parent, org.springframework.beans.factory.xml.ParserContext parserContext)
tag
- - The Element to be parsed.parent
- - The parent bean that the tag is nested in.parserContext
- - Provided information and functionality regarding current bean set.protected Object parseSpringBean(Element tag, org.springframework.beans.factory.xml.ParserContext parserContext)
tag
- - The Element to be parsed.protected Object parseCustomBean(Element tag, org.springframework.beans.factory.support.BeanDefinitionBuilder parent, org.springframework.beans.factory.xml.ParserContext parserContext)
tag
- - The Element to be parsed.parent
- - The parent bean that the tag is nested in.parserContext
- - Provided information and functionality regarding current bean set.protected org.springframework.beans.factory.support.ManagedList parseList(ArrayList<Element> grandChildren, Element child, org.springframework.beans.factory.support.BeanDefinitionBuilder parent, org.springframework.beans.factory.xml.ParserContext parserContext)
grandChildren
- - The list of beans/content in a bean propertychild
- - The property tag for the parent.parent
- - The parent bean that the tag is nested in.parserContext
- - Provided information and functionality regarding current bean set.protected org.springframework.beans.factory.support.ManagedSet parseSet(ArrayList<Element> grandChildren, Element child, org.springframework.beans.factory.support.BeanDefinitionBuilder parent, org.springframework.beans.factory.xml.ParserContext parserContext)
grandChildren
- - The set of beans/content in a bean propertychild
- - The property tag for the parent.parent
- - The parent bean that the tag is nested in.parserContext
- - Provided information and functionality regarding current bean set.protected org.springframework.beans.factory.support.ManagedMap parseMap(ArrayList<Element> grandChildren, Element child, org.springframework.beans.factory.support.BeanDefinitionBuilder parent, org.springframework.beans.factory.xml.ParserContext parserContext)
grandChildren
- - The list of beans/content in a bean propertychild
- - The property tag for the parent.parent
- - The parent bean that the tag is nested in.parserContext
- - Provided information and functionality regarding current bean set.protected String nodesToString(NodeList nodeList)
protected String nodeToString(Node node)
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.