1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.pluto.core.impl;
21
22 import javax.portlet.PortalContext;
23
24 import org.apache.pluto.services.information.InformationProviderAccess;
25 import org.apache.pluto.services.information.PortalContextProvider;
26 import org.apache.pluto.util.Enumerator;
27 /***
28 * The <CODE>PortalContext</CODE> interface gives the portlet
29 * the ability to retrieve information about the portal calling this portlet.
30 * <p>
31 * The portlet can only read the <CODE>PortalContext</CODE> data.
32 */
33 public class PortalContextImpl implements PortalContext
34 {
35
36 private PortalContextProvider provider = null;
37
38 public PortalContextImpl()
39 {
40 provider = InformationProviderAccess.getStaticProvider().getPortalContextProvider();
41 }
42
43
44 public java.lang.String getProperty(java.lang.String name)
45 {
46 if (name == null)
47 {
48 throw new IllegalArgumentException("Property name == null");
49 }
50
51 return provider.getProperty(name);
52 }
53
54
55 public java.util.Enumeration getPropertyNames()
56 {
57 return(new Enumerator(provider.getPropertyNames()));
58 }
59
60 public java.util.Enumeration getSupportedPortletModes()
61 {
62 return new Enumerator(provider.getSupportedPortletModes());
63 }
64
65 public java.util.Enumeration getSupportedWindowStates()
66 {
67 return new Enumerator(provider.getSupportedWindowStates());
68 }
69
70 public String getPortalInfo()
71 {
72 return provider.getPortalInfo();
73 }
74
75 }