Source Code Cross Referenced for AbstractComponentDOMCcslXMLGenerator.java in  » ESB » cbesb-1.2 » com » bostechcorp » cbesb » common » util » generators » 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 » cbesb 1.2 » com.bostechcorp.cbesb.common.util.generators 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * ChainBuilder ESB
003:         * 		Visual Enterprise Integration
004:         * 
005:         * Copyright (C) 2006 Bostech Corporation
006:         * 
007:         * This program is free software; you can redistribute it and/or modify it 
008:         * under the terms of the GNU General Public License as published by the 
009:         * Free Software Foundation; either version 2 of the License, or (at your option) 
010:         * any later version.
011:         *
012:         * This program is distributed in the hope that it will be useful, 
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
014:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
015:         * for more details.
016:         * 
017:         * You should have received a copy of the GNU General Public License along with 
018:         * this program; if not, write to the Free Software Foundation, Inc., 
019:         * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020:         *
021:         *
022:         * $Id:$
023:         * 
024:         */
025:        package com.bostechcorp.cbesb.common.util.generators;
026:
027:        import org.jdom.DefaultJDOMFactory;
028:        import org.jdom.Element;
029:        import org.jdom.JDOMFactory;
030:
031:        import com.bostechcorp.cbesb.common.util.macro.MacroUtil;
032:
033:        /**
034:         * @author LPS
035:         * @deprecated
036:         *
037:         */
038:        public class AbstractComponentDOMCcslXMLGenerator extends
039:                AbstractDOMGenerator {
040:
041:            /**
042:             *	constants holding tag names for the ccsl.xml  
043:             */
044:            protected static final String CCSL_SU_CONFIG_T = "ccslSuConfig";
045:            protected static final String ENDPOINTS_T = "endpoints";
046:            protected static final String ENDPOINT_T = "endpoint";
047:            protected static final String UPOC_T = "upoc";
048:            protected static final String ENDPOINT_SERVICE_NS_A = "serviceNS";
049:            protected static final String ENDPOINT_SERVICE_LOCAL_A = "serviceLocal";
050:            protected static final String ENDPOINT_NAME_A = "name";
051:            protected static final String ENPOINTt_ADDR_RECORD_A = "addRecord";
052:            protected static final String ENDPOINT_STRIP_RECORD_A = "stripRecord";
053:            protected static final String ENDPOINT_SAVE_ERRORS_A = "saveErrors";
054:            protected static final String ENDPOINT_USE_SEND_MESSAGE_A = "useSendMessage";
055:            protected static final String ENDPOINT_UPOC_CONTEXT_A = "context";
056:            protected static final String ENDPOINT_UPOC_TYPE_A = "type";
057:            protected static final String ENDPOINT_UPOC_CLASS_A = "class";
058:            protected static final String ENDPOINT_UPOC_METHOD_A = "method";
059:            //	context="presend" 
060:            //		type="Groovy" 
061:            //			class="httpUPOCs.groovy" 
062:            //				method="aaaaaa"
063:            /**
064:             * path managers
065:             */
066:
067:            protected String fileName = "/META-INF/ccsl.xml";
068:
069:            private String saName = "";
070:
071:            /**
072:             * XML structure holders
073:             */
074:
075:            protected Element endpoint;
076:            protected Element endpointsElement;
077:
078:            public AbstractComponentDOMCcslXMLGenerator() {
079:                super ();
080:            }
081:
082:            public AbstractComponentDOMCcslXMLGenerator(String string,
083:                    String saName) {
084:                super (string);
085:                this .saName = saName;
086:            }
087:
088:            public void addEndpoint(String serviceNS, String serviceLocal,
089:                    String name, String addRecord, String stripRecord,
090:                    String saveErr, String useSendMessage) {
091:                JDOMFactory jdomFactory = new DefaultJDOMFactory();
092:                endpoint = jdomFactory.element(ENDPOINT_T, rootElement
093:                        .getNamespace());
094:                endpoint.setAttribute(jdomFactory.attribute(
095:                        ENDPOINT_SERVICE_NS_A, serviceNS));
096:                endpoint.setAttribute(jdomFactory.attribute(
097:                        ENDPOINT_SERVICE_LOCAL_A, serviceLocal));
098:                endpoint.setAttribute(jdomFactory.attribute(ENDPOINT_NAME_A,
099:                        name));
100:                endpoint.setAttribute(jdomFactory.attribute(
101:                        ENPOINTt_ADDR_RECORD_A, addRecord));
102:                endpoint.setAttribute(jdomFactory.attribute(
103:                        ENDPOINT_STRIP_RECORD_A, stripRecord));
104:                endpoint.setAttribute(jdomFactory.attribute(
105:                        ENDPOINT_SAVE_ERRORS_A, saveErr));
106:                endpoint.setAttribute(jdomFactory.attribute(
107:                        ENDPOINT_USE_SEND_MESSAGE_A, useSendMessage));
108:                //endpoint.addContent("\n");
109:                endpointsElement.addContent(endpoint);
110:            }
111:
112:            public void addContentedEndpoint(String serviceNS,
113:                    String serviceLocal, String name, String addRecord,
114:                    String stripRecord, String saveErr, String useSendMessage,
115:                    String tagContent) {
116:                JDOMFactory jdomFactory = new DefaultJDOMFactory();
117:                endpoint = jdomFactory.element(ENDPOINT_T, rootElement
118:                        .getNamespace());
119:                endpoint.setAttribute(jdomFactory.attribute(
120:                        ENDPOINT_SERVICE_NS_A, serviceNS));
121:                endpoint.setAttribute(jdomFactory.attribute(
122:                        ENDPOINT_SERVICE_LOCAL_A, serviceLocal));
123:                endpoint.setAttribute(jdomFactory.attribute(ENDPOINT_NAME_A,
124:                        name));
125:                endpoint.setAttribute(jdomFactory.attribute(
126:                        ENPOINTt_ADDR_RECORD_A, addRecord));
127:                endpoint.setAttribute(jdomFactory.attribute(
128:                        ENDPOINT_STRIP_RECORD_A, stripRecord));
129:                endpoint.setAttribute(jdomFactory.attribute(
130:                        ENDPOINT_SAVE_ERRORS_A, saveErr));
131:                endpoint.setAttribute(jdomFactory.attribute(
132:                        ENDPOINT_USE_SEND_MESSAGE_A, useSendMessage));
133:
134:                endpoint.addContent(tagContent);
135:                endpointsElement.addContent(endpoint);
136:            }
137:
138:            public void addUpocAttribute(String context, String type,
139:                    String className, String method) {
140:                JDOMFactory jdomFactory = new DefaultJDOMFactory();
141:                Element upocElement = jdomFactory.element(UPOC_T, rootElement
142:                        .getNamespace());
143:                upocElement.setAttribute(jdomFactory.attribute(
144:                        ENDPOINT_UPOC_CONTEXT_A, context));
145:                upocElement.setAttribute(jdomFactory.attribute(
146:                        ENDPOINT_UPOC_TYPE_A, type));
147:                upocElement.setAttribute(jdomFactory.attribute(
148:                        ENDPOINT_UPOC_CLASS_A, MacroUtil.resolveBuiltinMacro(
149:                                className, saName)));
150:                upocElement.setAttribute(jdomFactory.attribute(
151:                        ENDPOINT_UPOC_METHOD_A, method));
152:                endpoint.addContent(upocElement);
153:            }
154:
155:            //	public void addUpooc(Element element,Element element2){
156:            //		
157:            //	}
158:            protected void buildDocumentStructure() {
159:                JDOMFactory jdomFactory = new DefaultJDOMFactory();
160:                rootElement = jdomFactory.element(CCSL_SU_CONFIG_T);
161:                endpointsElement = jdomFactory.element(ENDPOINTS_T, rootElement
162:                        .getNamespace());
163:                rootElement.addContent(endpointsElement);
164:            }
165:
166:            protected String getFileOut() {
167:                return filePath + fileName;
168:            }
169:
170:            /*			
171:            public static void main(String[] args) 
172:            {
173:            	AbstractComponentDOMCcslXMLGenerator dom = new AbstractComponentDOMCcslXMLGenerator("c:/");
174:            	dom.addEndpoint("df", "df", "fg", "uuy", "yu", "yu", "yu");
175:            	dom.addEndpoint("df", "df", "fg", "uuy", "yu", "yu", "yu");
176:            	dom.addEndpoint("df", "df", "fg", "uuy", "yu", "yu", "yu");
177:            	dom.addEndpoint("df", "df", "fg", "uuy", "yu", "yu", "yu");
178:            	dom.addEndpoint("df", "df", "fg", "uuy", "yu", "yu", "yu");
179:            	dom.addEndpoint("df", "df", "fg", "uuy", "yu", "yu", "yu");
180:            	dom.addEndpoint("df", "df", "fg", "uuy", "yu", "yu", "yu");
181:            	dom.write();
182:            }*/
183:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.