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.teststeps.registry;
14:
15: import com.eviware.soapui.config.PropertiesStepConfig;
16: import com.eviware.soapui.config.TestStepConfig;
17: import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase;
18: import com.eviware.soapui.impl.wsdl.teststeps.WsdlPropertiesTestStep;
19: import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep;
20:
21: /**
22: * Factory for creation Properties steps
23: *
24: * @author Ole.Matzura
25: */
26:
27: public class PropertiesStepFactory extends WsdlTestStepFactory {
28: public static final String PROPERTIES_TYPE = "properties";
29:
30: public PropertiesStepFactory() {
31: super (PROPERTIES_TYPE, "Properties",
32: "Defines / Loads global TestCase properties",
33: "/properties_step.gif");
34: }
35:
36: public WsdlTestStep buildTestStep(WsdlTestCase testCase,
37: TestStepConfig config, boolean forLoadTest) {
38: return new WsdlPropertiesTestStep(testCase, config, forLoadTest);
39: }
40:
41: public TestStepConfig createNewTestStep(WsdlTestCase testCase,
42: String name) {
43: TestStepConfig testStepConfig = TestStepConfig.Factory
44: .newInstance();
45: testStepConfig.setType(PROPERTIES_TYPE);
46: testStepConfig.setName(name);
47: testStepConfig.setConfig(PropertiesStepConfig.Factory
48: .newInstance());
49: return testStepConfig;
50: }
51:
52: public boolean canCreate() {
53: return true;
54: }
55:
56: }
|