2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.shale.clay.parser.builder.chain;
22
23 import org.apache.commons.chain.impl.ContextBase;
24 import org.apache.shale.clay.parser.Node;
25 import org.apache.shale.clay.parser.builder.Builder;
26
27 /***
28 * <p>
29 * This context is used by the {@link org.apache.shale.clay.parser.builder.BuilderFactory}
30 * to invoke the <code>Globals.FIND_BUILDER_COMMAND_NAME</code> chain passing this context.
31 * When the chain has stopped, the context will contain the
32 * {@link org.apache.shale.clay.parser.builder.Builder}
33 * needed to convert the html {@link org.apache.shale.clay.parser.Node}
34 * into a {@link org.apache.shale.clay.config.beans.ElementBean}.
35 */
36 public class BuilderRuleContext extends ContextBase {
37
38 /***
39 * <p>Unique serial id.</p>
40 */
41 private static final long serialVersionUID = 4123103940092377137L;
42
43 /***
44 * <p>
45 * The current html node.
46 * </p>
47 */
48 private Node node = null;
49
50 /***
51 * <p>
52 * Returns the current html {@link org.apache.shale.clay.parser.Node}.
53 * </p>
54 *
55 * @return current node
56 */
57 public Node getNode() {
58 return node;
59 }
60
61 /***
62 * <p>
63 * Sets the current html {@link org.apache.shale.clay.parser.Node}.
64 * </p>
65 *
66 * @param node current html node
67 */
68 public void setNode(Node node) {
69 this.node = node;
70 }
71
72 /***
73 * <p>
74 * The target builder that the
75 * <code>Globals.FIND_BUILDER_COMMAND_NAME</code> chain will set.
76 */
77 private Builder builder = null;
78
79 /***
80 * <p>
81 * Returns the target {@link org.apache.shale.clay.parser.builder.Builder}.
82 * </p>
83 *
84 * @return assigned builder
85 */
86 public Builder getBuilder() {
87 return builder;
88 }
89
90 /***
91 * <p>
92 * Sets the target {@link org.apache.shale.clay.parser.builder.Builder}.
93 * </p>
94 *
95 * @param builder assigned to the node
96 */
97 public void setBuilder(Builder builder) {
98 this.builder = builder;
99 }
100 }