public class SpringConfigParser extends Object implements ParserConstants, BeanParser
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
ABSTRACT, ALIAS, BEAN, BEAN_PROPERTY_PREFIX, BEAN_PROPERTY_REF_SUFFIX, CLASS, CONSTRUCTOR_ARGS, DESTROY_METHOD, ENTRY, FACTORY_BEAN, FACTORY_METHOD, ID, IDREF, INDEX, INIT_METHOD, KEY, KEY_REF, LIST, LOCAL, MAP, NAME, NULL, PARENT, PROP, PROPS, PROTOTYPE, REF, RESOURCE, SCOPE, SET, SINGLETON, TYPE, VALUE, VALUE_REF, XML_NAMESPACE_DEF, XML_NAMESPACE_DELIMITER, XPATH_BEAN, XPATH_BEANS_NODE, XPATH_IMPORT, XPATH_PROPERTY| Constructor and Description |
|---|
SpringConfigParser() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNamespaceParser(NamespaceParser plugin) |
void |
addNamespaceParsers(List<NamespaceParser> plugins) |
BeanContainer |
getBeanContainer() |
Collection<NodeParserPlugin> |
getNodeParserPlugins()
the list of all NodeSupportPlugins that have been registered by various NamespaceParser to match the XML namespaces defined in the document
|
XPathFactory |
getXPathFactory() |
Property |
handleNode(Node node,
String propName)
Handle the following node :
|
void |
handleNodes(Bean bean,
String propName,
NodeList nodes)
Handle all bean's properties nodes
|
protected void |
handleNodes(NodeList nodes)
Handle a list of node
|
Map<String,Bean> |
load(Collection<String> configurationFiles)
Load a set of configuration files
|
Map<String,Bean> |
load(String configurationFile)
Load a single configuration file
|
protected void |
resolveImports(NodeList importsRef,
Set<String> loadedContext,
String fullPath)
Recursively resolves a list of import directive and enrich the loadedContext
|
public SpringConfigParser()
throws ParserConfigurationException
ParserConfigurationExceptionpublic XPathFactory getXPathFactory()
getXPathFactory in interface BeanParserprotected void handleNodes(NodeList nodes) throws XPathExpressionException
nodes - List of nodes to processXPathExpressionExceptionpublic void handleNodes(Bean bean, String propName, NodeList nodes) throws XPathExpressionException
handleNodes in interface BeanParserbean - : reference to the bean owning this attributespropName - name of the property being inspectednodes - list to processXPathExpressionExceptionpublic Property handleNode(Node node, String propName) throws XPathExpressionException
handleNode in interface BeanParsernode - is the XML node representing the propertiespropName - is the name of the property for the parent beanXPathExpressionExceptionpublic Map<String,Bean> load(Collection<String> configurationFiles) throws SAXException, IOException
configurationFiles - SAXExceptionIOExceptionpublic Map<String,Bean> load(String configurationFile) throws SAXException, IOException
configurationFile - SAXExceptionIOExceptionprotected void resolveImports(NodeList importsRef, Set<String> loadedContext, String fullPath) throws ParserConfigurationException, SAXException, IOException
importsRef - loadedContext - fullPath - ParserConfigurationExceptionSAXExceptionIOExceptionpublic BeanContainer getBeanContainer()
getBeanContainer in interface BeanParserpublic Collection<NodeParserPlugin> getNodeParserPlugins()
BeanParsergetNodeParserPlugins in interface BeanParserpublic void addNamespaceParsers(List<NamespaceParser> plugins)
public void addNamespaceParser(NamespaceParser plugin)
Copyright © 2012-2013 Static IOC OSS project. All Rights Reserved.