1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wsdl.teststeps.registry;
14
15 import javax.swing.ImageIcon;
16
17 import com.eviware.soapui.config.TestStepConfig;
18 import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase;
19 import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep;
20 import com.eviware.soapui.support.UISupport;
21
22 /***
23 * Abstract factory behaviour for WsdlTestStep factories
24 *
25 * @author Ole.Matzura
26 */
27
28 public abstract class WsdlTestStepFactory
29 {
30 private final String typeName;
31 private final String name;
32 private final String description;
33 private ImageIcon icon;
34
35 public WsdlTestStepFactory( String typeName, String name, String description, String pathToIcon )
36 {
37 this.typeName = typeName;
38 this.name = name;
39 this.description = description;
40
41 if( pathToIcon != null )
42 icon = UISupport.createImageIcon( pathToIcon );
43 }
44
45 public abstract WsdlTestStep buildTestStep( WsdlTestCase testCase, TestStepConfig config );
46
47 public String getType()
48 {
49 return typeName;
50 }
51
52 public abstract TestStepConfig createNewTestStep(WsdlTestCase testCase, String name);
53
54 public abstract boolean canCreate();
55
56 public String getTestStepName()
57 {
58 return name;
59 }
60
61 public String getTestStepDescription()
62 {
63 return description;
64 }
65
66 public ImageIcon getTestStepIcon()
67 {
68 return icon;
69 }
70 }