Source Code Cross Referenced for FTPConversion.java in  » ESB » cbesb-1.2 » com » bostechcorp » cbesb » ui » util » version » 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.ui.util.version 
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 
008:         * it under the terms of the GNU General Public License as published by 
009:         * the Free Software Foundation; either version 2 of the License, or 
010:         * (at your option) 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 
014:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
015:         * General Public License for more details.
016:         * 
017:         * You should have received a copy of the GNU General Public License 
018:         * along with this program; if not, write to the Free Software 
019:         * Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA 02111-1307 
020:         * USA
021:         *
022:         * $Id: FTPConversion.java 7718 2007-06-04 09:36:40Z jzhang $
023:         *
024:         */
025:        package com.bostechcorp.cbesb.ui.util.version;
026:
027:        import org.jdom.Element;
028:
029:        /**
030:         * 
031:         */
032:        public class FTPConversion {
033:
034:            public static void convert(Element element, Element ftp) {
035:                Element ftpWSDLDocument = element.getChild("ftpWSDLDocument");
036:
037:                Element newConsumerCCSL;
038:                if (ftpWSDLDocument.getChild("ftpConsumerCCSL") == null) {
039:                    newConsumerCCSL = ConversionUtil.convertCCSL(
040:                            ConversionUtil.CONSUMER, element, "consumerCCSL");
041:                } else {
042:                    newConsumerCCSL = ConversionUtil.createCCSL(
043:                            ConversionUtil.CONSUMER, ftpWSDLDocument
044:                                    .getChild("ftpConsumerCCSL"));
045:                }
046:                Element newProviderCCSL;
047:                if (ftpWSDLDocument.getChild("ftpProviderCCSL") == null) {
048:                    newProviderCCSL = ConversionUtil.convertCCSL(
049:                            ConversionUtil.PROVIDER, element, "providerCCSL");
050:                } else {
051:                    newProviderCCSL = ConversionUtil.createCCSL(
052:                            ConversionUtil.PROVIDER, ftpWSDLDocument
053:                                    .getChild("ftpProviderCCSL"));
054:                }
055:                ftp.addContent(newConsumerCCSL);
056:                ftp.addContent(newProviderCCSL);
057:                // old base
058:                Element ftpBase = ftpWSDLDocument.getChild("ftpBase");
059:                Element ftpRead = ftpBase.getChild("ftpRead");
060:                Element ftpReply = ftpRead.getChild("ftpReply");
061:                Element ftpReadReply = ftpReply.getChild("ftpReadReply");
062:                Element ftpCompletion = ftpRead.getChild("ftpCompletion");
063:                Element ftpHold = ftpRead.getChild("ftpHold");
064:                Element ftpTwoPassMode = ftpRead.getChild("ftpTwoPassMode");
065:                Element ftpWrite = ftpBase.getChild("ftpWrite");
066:                Element ftpWriteCompletion = ftpWrite
067:                        .getChild("ftpWriteCompletion");
068:                // new base
069:                Element newFtpBase = new Element("ftpBase");
070:                Element newFtpConsumer = new Element("ftpConsumer");
071:                Element newFtpReply = new Element("ftpReply");
072:                Element newFtpAuthentication = new Element("ftpAuthentication");
073:                Element newConsumerFileCompletion = new Element(
074:                        "fileCompletion");
075:                Element newScheduler = new Element("Scheduler");
076:                Element newFtpProvider = new Element("ftpProvider");
077:                Element newProviderFileCompletion = new Element(
078:                        "fileCompletion");
079:
080:                if (ftpWSDLDocument.getAttributeValue("mode") != null) {
081:                    ftp.setAttribute("role", "provider");
082:                }
083:                if (ftpWSDLDocument.getAttributeValue("scriptMode") != null) {
084:                    ftp.setAttribute("scriptMode", "script");
085:                }
086:                if (ftpHold.getAttributeValue("enabled") != null) {
087:                    newFtpConsumer.setAttribute("holdEnabled", "true");
088:                    newFtpConsumer.setAttribute("holdDirectory", ftpHold
089:                            .getAttributeValue("holdDirectory"));
090:                }
091:                if (ftpTwoPassMode.getAttributeValue("enabled") != null) {
092:                    newFtpConsumer.setAttribute("twoPassModeIntevalEnabled",
093:                            "true");
094:                    newFtpConsumer.setAttribute("twoPassModeInterval",
095:                            ftpTwoPassMode.getAttributeValue("interval"));
096:                } else {
097:                    newFtpConsumer.setAttribute("twoPassModeIntevalEnabled",
098:                            "false");
099:                }
100:                ConversionUtil.convertAttribute(ftpRead, newFtpConsumer);
101:                ConversionUtil.convertAttribute(ftpReply, newFtpReply);
102:                ConversionUtil.convertAttribute(ftpReadReply,
103:                        newFtpAuthentication);
104:                ConversionUtil.convertAttribute(ftpCompletion,
105:                        newConsumerFileCompletion);
106:                ConversionUtil.convertAttribute(ftpWrite, newFtpProvider);
107:                ConversionUtil.convertAttribute(ftpWriteCompletion,
108:                        newProviderFileCompletion);
109:                newFtpConsumer.addContent(newConsumerFileCompletion);
110:                newFtpConsumer.addContent(newScheduler);
111:                newFtpReply.addContent(newFtpAuthentication);
112:                newFtpConsumer.addContent(newFtpReply);
113:                newFtpBase.addContent(newFtpConsumer);
114:                newFtpProvider.addContent(newProviderFileCompletion);
115:                newFtpBase.addContent(newFtpProvider);
116:                ftp.addContent(newFtpBase);
117:            }
118:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.