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.project;
14:
15: import java.util.List;
16:
17: import com.eviware.soapui.SoapUI;
18: import com.eviware.soapui.impl.wsdl.WsdlProject;
19: import com.eviware.soapui.support.action.SoapUIActionGroup;
20: import com.eviware.soapui.support.action.SoapUIActionMapping;
21: import com.eviware.soapui.support.action.support.AbstractSoapUIActionGroup;
22:
23: /**
24: * SoapUIActionGroup for WsdlProjects, returns different actions depending on if the project is
25: * disabled or not.
26: *
27: * @author ole.matzura
28: */
29:
30: public class WsdlProjectSoapUIActionGroup extends
31: AbstractSoapUIActionGroup<WsdlProject> {
32: public WsdlProjectSoapUIActionGroup(String id, String name) {
33: super (id, name);
34: }
35:
36: public List<SoapUIActionMapping<WsdlProject>> getActionMappings(
37: WsdlProject modelItem) {
38: if (modelItem.isDisabled()) {
39: SoapUIActionGroup<WsdlProject> actionGroup = SoapUI
40: .getActionRegistry().getActionGroup(
41: "DisabledWsdlProjectActions");
42: return actionGroup.getActionMappings(modelItem);
43: } else {
44: SoapUIActionGroup<WsdlProject> actionGroup = SoapUI
45: .getActionRegistry().getActionGroup(
46: "EnabledWsdlProjectActions");
47: return actionGroup.getActionMappings(modelItem);
48: }
49: }
50: }
|