KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > portlet > PortletConfig


1 /**
2   * Copyright 2003 IBM Corporation and Sun Microsystems, Inc.
3   * All rights reserved.
4   * Use is subject to license terms.
5   */

6
7 package javax.portlet;
8
9
10
11
12 /**
13  * The <CODE>PortletConfig</CODE> interface provides the portlet with
14  * its configuration. The configuration holds information about the
15  * portlet that is valid for all users. The configuration is retrieved
16  * from the portlet definition in the deployment descriptor.
17  * The portlet can only read the configuration data.
18  * <p>
19  * The configuration information contains the portlet name, the portlet
20  * initialization parameters, the portlet resource bundle and the portlet
21  * application context.
22  *
23  * @see Portlet
24  */

25 public interface PortletConfig
26 {
27
28
29   /**
30    * Returns the name of the portlet.
31    * <P>
32    * The name may be provided via server administration, assigned in the
33    * portlet application deployment descriptor with the <code>portlet-name</code>
34    * tag.
35    *
36    * @return the portlet name
37    */

38
39   public String JavaDoc getPortletName ();
40
41
42   /**
43    * Returns the <code>PortletContext</code> of the portlet application
44    * the portlet is in.
45    *
46    * @return a <code>PortletContext</code> object, used by the
47    * caller to interact with its portlet container
48    *
49    * @see PortletContext
50    */

51
52   public PortletContext getPortletContext ();
53
54
55   /**
56    * Gets the resource bundle for the given locale based on the
57    * resource bundle defined in the deployment descriptor
58    * with <code>resource-bundle</code> tag or the inlined resources
59    * defined in the deployment descriptor.
60    *
61    * @param locale the locale for which to retrieve the resource bundle
62    *
63    * @return the resource bundle for the given locale
64    *
65    */

66
67   public java.util.ResourceBundle JavaDoc getResourceBundle(java.util.Locale JavaDoc locale);
68
69
70   /**
71    * Returns a String containing the value of the named initialization parameter,
72    * or null if the parameter does not exist.
73    *
74    * @param name a <code>String</code> specifying the name
75    * of the initialization parameter
76    *
77    * @return a <code>String</code> containing the value
78    * of the initialization parameter
79    *
80    * @exception java.lang.IllegalArgumentException
81    * if name is <code>null</code>.
82    */

83
84   public String JavaDoc getInitParameter(java.lang.String JavaDoc name);
85
86
87   /**
88    * Returns the names of the portlet initialization parameters as an
89    * <code>Enumeration</code> of String objects, or an empty <code>Enumeration</code> if the
90    * portlet has no initialization parameters.
91    *
92    * @return an <code>Enumeration</code> of <code>String</code>
93    * objects containing the names of the portlet
94    * initialization parameters, or an empty <code>Enumeration</code> if the
95    * portlet has no initialization parameters.
96    */

97
98   public java.util.Enumeration JavaDoc getInitParameterNames();
99 }
100
101
Popular Tags