1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wsdl;
14
15 import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase;
16 import com.eviware.soapui.model.ModelItem;
17 import com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils;
18 import com.eviware.soapui.model.settings.Settings;
19 import com.eviware.soapui.model.support.AbstractSubmitContext;
20 import com.eviware.soapui.model.testsuite.TestStep;
21
22 /***
23 * Default implementation
24 */
25
26 public class WsdlSubmitContext extends AbstractSubmitContext
27 {
28 private final TestStep step;
29
30 public WsdlSubmitContext( ModelItem context )
31 {
32 super( context );
33 step = context instanceof TestStep ? ( TestStep ) context : null;
34 }
35
36 public Object getProperty(String name)
37 {
38 return getProperty( name, step, (WsdlTestCase) (step == null ? null : step.getTestCase()) );
39 }
40
41 @Override
42 public Object get( Object key )
43 {
44 return getProperty( key.toString() );
45 }
46
47 @Override
48 public Object put( String key, Object value )
49 {
50 Object oldValue = get( key );
51 setProperty( key, value );
52 return oldValue;
53 }
54
55 public Settings getSettings()
56 {
57 return step == null ? step.getSettings() : null;
58 }
59
60 public String expand( String content )
61 {
62 return PropertyExpansionUtils.expandProperties( this, content );
63 }
64 }