View Javadoc

1   package com.eviware.soapui.impl.wsdl.panels.teststeps;
2   
3   import java.awt.Component;
4   
5   import com.eviware.soapui.impl.EmptyPanelBuilder;
6   import com.eviware.soapui.impl.wsdl.teststeps.WsdlAsyncResponseTestStep;
7   import com.eviware.soapui.support.components.JPropertiesTable;
8   import com.eviware.soapui.support.types.StringList;
9   import com.eviware.soapui.ui.desktop.DesktopPanel;
10  
11  /***
12   * PanelBuilder for AsyncResponseStep
13   */
14  public class AsyncResponseStepPanelBuilder 
15  	extends EmptyPanelBuilder<WsdlAsyncResponseTestStep>
16  {
17  	public boolean hasDesktopPanel()
18  	{
19  		return true;
20  	}
21  
22  	public boolean hasOverviewPanel()
23  	{
24  		return true;
25  	}
26  
27  	@Override
28  	public Component buildOverviewPanel(WsdlAsyncResponseTestStep modelItem)
29  	{
30  		JPropertiesTable<WsdlAsyncResponseTestStep> table = 
31  			new JPropertiesTable<WsdlAsyncResponseTestStep>("AsyncResponse Properties");
32  		
33          StringList stringlist = new StringList(modelItem.getTestCase().getTestSuite().getProject().getWssContainer().getOutgoingWssNames());
34          stringlist.add("");
35  
36          table.addProperty("Name", "name", true);
37          table.addProperty("Description", "description", true);
38          table.addProperty("Message Size", "contentLength", false);
39          table.addProperty("Encoding", "encoding", new String[] {null, "UTF-8", "iso-8859-1"});
40          table.addProperty("Outgoing WSS", "outgoingWss", stringlist.toStringArray());
41          table.addProperty("Enable MTOM", "mtomEnabled", JPropertiesTable.BOOLEAN_OPTIONS);
42          table.addProperty("Force MTOM", "forceMtom", JPropertiesTable.BOOLEAN_OPTIONS);
43          table.addProperty("Enable multiparts", "multipartEnabled", JPropertiesTable.BOOLEAN_OPTIONS);
44          table.addProperty("Encode Attachments", "encodeAttachments", JPropertiesTable.BOOLEAN_OPTIONS);
45          table.addProperty("Strip whitespaces", "stripWhitespaces", JPropertiesTable.BOOLEAN_OPTIONS);
46          table.addProperty("Remove Empty Content", "removeEmptyContent", JPropertiesTable.BOOLEAN_OPTIONS);
47          table.addProperty("Enable Inline Files", "inlineFilesEnabled", JPropertiesTable.BOOLEAN_OPTIONS).setDescription("Enables inline file references [file:<path>] in elements with binary content");
48          table.addProperty("Response HTTP-Status", "responseHttpStatus", true);
49          table.addProperty("Response Delay", "responseDelay", true);
50          table.addProperty("Timeout", "timeout", true);
51          table.addProperty("Port", "port", true);
52          table.addProperty("Path", "path", true);
53          table.addProperty("Request Query", "requestQuery", true);
54          table.addProperty("Matching Value", "matchingValue", true);
55          
56          table.setPropertyObject(modelItem);
57          
58          return table;
59  	}
60  
61  	@Override
62  	public DesktopPanel buildDesktopPanel(WsdlAsyncResponseTestStep modelitem)
63  	{
64  		return new AsyncResponseStepDesktopPanel(modelitem);
65  	}
66  }