1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wsdl.teststeps;
14
15 import java.lang.reflect.InvocationTargetException;
16
17 import org.apache.commons.beanutils.BeanUtils;
18
19 import com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem;
20
21 public class BeanPathPropertySupport extends AbstractPathPropertySupport
22 {
23 private Object config;
24
25 public BeanPathPropertySupport(AbstractWsdlModelItem<?> modelItem, String propertyName)
26 {
27 this( modelItem, modelItem.getConfig(), propertyName );
28 }
29
30 public BeanPathPropertySupport(AbstractWsdlModelItem<?> modelItem, Object config, String propertyName)
31 {
32 super( modelItem, propertyName );
33 this.config = config;
34 }
35
36 public void setPropertyValue(String value) throws IllegalAccessException, InvocationTargetException
37 {
38 BeanUtils.setProperty(config, getPropertyName(), value );
39 }
40
41 public String getPropertyValue() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
42 {
43 return BeanUtils.getProperty(config, getPropertyName());
44 }
45
46 public void setConfig(Object config)
47 {
48 this.config = config;
49 }
50 }