View Javadoc

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