View Javadoc

1   /*
2    *  soapUI, copyright (C) 2006 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of the GNU Lesser General Public License as published by the Free Software Foundation; 
6    *  either version 2.1 of the License, or (at your option) any later version.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.impl.wsdl.panels.teststeps;
14  
15  import javax.swing.JPanel;
16  
17  import com.eviware.soapui.impl.EmptyPanelBuilder;
18  import com.eviware.soapui.impl.wsdl.WsdlRequest;
19  import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequest;
20  import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep;
21  import com.eviware.soapui.support.components.JPropertiesTable;
22  import com.eviware.soapui.ui.desktop.DesktopPanel;
23  
24  /***
25   * PanelBuilder for WsdlTestRequest
26   * 
27   * @author Ole.Matzura
28   */
29  
30  public class WsdlTestRequestPanelBuilder extends EmptyPanelBuilder<WsdlTestRequestStep>
31  {
32     public WsdlTestRequestPanelBuilder()
33     {
34     }
35  
36     public DesktopPanel buildDesktopPanel(WsdlTestRequestStep testStep)
37     {
38        return new WsdlTestRequestDesktopPanel(testStep);
39     }
40  
41     public boolean hasDesktopPanel()
42     {
43        return true;
44     }
45     
46     public JPanel buildOverviewPanel(WsdlTestRequestStep testStep)
47     {
48     	WsdlTestRequest request = testStep.getTestRequest();
49     	JPropertiesTable<WsdlTestRequest> table = new JPropertiesTable<WsdlTestRequest>( "TestRequest Properties" );
50     	request.addPropertyChangeListener( table.getTableModel() );
51     	
52     	table.addProperty( "Name", "name" );
53     	table.addProperty( "Encoding", "encoding", new String[] {null, "UTF-8", "iso-8859-1" } );
54     	table.addProperty( "Endpoint", "endpoint" );
55     	table.addProperty( "Enable MTOM/Inline", "mtomEnabled", JPropertiesTable.BOOLEAN_OPTIONS );
56     	table.addProperty( "Username", "username", true );
57     	table.addProperty( "Password", "password", true );
58     	table.addProperty( "Domain", "domain", true );
59     	table.addProperty( "WSS-Password Type", "wssPasswordType", 
60     			new String[] {WsdlRequest.PW_TYPE_NONE, WsdlRequest.PW_TYPE_TEXT, WsdlRequest.PW_TYPE_DIGEST});
61     	table.addProperty( "Inline Response Attachments", "inlineResponseAttachments", 
62     			JPropertiesTable.BOOLEAN_OPTIONS );
63     	table.addProperty( "Expand MTOM Attachments", "expandMtomResponseAttachments", 
64  	   			JPropertiesTable.BOOLEAN_OPTIONS );
65     	table.addProperty( "Strip whitspaces", "stripWhitespaces", JPropertiesTable.BOOLEAN_OPTIONS );
66     	table.addProperty( "Disable multiparts", "multipartEnabled", JPropertiesTable.BOOLEAN_OPTIONS );
67     	
68     	table.setPropertyObject( request );
69     	
70     	return table;
71     }
72  
73     public boolean hasOverviewPanel()
74     {
75        return true;
76     }
77  }