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 it
08: * under the terms of the GNU General Public License as published by the
09: * Free Software Foundation; either version 2 of the License, or (at your option)
10: * 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 MERCHANTABILITY
14: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15: * for more details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc.,
19: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: *
22: * $Id: SequencingWsdl1Deployer.java 7269 2007-05-08 20:15:10Z mpreston $
23: */
24:
25: package com.bostechcorp.cbesb.runtime.component.sequencing;
26:
27: import javax.wsdl.extensions.ExtensibilityElement;
28: import javax.wsdl.extensions.ExtensionRegistry;
29:
30: //import org.apache.servicemix.common.BaseComponent;
31: //import org.apache.servicemix.common.Endpoint;
32: //import org.apache.servicemix.common.wsdl1.AbstractWsdl1Deployer;
33: //import org.apache.servicemix.common.wsdl1.JbiEndpoint;
34:
35: import com.bostechcorp.cbesb.runtime.ccsl.jbi.messaging.*;
36:
37: import com.bostechcorp.cbesb.runtime.component.sequencing.wsdl.*;
38:
39: public class SequencingWsdl1Deployer extends Wsdl1Deployer {
40:
41: /**
42: * @param arg0
43: */
44: public SequencingWsdl1Deployer(CbComponent component) {
45: super (component);
46:
47: }
48:
49: /* (non-Javadoc)
50: * @see org.apache.servicemix.common.wsdl1.AbstractWsdl1Deployer#createEndpoint(javax.wsdl.extensions.ExtensibilityElement, javax.wsdl.extensions.ExtensibilityElement, org.apache.servicemix.common.wsdl1.JbiEndpoint)
51: */
52: @Override
53: protected CbEndpoint createEndpoint(
54: ExtensibilityElement[] portElement,
55: ExtensibilityElement[] bindingElement) {
56: logger.debug("createEndpoint portElement=" + portElement[0]);
57:
58: SequencingEndpoint endpoint = new SequencingEndpoint();
59:
60: if (portElement[0] instanceof SequencingConfig) {
61: SequencingConfig config = (SequencingConfig) portElement[0];
62: endpoint.setRole(config.getRole());
63: endpoint.setDefaultMep(config.getDefaultMep());
64: endpoint.setDefaultOperation(config.getDefaultOperation());
65: endpoint.setServiceList(config.getServiceList());
66: }
67: return endpoint;
68: }
69:
70: /* (non-Javadoc)
71: * @see org.apache.servicemix.common.wsdl1.AbstractWsdl1Deployer#filterBindingElement(javax.wsdl.extensions.ExtensibilityElement)
72: */
73: @Override
74: protected boolean filterBindingElement(ExtensibilityElement element) {
75: return (element instanceof SequencingBinding);
76: }
77:
78: /* (non-Javadoc)
79: * @see org.apache.servicemix.common.wsdl1.AbstractWsdl1Deployer#filterPortElement(javax.wsdl.extensions.ExtensibilityElement)
80: */
81: @Override
82: protected boolean filterPortElement(ExtensibilityElement element) {
83: return (element instanceof SequencingConfig);
84: }
85:
86: protected void registerExtensions(ExtensionRegistry registry) {
87: super.registerExtensions(registry);
88: SequencingExtension.register(registry);
89: }
90: }
|