1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.util.descriptor;
18
19 import org.apache.commons.digester.Digester;
20 import org.apache.commons.digester.RuleSetBase;
21
22 /***
23 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
24 */
25 public class PortletPreferenceRuleSet extends RuleSetBase
26 {
27
28
29
30 /***
31 * <p>
32 * addRuleInstances
33 * </p>
34 *
35 * @see org.apache.commons.digester.RuleSet#addRuleInstances(org.apache.commons.digester.Digester)
36 * @param arg0
37 */
38 public void addRuleInstances( Digester digester )
39 {
40 digester.addBeanPropertySetter("portlet-app/portlet/portlet-preferences/preferences-validator", "preferenceValidatorClassname");
41 digester.addRule("portlet-app/portlet/portlet-preferences/preference", new PortletPreferenceRule());
42 digester.addBeanPropertySetter("portlet-app/portlet/portlet-preferences/preference/name", "name");
43 digester.addCallMethod("portlet-app/portlet/portlet-preferences/preference/value", "addValue", 0);
44 digester.addCallMethod(
45 "portlet-app/portlet/portlet-preferences/preference/read-only",
46 "setReadOnly",
47 0,
48 new Class[] { Boolean.class });
49
50 }
51
52 }