| java.lang.Object org.caramba.spring.SpringNamespaceHelper
SpringNamespaceHelper | public class SpringNamespaceHelper implements XmlBeanDefinitionParser(Code) | | Default implementation of the XmlBeanDefinitionParser interface.
Parses bean definitions according to the "spring-beans" DTD,
that is, Spring's default XML bean definition format.
The structure, elements and attribute names of the required XML document
are hard-coded in this class. (Of course a transform could be run if necessary
to produce this format). <beans> doesn't need to be the root
element of the XML document: This class will parse all bean definition elements
in the XML file, not regarding the actual root element.
author: Rod Johnson author: Juergen Hoeller author: Rob Harrop author: Erik Wiersma since: 18.12.2003 |
Method Summary | |
protected NamespaceHandlerResolver | createNamespaceHandlerResolver() | protected int | getAutowireMode(String att) | final protected BeanDefinitionReader | getBeanDefinitionReader() Return the BeanDefinitionReader that this parser has been called from. | final protected String | getDefaultAutowire() Return the default autowire setting for the document that's currently parsed. | final protected String | getDefaultDependencyCheck() Return the default dependency-check setting for the document that's currently parsed. | final protected String | getDefaultDestroyMethod() Return the default dependency-destroy-method setting for the document that's currently parsed. | final protected String | getDefaultInitMethod() Return the default dependency-init-method setting for the document that's currently parsed. | final protected String | getDefaultLazyInit() Return the default lazy-init flag for the document that's currently parsed. | protected int | getDependencyCheck(String att) | final protected Resource | getResource() Return the descriptor for the XML resource that this parser works on. | protected void | importBeanDefinitionResource(Element ele) Parse an "import" element and load the bean definitions
from the given resource into the bean factory. | protected void | initDefaults(Element root) Initialize the default lazy-init, autowire and dependency check settings. | protected BeanDefinitionHolder | parseBeanDefinitionElement(Element ele, boolean isInnerBean) Parse a standard bean definition into a BeanDefinitionHolder,
including bean name and aliases. | protected BeanDefinition | parseBeanDefinitionElement(Element ele, String beanName) Parse the BeanDefinition itself, without regard to name or aliases. | protected int | parseBeanDefinitions(Element root) Parse the elements at the root level in the document:
"import", "alias", "bean". | protected void | parseConstructorArgElement(Element ele, String beanName, ConstructorArgumentValues cargs) Parse a constructor-arg element. | protected ConstructorArgumentValues | parseConstructorArgElements(Element beanEle, String beanName) Parse constructor-arg sub-elements of the given bean element. | protected int | parseCustomElement(Element ele) | protected Object | parseKeyElement(Element keyEle, String beanName) Parse a key sub-element of a map element. | protected List | parseListElement(Element collectionEle, String beanName) Parse a list element. | protected void | parseLookupOverrideSubElements(Element beanEle, String beanName, MethodOverrides overrides) Parse lookup-override sub-elements of the given bean element. | protected Map | parseMapElement(Element mapEle, String beanName) Parse a map element. | protected void | parsePropertyElement(Element ele, String beanName, MutablePropertyValues pvs) Parse a property element. | public MutablePropertyValues | parsePropertyElements(Element beanEle, String beanName) Parse property sub-elements of the given bean element. | public Object | parsePropertySubElement(Element ele, String beanName) Parse a value, ref or collection sub-element of a property or
constructor-arg element. | protected Object | parsePropertyValue(Element ele, String beanName, String propertyName) Get the value of a property element. | protected Properties | parsePropsElement(Element propsEle, String beanName) Parse a props element. | protected void | parseReplacedMethodSubElements(Element beanEle, String beanName, MethodOverrides overrides) Parse replaced-method sub-elements of the given bean element. | protected Set | parseSetElement(Element collectionEle, String beanName) Parse a set element. | protected void | postProcessXml(Element root) Allow the XML to be extensible by processing any custom element types last,
after we finished processing the bean definitions. | protected void | preProcessXml(Element root) Allow the XML to be extensible by processing any custom element types first,
before we start to process the bean definitions. | public int | registerBeanDefinitions(BeanDefinitionReader reader, Document doc, Resource resource) Parses bean definitions according to the "spring-beans" DTD. | public void | registerBeanDefinitions(Document pDocument, ReaderContext pReaderContext) | final protected void | setDefaultAutowire(String defaultAutowire) Set the default autowire setting for the document that's currently parsed. | final protected void | setDefaultDependencyCheck(String defaultDependencyCheck) Set the default dependency-check setting for the document that's currently parsed. | final protected void | setDefaultDestroyMethod(String defaultDestroyMethod) Set the default dependency-destroy-method setting for the document that's currently parsed. | final protected void | setDefaultInitMethod(String defaultInitMethod) Set the default dependency-init-method setting for the document that's currently parsed. | final protected void | setDefaultLazyInit(String defaultLazyInit) Set the default lazy-init flag for the document that's currently parsed. |
ABSTRACT_ATTRIBUTE | final public static String ABSTRACT_ATTRIBUTE(Code) | | |
ALIAS_ATTRIBUTE | final public static String ALIAS_ATTRIBUTE(Code) | | |
ARG_TYPE_ELEMENT | final public static String ARG_TYPE_ELEMENT(Code) | | |
ARG_TYPE_MATCH_ATTRIBUTE | final public static String ARG_TYPE_MATCH_ATTRIBUTE(Code) | | |
AUTOWIRE_ATTRIBUTE | final public static String AUTOWIRE_ATTRIBUTE(Code) | | |
AUTOWIRE_AUTODETECT_VALUE | final public static String AUTOWIRE_AUTODETECT_VALUE(Code) | | |
AUTOWIRE_BY_NAME_VALUE | final public static String AUTOWIRE_BY_NAME_VALUE(Code) | | |
AUTOWIRE_BY_TYPE_VALUE | final public static String AUTOWIRE_BY_TYPE_VALUE(Code) | | |
AUTOWIRE_CONSTRUCTOR_VALUE | final public static String AUTOWIRE_CONSTRUCTOR_VALUE(Code) | | |
BEANS_NAMESPACE_URI | final public static String BEANS_NAMESPACE_URI(Code) | | |
BEAN_NAME_DELIMITERS | final public static String BEAN_NAME_DELIMITERS(Code) | | |
BEAN_REF_ATTRIBUTE | final public static String BEAN_REF_ATTRIBUTE(Code) | | |
CLASS_ATTRIBUTE | final public static String CLASS_ATTRIBUTE(Code) | | |
CONSTRUCTOR_ARG_ELEMENT | final public static String CONSTRUCTOR_ARG_ELEMENT(Code) | | |
DEFAULT_AUTOWIRE_ATTRIBUTE | final public static String DEFAULT_AUTOWIRE_ATTRIBUTE(Code) | | |
DEFAULT_DEPENDENCY_CHECK_ATTRIBUTE | final public static String DEFAULT_DEPENDENCY_CHECK_ATTRIBUTE(Code) | | |
DEFAULT_DESTROY_METHOD_ATTRIBUTE | final public static String DEFAULT_DESTROY_METHOD_ATTRIBUTE(Code) | | |
DEFAULT_INIT_METHOD_ATTRIBUTE | final public static String DEFAULT_INIT_METHOD_ATTRIBUTE(Code) | | |
DEFAULT_LAZY_INIT_ATTRIBUTE | final public static String DEFAULT_LAZY_INIT_ATTRIBUTE(Code) | | |
DEPENDENCY_CHECK_ALL_ATTRIBUTE_VALUE | final public static String DEPENDENCY_CHECK_ALL_ATTRIBUTE_VALUE(Code) | | |
DEPENDENCY_CHECK_ATTRIBUTE | final public static String DEPENDENCY_CHECK_ATTRIBUTE(Code) | | |
DEPENDENCY_CHECK_OBJECTS_ATTRIBUTE_VALUE | final public static String DEPENDENCY_CHECK_OBJECTS_ATTRIBUTE_VALUE(Code) | | |
DEPENDENCY_CHECK_SIMPLE_ATTRIBUTE_VALUE | final public static String DEPENDENCY_CHECK_SIMPLE_ATTRIBUTE_VALUE(Code) | | |
DEPENDS_ON_ATTRIBUTE | final public static String DEPENDS_ON_ATTRIBUTE(Code) | | |
DESCRIPTION_ELEMENT | final public static String DESCRIPTION_ELEMENT(Code) | | |
DESTROY_METHOD_ATTRIBUTE | final public static String DESTROY_METHOD_ATTRIBUTE(Code) | | |
FACTORY_BEAN_ATTRIBUTE | final public static String FACTORY_BEAN_ATTRIBUTE(Code) | | |
FACTORY_METHOD_ATTRIBUTE | final public static String FACTORY_METHOD_ATTRIBUTE(Code) | | |
IMPORT_ELEMENT | final public static String IMPORT_ELEMENT(Code) | | |
INDEX_ATTRIBUTE | final public static String INDEX_ATTRIBUTE(Code) | | |
INIT_METHOD_ATTRIBUTE | final public static String INIT_METHOD_ATTRIBUTE(Code) | | |
KEY_REF_ATTRIBUTE | final public static String KEY_REF_ATTRIBUTE(Code) | | |
LAZY_INIT_ATTRIBUTE | final public static String LAZY_INIT_ATTRIBUTE(Code) | | |
LOCAL_REF_ATTRIBUTE | final public static String LOCAL_REF_ATTRIBUTE(Code) | | |
LOOKUP_METHOD_ELEMENT | final public static String LOOKUP_METHOD_ELEMENT(Code) | | |
NAME_ATTRIBUTE | final public static String NAME_ATTRIBUTE(Code) | | |
PARENT_ATTRIBUTE | final public static String PARENT_ATTRIBUTE(Code) | | |
PARENT_REF_ATTRIBUTE | final public static String PARENT_REF_ATTRIBUTE(Code) | | |
PROPERTY_ELEMENT | final public static String PROPERTY_ELEMENT(Code) | | |
REPLACED_METHOD_ELEMENT | final public static String REPLACED_METHOD_ELEMENT(Code) | | |
REPLACER_ATTRIBUTE | final public static String REPLACER_ATTRIBUTE(Code) | | |
RESOURCE_ATTRIBUTE | final public static String RESOURCE_ATTRIBUTE(Code) | | |
SINGLETON_ATTRIBUTE | final public static String SINGLETON_ATTRIBUTE(Code) | | |
TRUE_VALUE | final public static String TRUE_VALUE(Code) | | Value of a T/F attribute that represents true.
Anything else represents false. Case seNsItive.
|
TYPE_ATTRIBUTE | final public static String TYPE_ATTRIBUTE(Code) | | |
VALUE_ATTRIBUTE | final public static String VALUE_ATTRIBUTE(Code) | | |
VALUE_REF_ATTRIBUTE | final public static String VALUE_REF_ATTRIBUTE(Code) | | |
logger | final protected Log logger(Code) | | |
createNamespaceHandlerResolver | protected NamespaceHandlerResolver createNamespaceHandlerResolver()(Code) | | |
getAutowireMode | protected int getAutowireMode(String att)(Code) | | |
getBeanDefinitionReader | final protected BeanDefinitionReader getBeanDefinitionReader()(Code) | | Return the BeanDefinitionReader that this parser has been called from.
|
getDefaultAutowire | final protected String getDefaultAutowire()(Code) | | Return the default autowire setting for the document that's currently parsed.
|
getDefaultDependencyCheck | final protected String getDefaultDependencyCheck()(Code) | | Return the default dependency-check setting for the document that's currently parsed.
|
getDefaultDestroyMethod | final protected String getDefaultDestroyMethod()(Code) | | Return the default dependency-destroy-method setting for the document that's currently parsed.
|
getDefaultInitMethod | final protected String getDefaultInitMethod()(Code) | | Return the default dependency-init-method setting for the document that's currently parsed.
|
getDefaultLazyInit | final protected String getDefaultLazyInit()(Code) | | Return the default lazy-init flag for the document that's currently parsed.
|
getDependencyCheck | protected int getDependencyCheck(String att)(Code) | | |
getResource | final protected Resource getResource()(Code) | | Return the descriptor for the XML resource that this parser works on.
|
importBeanDefinitionResource | protected void importBeanDefinitionResource(Element ele) throws BeanDefinitionStoreException(Code) | | Parse an "import" element and load the bean definitions
from the given resource into the bean factory.
|
parseBeanDefinitionElement | protected BeanDefinitionHolder parseBeanDefinitionElement(Element ele, boolean isInnerBean) throws BeanDefinitionStoreException(Code) | | Parse a standard bean definition into a BeanDefinitionHolder,
including bean name and aliases.
Bean elements specify their canonical name as "id" attribute
and their aliases as a delimited "name" attribute.
If no "id" specified, uses the first name in the "name" attribute
as canonical name, registering all others as aliases.
Callers should specify whether this element represents an inner bean
definition or not by setting the isInnerBean argument appropriately
|
parseBeanDefinitionElement | protected BeanDefinition parseBeanDefinitionElement(Element ele, String beanName) throws BeanDefinitionStoreException(Code) | | Parse the BeanDefinition itself, without regard to name or aliases.
|
parseBeanDefinitions | protected int parseBeanDefinitions(Element root) throws BeanDefinitionStoreException(Code) | | Parse the elements at the root level in the document:
"import", "alias", "bean".
Parameters: root - the DOM root element of the document the number of bean definitions found |
parseConstructorArgElement | protected void parseConstructorArgElement(Element ele, String beanName, ConstructorArgumentValues cargs) throws BeanDefinitionStoreException(Code) | | Parse a constructor-arg element.
|
parseConstructorArgElements | protected ConstructorArgumentValues parseConstructorArgElements(Element beanEle, String beanName) throws BeanDefinitionStoreException(Code) | | Parse constructor-arg sub-elements of the given bean element.
|
parseCustomElement | protected int parseCustomElement(Element ele)(Code) | | |
parseKeyElement | protected Object parseKeyElement(Element keyEle, String beanName) throws BeanDefinitionStoreException(Code) | | Parse a key sub-element of a map element.
|
parseListElement | protected List parseListElement(Element collectionEle, String beanName) throws BeanDefinitionStoreException(Code) | | Parse a list element.
|
parseLookupOverrideSubElements | protected void parseLookupOverrideSubElements(Element beanEle, String beanName, MethodOverrides overrides) throws BeanDefinitionStoreException(Code) | | Parse lookup-override sub-elements of the given bean element.
|
parseMapElement | protected Map parseMapElement(Element mapEle, String beanName) throws BeanDefinitionStoreException(Code) | | Parse a map element.
|
parsePropertyElement | protected void parsePropertyElement(Element ele, String beanName, MutablePropertyValues pvs) throws BeanDefinitionStoreException(Code) | | Parse a property element.
|
parsePropertyElements | public MutablePropertyValues parsePropertyElements(Element beanEle, String beanName) throws BeanDefinitionStoreException(Code) | | Parse property sub-elements of the given bean element.
|
parsePropertySubElement | public Object parsePropertySubElement(Element ele, String beanName) throws BeanDefinitionStoreException(Code) | | Parse a value, ref or collection sub-element of a property or
constructor-arg element.
Parameters: ele - subelement of property element; we don't know which yet |
parsePropertyValue | protected Object parsePropertyValue(Element ele, String beanName, String propertyName) throws BeanDefinitionStoreException(Code) | | Get the value of a property element. May be a list etc.
Also used for constructor arguments, "propertyName" being null in this case.
|
parsePropsElement | protected Properties parsePropsElement(Element propsEle, String beanName) throws BeanDefinitionStoreException(Code) | | Parse a props element.
|
parseReplacedMethodSubElements | protected void parseReplacedMethodSubElements(Element beanEle, String beanName, MethodOverrides overrides) throws BeanDefinitionStoreException(Code) | | Parse replaced-method sub-elements of the given bean element.
|
parseSetElement | protected Set parseSetElement(Element collectionEle, String beanName) throws BeanDefinitionStoreException(Code) | | Parse a set element.
|
postProcessXml | protected void postProcessXml(Element root) throws BeanDefinitionStoreException(Code) | | Allow the XML to be extensible by processing any custom element types last,
after we finished processing the bean definitions. This method is a natural
extension point for any other custom post-processing of the XML.
Default implementation is empty. Subclasses can override this method to
convert custom elements into standard Spring bean definitions, for example.
Implementors have access to the parser's bean definition reader and the
underlying XML resource, through the corresponding accessors.
See Also: SpringNamespaceHelper.getBeanDefinitionReader() See Also: SpringNamespaceHelper.getResource() |
preProcessXml | protected void preProcessXml(Element root) throws BeanDefinitionStoreException(Code) | | Allow the XML to be extensible by processing any custom element types first,
before we start to process the bean definitions. This method is a natural
extension point for any other custom pre-processing of the XML.
Default implementation is empty. Subclasses can override this method to
convert custom elements into standard Spring bean definitions, for example.
Implementors have access to the parser's bean definition reader and the
underlying XML resource, through the corresponding accessors.
See Also: SpringNamespaceHelper.getBeanDefinitionReader() See Also: SpringNamespaceHelper.getResource() |
registerBeanDefinitions | public int registerBeanDefinitions(BeanDefinitionReader reader, Document doc, Resource resource) throws BeanDefinitionStoreException(Code) | | Parses bean definitions according to the "spring-beans" DTD.
Opens a DOM Document; then initializes the default settings
specified at <beans> level; then parses
the contained bean definitions.
|
registerBeanDefinitions | public void registerBeanDefinitions(Document pDocument, ReaderContext pReaderContext) throws BeanDefinitionStoreException(Code) | | |
setDefaultAutowire | final protected void setDefaultAutowire(String defaultAutowire)(Code) | | Set the default autowire setting for the document that's currently parsed.
|
setDefaultDependencyCheck | final protected void setDefaultDependencyCheck(String defaultDependencyCheck)(Code) | | Set the default dependency-check setting for the document that's currently parsed.
|
setDefaultDestroyMethod | final protected void setDefaultDestroyMethod(String defaultDestroyMethod)(Code) | | Set the default dependency-destroy-method setting for the document that's currently parsed.
|
setDefaultInitMethod | final protected void setDefaultInitMethod(String defaultInitMethod)(Code) | | Set the default dependency-init-method setting for the document that's currently parsed.
|
setDefaultLazyInit | final protected void setDefaultLazyInit(String defaultLazyInit)(Code) | | Set the default lazy-init flag for the document that's currently parsed.
|
|
|