1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wsdl.panels.teststeps;
14
15 import com.eviware.soapui.impl.EmptyPanelBuilder;
16 import com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest;
17 import com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep;
18 import com.eviware.soapui.support.components.JPropertiesTable;
19
20 import javax.swing.*;
21
22 /***
23 * PanelBuilder for RestTestRequest
24 *
25 * @author Ole.Matzura
26 */
27
28 public class RestTestRequestPanelBuilder extends EmptyPanelBuilder<RestTestRequestStep>
29 {
30 public RestTestRequestPanelBuilder()
31 {
32 }
33
34 public RestTestRequestDesktopPanel buildDesktopPanel(RestTestRequestStep testStep)
35 {
36 return new RestTestRequestDesktopPanel(testStep);
37 }
38
39 public boolean hasDesktopPanel()
40 {
41 return true;
42 }
43
44 public JPanel buildOverviewPanel(RestTestRequestStep testStep)
45 {
46 RestTestRequest request = testStep.getTestRequest();
47 JPropertiesTable<RestTestRequest> table = new JPropertiesTable<RestTestRequest>( "REST TestRequest Properties" );
48
49
50 table.addProperty( "Name", "name", true );
51 table.addProperty( "Description", "description", true );
52
53 table.addProperty( "Encoding", "encoding", new String[] {null, "UTF-8", "iso-8859-1" } );
54
55 if( request.getOperation() == null )
56 table.addProperty( "Path", "path", true );
57 else
58 table.addProperty( "Endpoint", "endpoint", request.getInterface().getEndpoints() );
59
60 table.addProperty( "Bind Address", "bindAddress", true );
61
62
63
64
65
66 table.addProperty( "Username", "username", true );
67 table.addProperty( "Password", "password", true );
68 table.addProperty( "Domain", "domain", true );
69
70
71 table.addProperty( "Pretty Print", "prettyPrint", JPropertiesTable.BOOLEAN_OPTIONS );
72 table.addProperty( "Dump File", "dumpFile", true ).setDescription("Dumps response message to specified file" );
73 table.addProperty( "Max Size", "maxSize", true ).setDescription("The maximum number of bytes to receive" );
74
75
76 table.setPropertyObject( request );
77
78 return table;
79 }
80
81 public boolean hasOverviewPanel()
82 {
83 return true;
84 }
85 }