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.TestStepConfig;
16: import com.eviware.soapui.config.TransferValuesStepConfig;
17: import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase;
18: import com.eviware.soapui.impl.wsdl.teststeps.TransferResponseValuesTestStep;
19: import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep;
20:
21: /**
22: * Factory for creation TransferValue steps
23: *
24: * @author Ole.Matzura
25: */
26:
27: public class TransferValuesStepFactory extends WsdlTestStepFactory {
28: public static final String TRANSFER_TYPE = "transfer";
29:
30: public TransferValuesStepFactory() {
31: super (
32: TRANSFER_TYPE,
33: "Property Transfer",
34: "Transfers values from the previous response to the next request",
35: "/value_transfer.gif");
36: }
37:
38: public WsdlTestStep buildTestStep(WsdlTestCase testCase,
39: TestStepConfig config, boolean forLoadTest) {
40: return new TransferResponseValuesTestStep(testCase, config,
41: forLoadTest);
42: }
43:
44: public TestStepConfig createNewTestStep(WsdlTestCase testCase,
45: String name) {
46: TestStepConfig testStepConfig = TestStepConfig.Factory
47: .newInstance();
48: testStepConfig.setType(TRANSFER_TYPE);
49: testStepConfig.setName(name);
50: testStepConfig.setConfig(TransferValuesStepConfig.Factory
51: .newInstance());
52: return testStepConfig;
53: }
54:
55: public boolean canCreate() {
56: return true;
57: }
58:
59: }
|