01: /**
02: * Copyright 2003 IBM Corporation and Sun Microsystems, Inc.
03: * All rights reserved.
04: * Use is subject to license terms.
05: */package javax.portlet;
06:
07: /**
08: * The <CODE>PortletConfig</CODE> interface provides the portlet with
09: * its configuration. The configuration holds information about the
10: * portlet that is valid for all users. The configuration is retrieved
11: * from the portlet definition in the deployment descriptor.
12: * The portlet can only read the configuration data.
13: * <p/>
14: * The configuration information contains the portlet name, the portlet
15: * initialization parameters, the portlet resource bundle and the portlet
16: * application context.
17: *
18: * @see Portlet
19: */
20: public interface PortletConfig {
21:
22: /**
23: * Returns the name of the portlet.
24: * <P>
25: * The name may be provided via server administration, assigned in the
26: * portlet application deployment descriptor with the <code>portlet-name</code>
27: * tag.
28: *
29: * @return the portlet name
30: */
31:
32: public String getPortletName();
33:
34: /**
35: * Returns the <code>PortletContext</code> of the portlet application
36: * the portlet is in.
37: *
38: * @return a <code>PortletContext</code> object, used by the
39: * caller to interact with its portlet container
40: * @see PortletContext
41: */
42:
43: public PortletContext getPortletContext();
44:
45: /**
46: * Gets the resource bundle for the given locale based on the
47: * resource bundle defined in the deployment descriptor
48: * with <code>resource-bundle</code> tag or the inlined resources
49: * defined in the deployment descriptor.
50: *
51: * @param locale the locale for which to retrieve the resource bundle
52: * @return the resource bundle for the given locale
53: */
54:
55: public java.util.ResourceBundle getResourceBundle(
56: java.util.Locale locale);
57:
58: /**
59: * Returns a String containing the value of the named initialization parameter,
60: * or null if the parameter does not exist.
61: *
62: * @param name a <code>String</code> specifying the name
63: * of the initialization parameter
64: * @return a <code>String</code> containing the value
65: * of the initialization parameter
66: * @exception java.lang.IllegalArgumentException if name is <code>null</code>.
67: */
68:
69: public String getInitParameter(java.lang.String name);
70:
71: /**
72: * Returns the names of the portlet initialization parameters as an
73: * <code>Enumeration</code> of String objects, or an empty <code>Enumeration</code> if the
74: * portlet has no initialization parameters.
75: *
76: * @return an <code>Enumeration</code> of <code>String</code>
77: * objects containing the names of the portlet
78: * initialization parameters, or an empty <code>Enumeration</code> if the
79: * portlet has no initialization parameters.
80: */
81:
82: public java.util.Enumeration getInitParameterNames();
83: }
|