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.Command;
24 import org.apache.commons.chain.Context;
25 import org.apache.shale.clay.parser.builder.JsfDefaultBuilder;
26
27
28 /***
29 * <p>Delegates all handling to a common
30 * {@link org.apache.shale.clay.parser.builder.JsfDefaultBuilder} that can
31 * transform markup that looks like JSP tags to a graph of
32 * {@link org.apache.shale.clay.config.beans.InnerComponentBean} beans.</p>
33 *
34 */
35 public class JsfDefaultBuilderRule implements Command {
36
37 /***
38 * <p>Generic {@link Builder} that handles JSP style of markup's.</p>
39 */
40 private final JsfDefaultBuilder builder = new JsfDefaultBuilder();
41
42 /***
43 * <p>Assigns handling of the markup to {@link org.apache.shale.clay.parser.builder.JsfDefaultBuilder}
44 * without condition.</p>
45 *
46 * @param context common chains
47 * @return <code>true</code> if the chain is done
48 */
49 public boolean execute(Context context) {
50
51 BuilderRuleContext builderRuleContext = (BuilderRuleContext) context;
52 builderRuleContext.setBuilder(builder);
53
54 return true;
55 }
56
57 /***
58 * <p>Returns the namespace prefix that will be added to the
59 * node name when resolving the clay config.</p>
60 *
61 * @return URI prefix
62 */
63 public String getPrefix() {
64 return builder.getPrefix();
65 }
66
67 /***
68 * <p>Sets the namespace preix that will override the template
69 * nodeds qname.</p>
70 *
71 * @param prefix URI prefix
72 */
73 public void setPrefix(String prefix) {
74 builder.setPrefix(prefix);
75 }
76
77 }
78