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.actions.iface;
    14
    15  import java.util.List;
    16
    17  import com.eviware.soapui.impl.wsdl.WsdlInterface;
    18  import com.eviware.soapui.impl.wsdl.actions.iface.tools.jbossws.WSToolsRegenerateJava2WsdlAction;
    19  import com.eviware.soapui.support.action.SoapUIActionMapping;
    20  import com.eviware.soapui.support.action.support.DefaultSoapUIActionGroup;
    21
    22  /***
    23   * ActionGroup handler for WsdlInterface
    24   *
    25   * @author ole.matzura
    26   */
    27
    28  public class WsdlInterfaceSoapUIActionGroup extends DefaultSoapUIActionGroup<WsdlInterface>
    29  {
    30  	public WsdlInterfaceSoapUIActionGroup( String id, String name )
    31  	{
    32  		super( id, name );
    33  	}
    34
    35  	@Override
    36  	public List<SoapUIActionMapping<WsdlInterface>> getActionMappings( WsdlInterface modelItem )
    37  	{
    38  		List<SoapUIActionMapping<WsdlInterface>> actionMappings = super.getActionMappings( modelItem );
    39
    40  		for( SoapUIActionMapping<WsdlInterface> mapping : actionMappings )
    41  		{
    42  			if( mapping.getActionId().equals( WSToolsRegenerateJava2WsdlAction.SOAPUI_ACTION_ID ))
    43  			{
    44  				WSToolsRegenerateJava2WsdlAction action = ( WSToolsRegenerateJava2WsdlAction ) mapping.getAction();
    45  				mapping.setEnabled( modelItem.getSettings().isSet( action.getValuesSettingID() ) );
    46  			}
    47  		}
    48
    49  		return actionMappings;
    50  	}
    51  }