1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package javax.portlet;
22
23
24
25
26 /***
27 * The <CODE>PortletConfig</CODE> interface provides the portlet with
28 * its configuration. The configuration holds information about the
29 * portlet that is valid for all users. The configuration is retrieved
30 * from the portlet definition in the deployment descriptor.
31 * The portlet can only read the configuration data.
32 * <p>
33 * The configuration information contains the portlet name, the portlet
34 * initialization parameters, the portlet resource bundle and the portlet
35 * application context.
36 *
37 * @see Portlet
38 */
39 public interface PortletConfig
40 {
41
42
43
44 /***
45 * Returns the name of the portlet.
46 * <P>
47 * The name may be provided via server administration, assigned in the
48 * portlet application deployment descriptor with the <code>portlet-name</code>
49 * tag.
50 *
51 * @return the portlet name
52 */
53
54 public String getPortletName ();
55
56
57 /***
58 * Returns the <code>PortletContext</code> of the portlet application
59 * the portlet is in.
60 *
61 * @return a <code>PortletContext</code> object, used by the
62 * caller to interact with its portlet container
63 *
64 * @see PortletContext
65 */
66
67 public PortletContext getPortletContext ();
68
69
70 /***
71 * Gets the resource bundle for the given locale based on the
72 * resource bundle defined in the deployment descriptor
73 * with <code>resource-bundle</code> tag or the inlined resources
74 * defined in the deployment descriptor.
75 *
76 * @param locale the locale for which to retrieve the resource bundle
77 *
78 * @return the resource bundle for the given locale
79 *
80 */
81
82 public java.util.ResourceBundle getResourceBundle(java.util.Locale locale);
83
84
85 /***
86 * Returns a String containing the value of the named initialization parameter,
87 * or null if the parameter does not exist.
88 *
89 * @param name a <code>String</code> specifying the name
90 * of the initialization parameter
91 *
92 * @return a <code>String</code> containing the value
93 * of the initialization parameter
94 *
95 * @exception java.lang.IllegalArgumentException
96 * if name is <code>null</code>.
97 */
98
99 public String getInitParameter(java.lang.String name);
100
101
102 /***
103 * Returns the names of the portlet initialization parameters as an
104 * <code>Enumeration</code> of String objects, or an empty <code>Enumeration</code> if the
105 * portlet has no initialization parameters.
106 *
107 * @return an <code>Enumeration</code> of <code>String</code>
108 * objects containing the names of the portlet
109 * initialization parameters, or an empty <code>Enumeration</code> if the
110 * portlet has no initialization parameters.
111 */
112
113 public java.util.Enumeration getInitParameterNames();
114 }
115