01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2006 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU General Public License as published by
09: * the Free Software Foundation; either version 2 of the License, or
10: * (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with this program; if not, write to the Free Software
19: * Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA 02111-1307
20: * USA
21: *
22: * $Id: TCPIPConversion.java 6998 2007-04-24 01:13:00Z jzhang $
23: *
24: */
25: package com.bostechcorp.cbesb.ui.util.version;
26:
27: import org.jdom.Element;
28:
29: /**
30: *
31: */
32: public class TCPIPConversion {
33:
34: public static void convert(Element element, Element tcpip) {
35: Element newProviderCCSL = ConversionUtil.convertCCSL(
36: ConversionUtil.CONSUMER, element, "consumerCCSL");
37: Element newConsumerCCSL = ConversionUtil.convertCCSL(
38: ConversionUtil.PROVIDER, element, "providerCCSL");
39:
40: Element newClient = new Element("client");
41: Element newServer = new Element("server");
42: ConversionUtil.convertAttribute(element.getChild("client"),
43: newClient);
44: ConversionUtil.convertAttribute(element.getChild("server"),
45: newServer);
46:
47: Element newClientSSL = new Element("SSL");
48: Element newServerSSL = new Element("SSL");
49: ConversionUtil.convertAttribute(element.getChild("client")
50: .getChild("sslClient"), newClientSSL);
51: ConversionUtil.convertAttribute(element.getChild("server")
52: .getChild("sslServer"), newServerSSL);
53:
54: Element newTcpipConsumer = new Element("tcpipConsumer");
55: Element newTcpipProvider = new Element("tcpipProvider");
56: ConversionUtil.convertAttribute(element.getChild("consumer"),
57: newTcpipConsumer);
58: ConversionUtil.convertAttribute(element.getChild("provider"),
59: newTcpipProvider);
60:
61: newClient.addContent(newClientSSL);
62: newServer.addContent(newServerSSL);
63: tcpip.addContent(newProviderCCSL);
64: tcpip.addContent(newConsumerCCSL);
65: tcpip.addContent(newClient);
66: tcpip.addContent(newServer);
67: tcpip.addContent(newTcpipConsumer);
68: tcpip.addContent(newTcpipProvider);
69: }
70: }
|