Top Description Fields Constructors Methods
org.springframework.web.servlet.config

public Class ScriptTemplateConfigurerBeanDefinitionParser

extends AbstractSimpleBeanDefinitionParser
Class Inheritance
Imports
java.nio.charset.Charset, java.util.ArrayList, .List, org.w3c.dom.Element, org.springframework.beans.factory.support.AbstractBeanDefinition, .BeanDefinitionBuilder, org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser, .ParserContext, org.springframework.util.StringUtils, org.springframework.util.xml.DomUtils

Parse the <mvc:script-template-configurer> MVC namespace element and register a ScriptTemplateConfigurer bean.
Author
Sebastien Deleuze
Since
4.2

Field Summary

Modifier and TypeField and Description
public static final String
BEAN_NAME

The bean name used for the ScriptTemplateConfigurer.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
doParse(Element
the XML element being parsed
element
,
ParserContext
the object encapsulating the current state of the parsing process
parserContext
,
BeanDefinitionBuilder
used to define the BeanDefinition
builder
)

Overrides org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser.doParse.

Parse the supplied Element and populate the supplied BeanDefinitionBuilder as required.

protected String
getBeanClassName(Element
the Element that is being parsed
element
)

Overrides org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.getBeanClassName.

Determine the bean class name corresponding to the supplied Element.

protected boolean
isEligibleAttribute(String
the attribute name taken straight from the XML element being parsed (never null)
name
)

Overrides org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser.isEligibleAttribute.

Determine whether the given attribute is eligible for being turned into a corresponding bean property value.

protected String
resolveId(Element
the element that the bean definition has been built from
element
,
AbstractBeanDefinition
the bean definition to be registered
definition
,
ParserContext
the object encapsulating the current state of the parsing process; provides access to a org.springframework.beans.factory.support.BeanDefinitionRegistry
parserContext
)

Overrides org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.resolveId.

Resolve the ID for the supplied BeanDefinition.

Inherited from org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser:
extractPropertyNameisEligibleAttributepostProcess

Field Detail

BEAN_NAMEback to summary
public static final String BEAN_NAME

The bean name used for the ScriptTemplateConfigurer.

Constructor Detail

ScriptTemplateConfigurerBeanDefinitionParserback to summary
public ScriptTemplateConfigurerBeanDefinitionParser()

Method Detail

doParseback to summary
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)

Overrides org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser.doParse.

Doc from org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser.doParse.

Parse the supplied Element and populate the supplied BeanDefinitionBuilder as required.

This implementation maps any attributes present on the supplied element to org.springframework.beans.PropertyValue instances, and adds them to the builder.

The extractPropertyName(String) method is used to reconcile the name of an attribute with the name of a JavaBean property.

Parameters
element:Element

the XML element being parsed

parserContext:ParserContext

Doc from org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.doParse.

the object encapsulating the current state of the parsing process

builder:BeanDefinitionBuilder

used to define the BeanDefinition

Annotations
@Override
getBeanClassNameback to summary
protected String getBeanClassName(Element element)

Overrides org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.getBeanClassName.

Doc from org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.getBeanClassName.

Determine the bean class name corresponding to the supplied Element.

Parameters
element:Element

the Element that is being parsed

Returns:String

the class name of the bean that is being defined via parsing the supplied Element, or null if none

Annotations
@Override
isEligibleAttributeback to summary
protected boolean isEligibleAttribute(String name)

Overrides org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser.isEligibleAttribute.

Doc from org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser.isEligibleAttribute.

Determine whether the given attribute is eligible for being turned into a corresponding bean property value.

The default implementation considers any attribute as eligible, except for the "id" attribute.

Parameters
name:String

the attribute name taken straight from the XML element being parsed (never null)

Annotations
@Override
resolveIdback to summary
protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext)

Overrides org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.resolveId.

Doc from org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.resolveId.

Resolve the ID for the supplied BeanDefinition.

When using generation, a name is generated automatically. Otherwise, the ID is extracted from the "id" attribute, potentially with a fallback to a generated id.

Parameters
element:Element

the element that the bean definition has been built from

definition:AbstractBeanDefinition

the bean definition to be registered

parserContext:ParserContext

the object encapsulating the current state of the parsing process; provides access to a org.springframework.beans.factory.support.BeanDefinitionRegistry

Returns:String

the resolved id

Annotations
@Override