1
2
3
4
5
6
7
8
9
10
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.WsdlProject;
19 import com.eviware.soapui.impl.wsdl.teststeps.HttpTestRequestInterface;
20 import com.eviware.soapui.impl.wsdl.teststeps.HttpTestRequestStep;
21 import com.eviware.soapui.support.components.JPropertiesTable;
22 import com.eviware.soapui.support.types.StringList;
23
24 /***
25 * PanelBuilder for HttpTestRequest
26 *
27 * @author Ole.Matzura
28 */
29
30 public class HttpTestRequestPanelBuilder extends EmptyPanelBuilder<HttpTestRequestStep>
31 {
32 public HttpTestRequestPanelBuilder()
33 {
34 }
35
36
37
38
39
40 public HttpTestRequestDesktopPanel buildDesktopPanel( HttpTestRequestStep testStep )
41 {
42 return new HttpTestRequestDesktopPanel( testStep );
43 }
44
45 public boolean hasDesktopPanel()
46 {
47 return true;
48 }
49
50 public JPanel buildOverviewPanel( HttpTestRequestStep testStep )
51 {
52 HttpTestRequestInterface<?> request = testStep.getTestRequest();
53 JPropertiesTable<HttpTestRequestInterface<?>> table = new JPropertiesTable<HttpTestRequestInterface<?>>(
54 "REST TestRequest Properties" );
55
56
57 table.addProperty( "Name", "name", true );
58 table.addProperty( "Description", "description", true );
59
60 table.addProperty( "Encoding", "encoding", new String[] { null, "UTF-8", "iso-8859-1" } );
61
62
63
64
65
66
67 table.addProperty( "Endpoint", "endpoint", true );
68
69 table.addProperty( "Bind Address", "bindAddress", true );
70 table.addProperty( "Follow Redirects", "followRedirects", JPropertiesTable.BOOLEAN_OPTIONS );
71
72
73
74
75
76
77
78 table.addProperty( "Username", "username", true );
79 table.addProperty( "Password", "password", true );
80 table.addProperty( "Domain", "domain", true );
81
82 StringList keystores = new StringList( ( ( WsdlProject )request.getTestStep().getTestCase().getTestSuite()
83 .getProject() ).getWssContainer().getCryptoNames() );
84 keystores.add( "" );
85 table.addProperty( "SSL Keystore", "sslKeystore", keystores.toStringArray() );
86
87 table.addProperty( "Strip whitespaces", "stripWhitespaces", JPropertiesTable.BOOLEAN_OPTIONS );
88 table.addProperty( "Remove Empty Content", "removeEmptyContent", JPropertiesTable.BOOLEAN_OPTIONS );
89 table.addProperty( "Entitize Properties", "entitizeProperties", JPropertiesTable.BOOLEAN_OPTIONS );
90
91
92 table.addProperty( "Pretty Print", "prettyPrint", JPropertiesTable.BOOLEAN_OPTIONS );
93 table.addProperty( "Dump File", "dumpFile", true ).setDescription( "Dumps response message to specified file" );
94 table.addProperty( "Max Size", "maxSize", true ).setDescription( "The maximum number of bytes to receive" );
95 table.setPropertyObject( request );
96
97 return table;
98 }
99
100 public boolean hasOverviewPanel()
101 {
102 return true;
103 }
104 }