1
2
3
4
5
6
7 package genie.core;
8
9 import org.apache.commons.chain.Command;
10 import org.apache.commons.chain.Context;
11 import org.apache.commons.digester.Digester;
12 import org.apache.commons.digester.ExtendedBaseRules;
13 import org.apache.commons.digester.RuleSetBase;
14
15 /***
16 *
17 *
18 * @author T. Kia Ntoni
19 *
20 * 22 janv. 2005
21 * AbstractRuleSet @version
22 */
23 public abstract class AbstractRuleSet extends RuleSetBase {
24 protected final Class[] contextItemParams = {Object.class, Object.class};
25 protected final Class[] addCommandParams = {String.class, Command.class};
26 protected final Class[] addContextParams = {String.class, Context.class};
27 /***
28 *
29 */
30 public AbstractRuleSet() {
31 super();
32
33 }
34
35
36
37
38
39 public void addRuleInstances(Digester digester) {
40
41 if (! (digester.getRules() instanceof ExtendedBaseRules)) {
42 digester.setRules(new ExtendedBaseRules());
43 }
44 }
45 }