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 package org.apache.shale.tiger.managed.rules;
19
20 import org.apache.commons.digester.Rule;
21 import org.apache.shale.tiger.managed.config.NullValueHolder;
22 import org.xml.sax.Attributes;
23
24 /***
25 * <p>Digester rule for processing a <code><null-value></code>
26 * element.</p>
27 */
28 public class NullValueRule extends Rule {
29
30 /*** Creates a new instance of NullValueRule. */
31 public NullValueRule() {
32 }
33
34 /***
35 * <p>Set the <code>nullValue</code> property on the containing
36 * <code>NullValueHolder</code>.</p>
37 *
38 * @param namespace Namespace URI of the matching element
39 * @param name Local name of the matching element
40 * @param attributes Attribute list of the matching element
41 *
42 * @exception Exception if a parsing error occurs
43 */
44 public void begin(String namespace, String name,
45 Attributes attributes) throws Exception {
46
47 NullValueHolder config = (NullValueHolder) digester.peek();
48 config.setNullValue(true);
49
50 }
51
52
53 /***
54 * <p>No body processing for this element.</p>
55 *
56 * @param namespace Namespace URI of the matching element
57 * @param name Local name of the matching element
58 *
59 * @throws Exception if a parsing error occurs
60 */
61 public void body(String namespace, String name) throws Exception {
62 }
63
64
65 /***
66 * <p>No end processing for this element.</p>
67 *
68 * @param namespace Namespace URI of the matching element
69 * @param name Local name of the matching element
70 *
71 * @exception IllegalStateException if the popped object is not
72 * of the correct type
73 * @exception Exception if a different error occurs
74 */
75 public void end(String namespace, String name) throws Exception {
76 }
77
78
79 }