1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.jelly;
18
19 /***
20 * <p><code>Tag</code> represents a Jelly custom tag.
21 * A Tag is only ever used by a single thread so that Tag developers do not
22 * need to concern themselves with mutli-threading issues when writing a Tag.
23 * A Tag is created per custom tag in a script, per invocation.
24 * So there is no need to worry about pooling errors like those caused
25 * in JSP 1.x.(</p>
26 *
27 * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
28 * @version $Revision: 155420 $
29 */
30 public interface Tag {
31
32 /***
33 * @return the parent of this tag
34 */
35 public Tag getParent();
36
37 /***
38 * Sets the parent of this tag
39 */
40 public void setParent(Tag parent);
41
42 /***
43 * @return the body of the tag
44 */
45 public Script getBody();
46
47 /***
48 * Sets the body of the tag
49 */
50 public void setBody(Script body);
51
52 /***
53 * Gets the context in which the tag will be run
54 */
55 public JellyContext getContext();
56
57 /***
58 * Sets the context in which the tag will be run
59 */
60 public void setContext(JellyContext context) throws JellyTagException;
61
62 /***
63 * Evaluates this tag after all the tags properties have been initialized.
64 */
65 public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException;
66
67 /***
68 * A helper method to invoke this tags body
69 */
70 public void invokeBody(XMLOutput output) throws JellyTagException;
71
72 }