View Javadoc

1   package com.eviware.soapui.model.support;
2   
3   import com.eviware.soapui.model.iface.Attachment;
4   import com.eviware.soapui.model.iface.Request;
5   import com.eviware.soapui.model.iface.Response;
6   import com.eviware.soapui.support.types.StringToStringMap;
7   
8   public abstract class AbstractResponse<T extends Request> implements Response
9   {
10  	private StringToStringMap properties = new StringToStringMap();
11  	private final T request;
12  
13  	public AbstractResponse( T request )
14  	{
15  		this.request = request;
16  	}
17  
18  	public Attachment[] getAttachments()
19  	{
20  		return null;
21  	}
22  
23  	public Attachment[] getAttachmentsForPart( String partName )
24  	{
25  		return null;
26  	}
27  
28  	public long getContentLength()
29  	{
30  		return getContentAsString().length();
31  	}
32  
33  	public String getProperty( String name )
34  	{
35  		return properties.get( name );
36  	}
37  
38  	public String[] getPropertyNames()
39  	{
40  		return properties.getKeys();
41  	}
42  
43  	public byte[] getRawRequestData()
44  	{
45  		return null;
46  	}
47  
48  	public byte[] getRawResponseData()
49  	{
50  		return null;
51  	}
52  
53  	public T getRequest()
54  	{
55  		return request;
56  	}
57  
58  	public StringToStringMap getRequestHeaders()
59  	{
60  		return null;
61  	}
62  
63  	public StringToStringMap getResponseHeaders()
64  	{
65  		return null;
66  	}
67  
68  	public void setProperty( String name, String value )
69  	{
70  		properties.put( name, value );
71  	}
72  }