Source Code Cross Referenced for BeanAssembler.java in  » ESB » mule » org » mule » config » spring » parsers » assembly » 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 » ESB » mule » org.mule.config.spring.parsers.assembly 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Id: BeanAssembler.java 10494 2008-01-23 21:09:56Z acooke $
003:         * --------------------------------------------------------------------------------------
004:         * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
005:         *
006:         * The software in this package is published under the terms of the CPAL v1.0
007:         * license, a copy of which has been included with this distribution in the
008:         * LICENSE.txt file.
009:         */
010:
011:        package org.mule.config.spring.parsers.assembly;
012:
013:        import org.springframework.beans.factory.config.BeanDefinition;
014:        import org.springframework.beans.factory.support.BeanDefinitionBuilder;
015:        import org.w3c.dom.Attr;
016:
017:        /**
018:         * Bean Assembler provides a high-level interface to constructing beans.  It encapsulates all
019:         * the "smart" logic about collections, maps, references, etc.
020:         *
021:         * <p>A bean assembly contains a bean (the thing we are constructing), a target (where we put the
022:         * bean once it is ready) and appropriate configuration information (there is a configuration
023:         * for both bean and target, but currently they are set to the same instance by the classes that
024:         * use this).
025:         */
026:        public interface BeanAssembler {
027:
028:            public BeanDefinitionBuilder getBean();
029:
030:            public BeanDefinition getTarget();
031:
032:            /**
033:             * Add a property defined by an attribute to the bean we are constructing.
034:             *
035:             * <p>Since an attribute value is always a string, we don't have to deal with complex types
036:             * here - the only issue is whether or not we have a reference.  References are detected
037:             * by explicit annotation or by the "-ref" at the end of an attribute name.  We do not
038:             * check the Spring repo to see if a name already exists since that could lead to
039:             * unpredictable behaviour.
040:             * (see {@link org.mule.config.spring.parsers.assembly.configuration.PropertyConfiguration})
041:             * @param attribute The attribute to add
042:             */
043:            void extendBean(Attr attribute);
044:
045:            /**
046:             * Allow direct access to bean for more complex cases
047:             *
048:             * @param newName The property name to add
049:             * @param newValue The property value to add
050:             * @param isReference If true, a bean reference is added (and newValue must be a String)
051:             */
052:            void extendBean(String newName, Object newValue, boolean isReference);
053:
054:            /**
055:             * Add a property defined by an attribute to the parent of the bean we are constructing.
056:             *
057:             * <p>This is unusual.  Normally you want {@link #extendBean(org.w3c.dom.Attr)}.
058:             * @param attribute The attribute to add
059:             */
060:            void extendTarget(Attr attribute);
061:
062:            /**
063:             * Allow direct access to target for more complex cases
064:             *
065:             * @param newName The property name to add
066:             * @param newValue The property value to add
067:             * @param isReference If true, a bean reference is added (and newValue must be a String)
068:             */
069:            void extendTarget(String newName, Object newValue,
070:                    boolean isReference);
071:
072:            void extendTarget(String oldName, String newName, Object newValue);
073:
074:            /**
075:             * Insert the bean we have built into the target (typically the parent bean).
076:             *
077:             * <p>This is the most complex case because the bean can have an aribtrary type.
078:             * @param oldName The identifying the bean (typically element name).
079:             */
080:            void insertBeanInTarget(String oldName);
081:
082:            /**
083:             * Copy the properties from the bean we have been building into the target (typically
084:             * the parent bean).  In other words, the bean is a facade for the target.
085:             *
086:             * <p>This assumes that the source bean has been constructed correctly (ie the decisions about
087:             * what is ignored, a map, a list, etc) have already been made.   All it does (apart from a
088:             * direct copy) is merge collections with those on the target when necessary.
089:             */
090:            void copyBeanToTarget();
091:
092:            /**
093:             * Set a flag on the bean - this is used to communicate with
094:             * {@link org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate}
095:             *
096:             * @param flag The flag to set
097:             */
098:            void setBeanFlag(String flag);
099:
100:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.