01: /*
02: * Created on Jan 31, 2005
03: *
04: */
05: package net.sf.thingamablog.generator;
06:
07: import java.util.Hashtable;
08:
09: /**
10: * @author Bob Tantlinger
11: */
12: public class CustomTag extends TextTag {
13: private String value;
14:
15: /**
16: * @param name
17: */
18: public CustomTag(String name, String value) {
19: super (name);
20: this .value = value;
21: }
22:
23: /**
24: * overridden from super class to just return the value
25: */
26: public String process(Object obj, Hashtable attribs) {
27: return super .process(obj, attribs);
28: }
29:
30: /**
31: * Gets the value
32: *
33: * @return The value
34: */
35: public String getValue() {
36: return value;
37: }
38:
39: /**
40: * Sets the value
41: *
42: * @param val The value
43: */
44: public void setValue(String val) {
45: value = val;
46: }
47:
48: /**
49: * Gets the string representation of the tag.
50: *
51: * @return The name of the Tag inclosed in template brackets eg <$TagName$>
52: */
53: public String toString() {
54: return "<$" + getName() + "$>";
55: }
56:
57: }
|