1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.tools.pamanager.rules;
18
19 import org.apache.commons.digester.Digester;
20 import org.apache.commons.digester.RuleSetBase;
21 import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
22 import org.apache.jetspeed.om.impl.JetspeedServiceReferenceImpl;
23
24 /***
25 * This class helps load the jetspeed portlet extension service declarations.
26 *
27 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
28 */
29 public class JetspeedServicesRuleSet extends RuleSetBase
30 {
31 private MutablePortletApplication app;
32
33 public JetspeedServicesRuleSet(MutablePortletApplication app)
34 {
35 this.app = app;
36 }
37
38 /***
39 * @see org.apache.commons.digester.RuleSet#addRuleInstances(org.apache.commons.digester.Digester)
40 */
41 public void addRuleInstances(Digester digester)
42 {
43 digester.addObjectCreate("portlet-app/services/service", JetspeedServiceReferenceImpl.class);
44 digester.addSetProperties("portlet-app/services/service", "name", "name");
45
46 digester.addRule("portlet-app/services/service", new JetspeedServiceRule(app));
47
48 }
49
50 }