1 19 20 package org.netbeans.modules.websvc.wsitconf.ui.client; 21 22 import org.netbeans.modules.websvc.api.jaxws.project.config.JaxWsModel; 23 import org.netbeans.modules.websvc.wsitconf.wsdlmodelext.PolicyModelHelper; 24 import org.netbeans.modules.xml.multiview.ui.SectionInnerPanel; 25 import org.netbeans.modules.xml.multiview.ui.SectionView; 26 import org.netbeans.modules.xml.multiview.ui.ToolBarDesignEditor; 27 import org.netbeans.modules.xml.wsdl.model.Binding; 28 import org.netbeans.modules.xml.wsdl.model.WSDLModel; 29 import org.openide.nodes.Node; 30 31 35 public class ClientPanelFactory implements org.netbeans.modules.xml.multiview.ui.InnerPanelFactory { 36 37 private ToolBarDesignEditor editor; 38 private WSDLModel clientModel; 39 private WSDLModel serviceModel; 40 private Node node; 41 private JaxWsModel jaxwsmodel; 42 43 46 ClientPanelFactory(ToolBarDesignEditor editor, WSDLModel model, Node node, WSDLModel serviceModel, JaxWsModel jxwsmodel) { 47 this.editor=editor; 48 this.clientModel = model; 49 this.serviceModel = serviceModel; 50 this.jaxwsmodel = jxwsmodel; 51 this.node = node; 52 } 53 54 public SectionInnerPanel createInnerPanel(Object key) { 55 if (key instanceof String ) { 56 String id = (String )key; 57 if (id.startsWith(ClientView.KEYSTORE_NODE_ID)) { 58 Binding b = PolicyModelHelper.getBinding(clientModel, id.substring(ClientView.KEYSTORE_NODE_ID.length())); 59 return new KeystorePanel((SectionView) editor.getContentView(), clientModel, node, b, jaxwsmodel); 60 } 61 if (id.startsWith(ClientView.CALLBACK_NODE_ID)) { 62 Binding b = PolicyModelHelper.getBinding(clientModel, id.substring(ClientView.CALLBACK_NODE_ID.length())); 63 return new CallbackPanel((SectionView) editor.getContentView(), clientModel, node, b, jaxwsmodel); 64 } 65 if (id.startsWith(ClientView.STS_NODE_ID)) { 66 Binding b = PolicyModelHelper.getBinding(clientModel, id.substring(ClientView.STS_NODE_ID.length())); 67 return new STSClientPanel((SectionView) editor.getContentView(), node, b, jaxwsmodel); 68 } 69 if (id.startsWith(ClientView.TRANSPORT_NODE_ID)) { 70 Binding b = PolicyModelHelper.getBinding(clientModel, id.substring(ClientView.TRANSPORT_NODE_ID.length())); 71 return new TransportPanelClient((SectionView) editor.getContentView(), node, b, serviceModel, jaxwsmodel); 72 } 73 if (id.startsWith(ClientView.ADVANCEDCONFIG_NODE_ID)) { 74 Binding b = PolicyModelHelper.getBinding(clientModel, id.substring(ClientView.ADVANCEDCONFIG_NODE_ID.length())); 75 return new AdvancedConfigPanelClient((SectionView) editor.getContentView(), node, b, serviceModel); 76 } 77 } 78 return null; 79 } 80 } 81 | Popular Tags |