Source Code Cross Referenced for NamespaceHandler.java in  » J2EE » spring-framework-2.0.6 » org » springframework » beans » factory » xml » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.0.6 » org.springframework.beans.factory.xml 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*
02:         * Copyright 2002-2007 the original author or authors.
03:         *
04:         * Licensed under the Apache License, Version 2.0 (the "License");
05:         * you may not use this file except in compliance with the License.
06:         * You may obtain a copy of the License at
07:         *
08:         *      http://www.apache.org/licenses/LICENSE-2.0
09:         *
10:         * Unless required by applicable law or agreed to in writing, software
11:         * distributed under the License is distributed on an "AS IS" BASIS,
12:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13:         * See the License for the specific language governing permissions and
14:         * limitations under the License.
15:         */
16:
17:        package org.springframework.beans.factory.xml;
18:
19:        import org.w3c.dom.Element;
20:        import org.w3c.dom.Node;
21:
22:        import org.springframework.beans.factory.config.BeanDefinition;
23:        import org.springframework.beans.factory.config.BeanDefinitionHolder;
24:
25:        /**
26:         * Base interface used by the {@link DefaultBeanDefinitionDocumentReader}
27:         * for handling custom namespaces in a Spring XML configuration file.
28:         *
29:         * <p>Implementations are expected to return implementations of the
30:         * {@link BeanDefinitionParser} interface for custom top-level tags and
31:         * implementations of the {@link BeanDefinitionDecorator} interface for
32:         * custom nested tags.
33:         *
34:         * <p>The parser will call {@link #parse} when it encounters a custom tag
35:         * directly under the <code>&lt;beans&gt;</code> tags and {@link #decorate} when
36:         * it encounters a custom tag directly under a <code>&lt;bean&gt;</code> tag.
37:         *
38:         * <p>Developers writing their own custom element extensions typically will
39:         * not implement this interface drectly, but rather make use of the provided
40:         * {@link NamespaceHandlerSupport} class.
41:         *
42:         * @author Rob Harrop
43:         * @author Erik Wiersma
44:         * @since 2.0
45:         * @see DefaultBeanDefinitionDocumentReader
46:         * @see NamespaceHandlerResolver
47:         */
48:        public interface NamespaceHandler {
49:
50:            /**
51:             * Invoked by the {@link DefaultBeanDefinitionDocumentReader} after
52:             * construction but before any custom elements are parsed.
53:             * @see NamespaceHandlerSupport#registerBeanDefinitionParser(String, BeanDefinitionParser) 
54:             */
55:            void init();
56:
57:            /**
58:             * Parse the specified {@link Element} and register any resulting
59:             * {@link BeanDefinition BeanDefinitions} with the
60:             * {@link org.springframework.beans.factory.support.BeanDefinitionRegistry}
61:             * that is embedded in the supplied {@link ParserContext}.
62:             * <p>Implementations should return the primary <code>BeanDefinition</code>
63:             * that results from the parse phase if they wish to be used nested
64:             * inside (for example) a <code>&lt;property&gt;</code> tag.
65:             * <p>Implementations may return <code>null</code> if they will
66:             * <strong>not</strong> be used in a nested scenario.
67:             * @param element the element that is to be parsed into one or more <code>BeanDefinitions</code>
68:             * @param parserContext the object encapsulating the current state of the parsing process
69:             * @return the primary <code>BeanDefinition</code> (can be <code>null</code> as explained above) 
70:             */
71:            BeanDefinition parse(Element element, ParserContext parserContext);
72:
73:            /**
74:             * Parse the specified {@link Node} and decorate the supplied
75:             * {@link BeanDefinitionHolder}, returning the decorated definition.
76:             * <p>The {@link Node} may be either an {@link org.w3c.dom.Attr} or an
77:             * {@link Element}, depending on whether a custom attribute or element
78:             * is being parsed.
79:             * <p>Implementations may choose to return a completely new definition,
80:             * which will replace the original definition in the resulting
81:             * {@link org.springframework.beans.factory.BeanFactory}.
82:             * <p>The supplied {@link ParserContext} can be used to register any
83:             * additional beans needed to support the main definition.
84:             * @param source the source element or attribute that is to be parsed
85:             * @param definition the current bean definition
86:             * @param parserContext the object encapsulating the current state of the parsing process
87:             * @return the decorated definition (to be registered in the BeanFactory),
88:             * or simply the original bean definition if no decoration is required.
89:             * A <code>null</code> value is strictly speaking invalid, but will be leniently
90:             * treated like the case where the original bean definition gets returned.
91:             */
92:            BeanDefinitionHolder decorate(Node source,
93:                    BeanDefinitionHolder definition, ParserContext parserContext);
94:
95:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.