View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2008 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;
14  
15  import com.eviware.soapui.model.testsuite.TestProperty;
16  
17  /***
18   * Exception than can occur during property-transfers
19   * 
20   * @author ole.matzura
21   */
22  
23  public class PropertyTransferException extends Exception
24  {
25  	private String message;
26  	private final String sourceStepName;
27  	private final String targetStepName;
28  	private String sourcePropertyName;
29  	private String sourcePropertyValue;
30  	private String targetPropertyName;
31  	private String targetPropertyValue;
32  
33  	public PropertyTransferException( String message, String sourceStepName, TestProperty source, 
34  			String targetStepName, TestProperty target )
35  	{
36  		this.message = message;
37  		this.sourceStepName = sourceStepName;
38  		this.targetStepName = targetStepName;
39  		
40  		if( source != null )
41  		{
42  			sourcePropertyName = source.getName();
43  			sourcePropertyValue = source.getValue();
44  		}
45  		if( target != null )
46  		{
47  			targetPropertyName = target.getName();
48  			targetPropertyValue = target.getValue();
49  		}
50  	}
51  
52  	public String getMessage()
53  	{
54  		return message;
55  	}
56  
57  	public String getSourcePropertyName()
58  	{
59  		return sourcePropertyName;
60  	}
61  
62  	public String getSourcePropertyValue()
63  	{
64  		return sourcePropertyValue;
65  	}
66  
67  	public String getSourceStepName()
68  	{
69  		return sourceStepName;
70  	}
71  
72  	public String getTargetPropertyName()
73  	{
74  		return targetPropertyName;
75  	}
76  
77  	public String getTargetPropertyValue()
78  	{
79  		return targetPropertyValue;
80  	}
81  
82  	public String getTargetStepName()
83  	{
84  		return targetStepName;
85  	}
86  }