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.Rule;
20
21 import org.apache.commons.logging.Log;
22 import org.apache.commons.logging.LogFactory;
23
24 import org.apache.jetspeed.om.common.UserAttributeRef;
25 import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
26
27 /***
28 * This class helps load the jetspeed portlet extension user attributes.
29 *
30 * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
31 */
32 public class UserAttributeRefRule extends Rule
33 {
34 protected final static Log log = LogFactory.getLog(UserAttributeRefRule.class);
35
36 private MutablePortletApplication app;
37
38 public UserAttributeRefRule(MutablePortletApplication app)
39 {
40 this.app = app;
41 }
42
43 public void end(String namespace, String name) throws Exception
44 {
45 UserAttributeRef userAttributeRef = (UserAttributeRef) digester.peek(0);
46 app.addUserAttributeRef(userAttributeRef);
47 }
48 }