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.request;
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.support.components.JPropertiesTable;
20:
21: /**
22: * PanelBuilder for WsdlRequest
23: *
24: * @author Ole.Matzura
25: */
26:
27: public class WsdlRequestPanelBuilder extends
28: EmptyPanelBuilder<WsdlRequest> {
29: public WsdlRequestPanelBuilder() {
30: }
31:
32: public WsdlRequestDesktopPanel buildDesktopPanel(WsdlRequest request) {
33: return new WsdlRequestDesktopPanel(request);
34: }
35:
36: public boolean hasDesktopPanel() {
37: return true;
38: }
39:
40: public JPanel buildOverviewPanel(WsdlRequest request) {
41: JPropertiesTable<WsdlRequest> table = new JPropertiesTable<WsdlRequest>(
42: "Request Properties", request);
43:
44: // basic properties
45: table.addProperty("Name", "name", true);
46: table.addProperty("Description", "description", true);
47: table.addProperty("Message Size", "contentLength", false);
48: table.addProperty("Encoding", "encoding", new String[] { null,
49: "UTF-8", "iso-8859-1" });
50: table.addProperty("Endpoint", "endpoint", request
51: .getOperation().getInterface().getEndpoints());
52: table.addProperty("Bind Address", "bindAddress", true);
53:
54: // security / authentication
55: table.addProperty("Username", "username", true);
56: table.addProperty("Password", "password", true);
57: table.addProperty("Domain", "domain", true);
58: table.addProperty("WSS-Password Type", "wssPasswordType",
59: new String[] { WsdlRequest.PW_TYPE_NONE,
60: WsdlRequest.PW_TYPE_TEXT,
61: WsdlRequest.PW_TYPE_DIGEST });
62: table.addProperty("WSS TimeToLive", "wssTimeToLive", true);
63:
64: // mtom / attachments
65: table.addProperty("Enable MTOM/Inline", "mtomEnabled",
66: JPropertiesTable.BOOLEAN_OPTIONS);
67: table.addProperty("Inline Response Attachments",
68: "inlineResponseAttachments",
69: JPropertiesTable.BOOLEAN_OPTIONS);
70: table.addProperty("Expand MTOM Attachments",
71: "expandMtomResponseAttachments",
72: JPropertiesTable.BOOLEAN_OPTIONS);
73: table.addProperty("Disable multiparts", "multipartEnabled",
74: JPropertiesTable.BOOLEAN_OPTIONS);
75: table.addProperty("Encode Attachments", "encodeAttachments",
76: JPropertiesTable.BOOLEAN_OPTIONS);
77:
78: // preprocessing
79: table.addProperty("Strip whitespaces", "stripWhitespaces",
80: JPropertiesTable.BOOLEAN_OPTIONS);
81: table.addProperty("Remove Empty Content", "removeEmptyContent",
82: JPropertiesTable.BOOLEAN_OPTIONS);
83:
84: table.setPropertyObject(request);
85:
86: return table;
87: }
88:
89: public boolean hasOverviewPanel() {
90: return true;
91: }
92: }
|