1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wsdl.panels.mock;
14
15 import java.awt.Component;
16
17 import com.eviware.soapui.impl.EmptyPanelBuilder;
18 import com.eviware.soapui.impl.wsdl.mock.WsdlMockService;
19 import com.eviware.soapui.support.components.JPropertiesTable;
20 import com.eviware.soapui.support.types.StringList;
21 import com.eviware.soapui.ui.desktop.DesktopPanel;
22
23 /***
24 * PanelBuilder for WsdlMockServices
25 *
26 * @author ole.matzura
27 */
28
29 public class WsdlMockServicePanelBuilder extends EmptyPanelBuilder<WsdlMockService>
30 {
31 public WsdlMockServicePanelBuilder()
32 {
33 }
34
35 public DesktopPanel buildDesktopPanel( WsdlMockService mockService )
36 {
37 return new WsdlMockServiceDesktopPanel( mockService );
38 }
39
40 @Override
41 public boolean hasDesktopPanel()
42 {
43 return true;
44 }
45
46 public Component buildOverviewPanel( WsdlMockService mockService )
47 {
48 JPropertiesTable<WsdlMockService> table = new JPropertiesTable<WsdlMockService>( "MockService Properties" );
49 table.addProperty( "Name", "name", true );
50 table.addProperty( "Description", "description", true );
51 table.addProperty( "Path", "path" );
52 table.addProperty( "Port", "port" );
53 table.addProperty( "Require SOAP Version", "requireSoapVersion", JPropertiesTable.BOOLEAN_OPTIONS );
54 table.addProperty( "Require SOAP Action", "requireSoapAction", JPropertiesTable.BOOLEAN_OPTIONS );
55 StringList incomingNames = new StringList( mockService.getProject().getWssContainer().getIncomingWssNames() );
56 incomingNames.add( "" );
57 table.addProperty( "Incoming WSS", "incomingWss", incomingNames.toStringArray() );
58 StringList outgoingNames = new StringList( mockService.getProject().getWssContainer().getOutgoingWssNames() );
59 outgoingNames.add( "" );
60 table.addProperty( "Default Outgoing WSS", "outgoingWss", outgoingNames.toStringArray() );
61 table.setPropertyObject( mockService );
62
63 return table;
64 }
65
66 public boolean hasOverviewPanel()
67 {
68 return true;
69 }
70 }