1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.tapestry.portlet; |
16 |
| |
17 |
| import java.util.List; |
18 |
| |
19 |
| import javax.portlet.PortletConfig; |
20 |
| |
21 |
| import org.apache.hivemind.util.Defense; |
22 |
| import org.apache.tapestry.describe.DescriptionReceiver; |
23 |
| import org.apache.tapestry.web.WebActivator; |
24 |
| import org.apache.tapestry.web.WebUtils; |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
| |
32 |
| public class PortletWebActivator implements WebActivator |
33 |
| { |
34 |
| private final PortletConfig _config; |
35 |
| |
36 |
8
| public PortletWebActivator(PortletConfig config)
|
37 |
| { |
38 |
8
| Defense.notNull(config, "config");
|
39 |
| |
40 |
8
| _config = config;
|
41 |
| } |
42 |
| |
43 |
4
| public String getActivatorName()
|
44 |
| { |
45 |
4
| return _config.getPortletName();
|
46 |
| } |
47 |
| |
48 |
2
| public List getInitParameterNames()
|
49 |
| { |
50 |
2
| return WebUtils.toSortedList(_config.getInitParameterNames());
|
51 |
| } |
52 |
| |
53 |
2
| public String getInitParameterValue(String name)
|
54 |
| { |
55 |
2
| return _config.getInitParameter(name);
|
56 |
| } |
57 |
| |
58 |
0
| public void describeTo(DescriptionReceiver receiver)
|
59 |
| { |
60 |
0
| receiver.describeAlternate(_config);
|
61 |
| } |
62 |
| |
63 |
| } |