View Javadoc

    1   /*
    2    *  soapUI, copyright (C) 2004-2007 eviware.com
    3    *
    4    *  soapUI is free software; you can redistribute it and/or modify it under the
    5    *  terms of version 2.1 of the GNU Lesser General Public License as published by
    6    *  the Free Software Foundation.
    7    *
    8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
    9    *  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.impl.wsdl.testcase.WsdlTestCase;
    17  import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep;
    18
    19  /***
    20   * Abstract factory behaviour for WsdlTestStep factories
    21   *
    22   * @author Ole.Matzura
    23   */
    24
    25  public abstract class WsdlTestStepFactory
    26  {
    27  	private final String typeName;
    28  	private final String name;
    29  	private final String description;
    30  	private final String pathToIcon;
    31
    32  	public WsdlTestStepFactory( String typeName, String name, String description, String pathToIcon )
    33  	{
    34  		this.typeName = typeName;
    35  		this.name = name;
    36  		this.description = description;
    37  		this.pathToIcon = pathToIcon;
    38  	}
    39
    40  	public abstract WsdlTestStep buildTestStep( WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest );
    41
    42  	public String getType()
    43  	{
    44  		return typeName;
    45  	}
    46
    47  	public abstract TestStepConfig createNewTestStep(WsdlTestCase testCase, String name);
    48
    49  	public abstract boolean canCreate();
    50
    51  	public String getTestStepName()
    52  	{
    53  		return name;
    54  	}
    55
    56  	public String getTestStepDescription()
    57  	{
    58  		return description;
    59  	}
    60
    61  	public String getTestStepIconPath()
    62  	{
    63  		return pathToIcon;
    64  	}
    65  }