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.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
29: DefaultSoapUIActionGroup<WsdlInterface> {
30: public WsdlInterfaceSoapUIActionGroup(String id, String name) {
31: super (id, name);
32: }
33:
34: @Override
35: public List<SoapUIActionMapping<WsdlInterface>> getActionMappings(
36: WsdlInterface modelItem) {
37: List<SoapUIActionMapping<WsdlInterface>> actionMappings = super
38: .getActionMappings(modelItem);
39:
40: for (SoapUIActionMapping<WsdlInterface> mapping : actionMappings) {
41: if (mapping.getActionId().equals(
42: WSToolsRegenerateJava2WsdlAction.SOAPUI_ACTION_ID)) {
43: WSToolsRegenerateJava2WsdlAction action = (WSToolsRegenerateJava2WsdlAction) mapping
44: .getAction();
45: mapping.setEnabled(modelItem.getSettings().isSet(
46: action.getValuesSettingID()));
47: }
48: }
49:
50: return actionMappings;
51: }
52: }
|