View Javadoc

1   /*
2    *  soapUI, copyright (C) 2006 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of the GNU Lesser General Public License as published by the Free Software Foundation; 
6    *  either version 2.1 of the License, or (at your option) any later version.
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;
14  
15  import com.eviware.soapui.model.testsuite.TestStepProperty;
16  
17  class PropertyTransferException extends Exception
18  {
19  	private String message;
20  	private final String sourceStepName;
21  	private final String targetStepName;
22  	private String sourcePropertyName;
23  	private String sourcePropertyValue;
24  	private String targetPropertyName;
25  	private String targetPropertyValue;
26  
27  	public PropertyTransferException( String message, String sourceStepName, TestStepProperty source, 
28  			String targetStepName, TestStepProperty target )
29  	{
30  		this.message = message;
31  		this.sourceStepName = sourceStepName;
32  		this.targetStepName = targetStepName;
33  		
34  		if( source != null )
35  		{
36  			sourcePropertyName = source.getName();
37  			sourcePropertyValue = source.getValue();
38  		}
39  		if( target != null )
40  		{
41  			targetPropertyName = target.getName();
42  			targetPropertyValue = target.getValue();
43  		}
44  	}
45  
46  	public String getMessage()
47  	{
48  		return message;
49  	}
50  
51  	public String getSourcePropertyName()
52  	{
53  		return sourcePropertyName;
54  	}
55  
56  	public String getSourcePropertyValue()
57  	{
58  		return sourcePropertyValue;
59  	}
60  
61  	public String getSourceStepName()
62  	{
63  		return sourceStepName;
64  	}
65  
66  	public String getTargetPropertyName()
67  	{
68  		return targetPropertyName;
69  	}
70  
71  	public String getTargetPropertyValue()
72  	{
73  		return targetPropertyValue;
74  	}
75  
76  	public String getTargetStepName()
77  	{
78  		return targetStepName;
79  	}
80  }