01: package com.mockrunner.tag;
02:
03: /**
04: * This class encapsulates the data for a dynamic tag attribute.
05: * You can add it to the paramater map of any
06: * {@link com.mockrunner.tag.NestedTag} instance.
07: * It is not necessary to use an instance of this class to set dynamic
08: * attributes. If the attribute is set directly (like normal attributes),
09: * the URI will be set to <code>null</code>, i.e. the attribute has
10: * the default namespace.
11: */
12: public class DynamicAttribute {
13: private String uri;
14: private Object value;
15:
16: public DynamicAttribute() {
17:
18: }
19:
20: public DynamicAttribute(String uri, Object value) {
21: this .uri = uri;
22: this .value = value;
23: }
24:
25: /**
26: * Returns the namespace of the attribute.
27: * @return the namespace of the attribute
28: */
29: public String getUri() {
30: return uri;
31: }
32:
33: /**
34: * Sets the namespace of the attribute.
35: * @param uri the namespace of the attribute
36: */
37: public void setUri(String uri) {
38: this .uri = uri;
39: }
40:
41: /**
42: * Returns the value of the attribute.
43: * @return the value of the attribute
44: */
45: public Object getValue() {
46: return value;
47: }
48:
49: /**
50: * Sets the value of the attribute.
51: * @param value the value of the attribute
52: */
53: public void setValue(Object value) {
54: this.value = value;
55: }
56: }
|