01: /*
02: * soapUI, copyright (C) 2004-2007 eviware.com
03: *
04: * soapUI is free software; you can redistribute it and/or modify it under the
05: * terms of version 2.1 of the GNU Lesser General Public License as published by
06: * the Free Software Foundation.
07: *
08: * soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
09: * 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
31: EmptyPanelBuilder<WsdlTestRequestStep> {
32: public WsdlTestRequestPanelBuilder() {
33: }
34:
35: public DesktopPanel buildDesktopPanel(WsdlTestRequestStep testStep) {
36: return new WsdlTestRequestDesktopPanel(testStep);
37: }
38:
39: public boolean hasDesktopPanel() {
40: return true;
41: }
42:
43: public JPanel buildOverviewPanel(WsdlTestRequestStep testStep) {
44: WsdlTestRequest request = testStep.getTestRequest();
45: JPropertiesTable<WsdlTestRequest> table = new JPropertiesTable<WsdlTestRequest>(
46: "TestRequest Properties");
47:
48: // basic properties
49: table.addProperty("Name", "name", true);
50: table.addProperty("Description", "description", true);
51: table.addProperty("Message Size", "contentLength", false);
52: table.addProperty("Encoding", "encoding", new String[] { null,
53: "UTF-8", "iso-8859-1" });
54: table.addProperty("Endpoint", "endpoint", request
55: .getInterface().getEndpoints());
56: table.addProperty("Bind Address", "bindAddress", true);
57:
58: table.addProperty("Interface", "interfaceName");
59: table.addProperty("Operation", "operationName");
60:
61: // security / authentication
62: table.addProperty("Username", "username", true);
63: table.addProperty("Password", "password", true);
64: table.addProperty("Domain", "domain", true);
65: table.addProperty("WSS-Password Type", "wssPasswordType",
66: new String[] { WsdlRequest.PW_TYPE_NONE,
67: WsdlRequest.PW_TYPE_TEXT,
68: WsdlRequest.PW_TYPE_DIGEST });
69: table.addProperty("WSS TimeToLive", "wssTimeToLive", true);
70:
71: // mtom / attachments
72: table.addProperty("Enable MTOM/Inline", "mtomEnabled",
73: JPropertiesTable.BOOLEAN_OPTIONS);
74: table.addProperty("Inline Response Attachments",
75: "inlineResponseAttachments",
76: JPropertiesTable.BOOLEAN_OPTIONS);
77: table.addProperty("Expand MTOM Attachments",
78: "expandMtomResponseAttachments",
79: JPropertiesTable.BOOLEAN_OPTIONS);
80: table.addProperty("Disable multiparts", "multipartEnabled",
81: JPropertiesTable.BOOLEAN_OPTIONS);
82: table.addProperty("Encode Attachments", "encodeAttachments",
83: JPropertiesTable.BOOLEAN_OPTIONS);
84:
85: // preprocessing
86: table.addProperty("Strip whitespaces", "stripWhitespaces",
87: JPropertiesTable.BOOLEAN_OPTIONS);
88: table.addProperty("Remove Empty Content", "removeEmptyContent",
89: JPropertiesTable.BOOLEAN_OPTIONS);
90:
91: table.setPropertyObject(request);
92:
93: return table;
94: }
95:
96: public boolean hasOverviewPanel() {
97: return true;
98: }
99: }
|